Hybrid Gateway Deployment Playbook
Step-by-step guide for deploying a SatGate hybrid gateway on customer infrastructure with cloud dashboard integration.
What This Guide Covers
Deploy a SatGate gateway on your own infrastructure while connecting to the cloud dashboard for management. This hybrid approach gives you data locality and control while maintaining centralized visibility and configuration.
Gateway binary, Redis, TLS, network policies — full control
Management UI, token minting, audit logs, real-time config push
1. Prerequisites
Infrastructure Requirements
- ✓Linux server (Ubuntu 22.04+ recommended) with root access
- ✓4GB+ RAM, 2+ CPU cores
- ✓Domain name pointed at server (A record)
- ✓Ports 80, 443, 8080 available
Software Requirements
- ✓Go 1.22+ (for building) OR pre-built binary
- ✓Redis 7+ installed and running
- ✓Caddy or nginx for TLS termination
- ✓Enterprise tenant at cloud.satgate.io
2. Build the Gateway Binary
Build the enterprise gateway with hybrid features enabled. The -tags enterprise flag is required for cloud sync and dashboard integration.
Clone and Build
⚠️ Important
• The -tags enterprise flag enables hybrid features (cloud sync, dashboard tokens)
• Cross-compilation is required when building on Mac/Windows for Linux deployment
• Verify the binary architecture matches your server: file satgate-gateway
3. Deploy to Server
Copy the binary to your server and set up the directory structure.
💡 Tip
Verify the binary works: sudo -u satgate /usr/local/bin/satgate-gateway --version
4. Configure the Gateway
Create the gateway configuration. Most settings (enforcement mode, budgets, tokens) are managed from the cloud dashboard and pushed automatically via WebSocket — you only need to define local upstreams and routes here.
Create Configuration File
💡 Simplified by Design
Most configuration (enforcement mode, budgets, tokens) is managed from the cloud dashboard and pushed to your gateway automatically via WebSocket. You only need to define local upstreams and routes in this file.
🔒 Security Note
Set restrictive file permissions on the config: sudo chmod 600 /etc/satgate/hybrid-gateway.yaml
5. Set Up TLS (Caddy or nginx)
AI tools require HTTPS for custom API base URLs. Choose Caddy (automatic certificates) or nginx (manual certificate management).
Configure Caddyfile
🚨 CRITICAL: SSE Timeout Settings Required
The flush_interval and transport timeout settings are REQUIRED. Without them, Caddy kills MCP SSE connections after ~30 seconds. Cursor, Claude Desktop, and other MCP clients will connect, discover tools, then silently disconnect.
nginx Alternative
✅ Why Caddy?
• Automatic Let's Encrypt certificates (no manual renewal)
• HTTP → HTTPS redirects automatically
• Zero-config HTTPS for most setups
• AI tools (Cursor, Claude Code) require HTTPS for custom API endpoints
6. Create systemd Service
Set up the gateway as a system service for automatic startup and restart on failure.
💡 Deployment Token
Get your --deployment-token from Settings → Hybrid Gateway in your dashboard.
7. Configure MCP Tool Servers
The gateway loads MCP tool configuration from a separate YAML file pointed to by the SATGATE_MCP_CONFIG environment variable. This is how you expose actual MCP tools to connected agents.
Add to systemd Service
Create MCP Configuration
💡 Configuration Notes
• Environment variables (${VAR}) are expanded at load time — set them in the systemd service file
• Add API keys to the [Service] section: Environment=GITHUB_TOKEN=ghp_your_token_here
• Available transports: stdio (recommended for local tools), sse (for remote MCP servers)
• enforcement: mode: observe logs tool calls without blocking — switch to control from the dashboard when ready
8. Connect to Cloud Dashboard
Verify the hybrid connection and enable real-time configuration management.
Gateway Side
- →Connects to cloud via WebSocket on startup
- →Authenticates with deployment token
- →Receives real-time config pushes
- →Sends audit events back to dashboard
Dashboard Side
- ←Shows gateway status as "Connected"
- ←Pushes routes, tokens, policies automatically
- ←Displays real-time audit logs
- ←Config changes take effect immediately
Verify Connection
- Go to Settings → Hybrid Gateway
- Check that status shows "Connected"
- Check gateway logs:
sudo journalctl -u satgate-gateway -f - Look for:
"level":"info","msg":"cloud connection established"
✅ Hot Reload
Config changes in the dashboard take effect immediately — no gateway restart required. Routes, tokens, and policies are pushed in real-time.
9. Connect MCP Clients
Point your AI tools and MCP clients to the hybrid gateway. The gateway exposes MCP tools at the /mcp subpath.
⚠️ IMPORTANT: URL Must Include /mcp Subpath
When configuring MCP clients to connect to your hybrid gateway, the URL MUST include the /mcp subpath:
https://gw.yourdomain.com/mcphttps://gw.yourdomain.comThe embedded MCP proxy is mounted at /mcp. Without the subpath, SSE connections will 404.
💡 Quick Setup
Visit /cloud/mcp/connect in your dashboard for tool-specific configuration guides with your exact endpoint URLs and tokens pre-filled.
Cursor
settings.json → mcpServers:
Claude Desktop
claude_desktop_config.json:
OpenClaw
openclaw.json → mcp.servers:
Claude Code
Environment (HTTP proxy mode):
10. Verify & Troubleshoot
Test the complete flow: token creation → AI tool configuration → request → audit verification.
Go to Tokens and create a new token with a small budget ($1-5)
Set ANTHROPIC_AUTH_TOKEN to your test token and ANTHROPIC_BASE_URL to https://gw.yourdomain.com
Ask the AI tool to do something simple: "What's the capital of France?" or run a code generation task
Go to Audit and verify the request appears with cost attribution
Check that the token's remaining budget decreased by the request cost
Quick curl Test
Common Issues
Common issues and solutions based on real deployment experience.
❌ "cannot execute binary file"
Cause: Wrong architecture — building on Mac creates arm64, but server is x86_64
Solution: Use GOOS=linux GOARCH=amd64 when cross-compiling
❌ "invalid signature" / "authentication failed"
Cause: Wrong deployment token or admin token in service file
Solution: Verify --deployment-token is copied exactly from Settings → Hybrid Gateway
❌ MCP tools return 404 / SSE disconnects after 30s
Cause: Either missing /mcp subpath in client URL, or Caddy/nginx missing SSE timeout settings
Solution: (1) Ensure client URL ends in /mcp, (2) Add flush_interval -1 and transport timeouts to Caddyfile
❌ Claude Code rejects HTTP
Cause: AI tools require HTTPS for custom API base URLs
Solution: Set up Caddy or nginx for TLS — HTTP is not sufficient for production
⚠️ Token doesn't work immediately
Cause: Config push from cloud takes ~5 seconds on first connect
Solution: Wait 5-10 seconds after creating a token before testing
⚠️ Gateway shows "Disconnected"
Cause: Network/firewall blocking WebSocket to api.satgate.io
Solution: Check firewall rules, ensure outbound HTTPS/WSS allowed on port 443
Log Analysis
Key log patterns to watch for:
✅ Successful startup:
"level":"info","msg":"gateway starting","version":"0.5.1"✅ Cloud connected:
"level":"info","msg":"cloud connection established","tenant":"..."⚠️ Config received:
"level":"info","msg":"config updated","routes":3,"tokens":5❌ Auth failure:
"level":"error","msg":"authentication failed","error":"invalid signature"Production Hardening
Additional security measures for production deployments.
🔒 Security
- •Use a dedicated service user (not root)
- •Set restrictive file permissions on config
- •Enable firewall (ufw/iptables)
- •Regular security updates
📊 Monitoring
- •Set up log rotation for gateway logs
- •Monitor disk space and Redis memory
- •Alert on service failures
- •Dashboard audit logs show request patterns
🔒 Enterprise: Network Policy Enforcement
For complete governance guarantee, block direct outbound access to LLM providers. All AI traffic must flow through SatGate.
Firewall Rules Example (iptables)
See the Enterprise Deployment Guide for complete network policy patterns including Kubernetes and cloud-specific configurations.
🎯 Deployment Complete
Gateway deployed on your servers
Real-time sync with cloud dashboard
AI tools protected and audited
Your hybrid gateway is ready. Configure AI tools → mint tokens → monitor usage in the dashboard.