Create a Gateway
Expose your containers to the internet with a managed gateway.
Prerequisites
- A project created in your organization
- A custom domain name you own (required for listeners)
- Access to your domain's DNS settings
- (Optional) At least one container deployed to route traffic to
Step-by-Step Guide
1. Navigate to Gateways
- Select your project from the project switcher
- Click Gateways in the left sidebar
- Click Create Gateway
2. Basic Configuration
Gateway Name
Enter a unique name for your gateway:
Valid: api-gateway, frontend, my-app
Invalid: My Gateway, api_gateway, gateway.prod
Use lowercase letters, numbers, and hyphens only. Start with a letter.
3. Gateway Class
Select the gateway class based on your bandwidth requirements:
| Class | Bandwidth | Price | Best For |
|---|---|---|---|
| gw-small | 200 Mbps | 0.0365€/hour | Development, small applications |
| gw-medium | 500 Mbps | 0.0770€/hour | Medium traffic applications |
| gw-large | 1 Gbps | 0.1290€/hour | High-traffic production |
| gw-xlarge | 4 Gbps | 1.2300€/hour | Enterprise, very high traffic |
Start with gw-small for development. Upgrade to larger classes as your traffic grows.
4. Configure Listeners
Listeners define how your gateway accepts incoming traffic. Click Add Listener to create one.
Listener Configuration
| Field | Description | Required |
|---|---|---|
| Listener Name | Unique identifier (e.g., my-listener) | Yes |
| Protocol | HTTPS (recommended), TLS, or TCP | Yes |
| Hostname | Your domain (e.g., api.example.com) | Yes |
| Port | Network port (443 for HTTPS) | Yes |
You must provide your own hostname. SailOps does not provide default subdomains. Configure your domain's DNS to point to the gateway after creation.
Protocol Options
- HTTPS - Secure HTTP with automatic TLS certificate (recommended)
- TLS - Generic TLS passthrough for non-HTTP protocols
- TCP - Raw TCP traffic without TLS termination
When using HTTPS, TLS certificates are automatically provisioned and renewed via Let's Encrypt.
5. Create the Gateway
- Review your configuration in the sidebar summary
- Verify the estimated cost
- Click Create Gateway
- Wait for provisioning (~15-30 seconds)
After Creation
Configure DNS
After your gateway is created, configure your DNS with an A record:
For subdomains:
Type: A
Name: api (or your subdomain)
Value: <IP-address-from-gateway-details>
TTL: 300
For apex domains:
Type: A
Name: @
Value: <IP-address-from-gateway-details>
TTL: 300
The IP address is displayed in your gateway details.
SSL Certificate Provisioning
Once DNS is configured correctly:
- SailOps automatically detects the DNS change
- SSL certificate is provisioned (1-5 minutes)
- Your gateway is ready to receive traffic
Add Routes
After the gateway is active, configure routes to direct traffic to your containers:
- Go to your gateway details
- Navigate to the Routes section
- Click Add Route
- Configure the route:
| Field | Description | Example |
|---|---|---|
| Path | URL path to match | / or /api |
| Container | Target container | my-app |
| Port | Container port | 3000 |
Test Your Gateway
# Test your custom domain
curl https://api.yourdomain.com
# Test a specific route
curl https://api.yourdomain.com/health
Gateway Configuration
Multiple Listeners
A single gateway can have multiple listeners for different domains:
| Name | Hostname | Port | Protocol |
|---|---|---|---|
| api-listener | api.example.com | 443 | HTTPS |
| app-listener | app.example.com | 443 | HTTPS |
Route Configuration
Path Matching
Paths are matched with prefix matching:
| Gateway Path | Matches |
|---|---|
/ | All requests |
/api | /api, /api/users, /api/v1/data |
/api/v1 | /api/v1, /api/v1/users |
Path Prefix Stripping
Control how paths are forwarded to containers:
| Option | Request Path | Container Receives |
|---|---|---|
| Keep path | /api/users | /api/users |
| Strip prefix | /api/users | /users |
Route Priority
Routes are matched in order of specificity:
- Exact matches first
- Longer path prefixes before shorter
- First defined route wins for equal specificity
Gateway States
| State | Description |
|---|---|
| Creating | Gateway is being provisioned |
| Active | Gateway is routing traffic |
| Updating | Configuration change in progress |
| Error | Issue with gateway configuration |
Examples
Simple Web App
Single container serving a web application:
| Parameter | Value |
|---|---|
| Gateway Name | my-app-gateway |
| Class | gw-small |
| Listener Hostname | myapp.example.com |
| Listener Port | 443 (HTTPS) |
Route: Path / → Container web on port 3000
API + Frontend
Separate containers for API and frontend on different subdomains:
| Parameter | Value |
|---|---|
| Gateway Name | platform-gateway |
| Class | gw-medium |
Listeners:
| Hostname | Port |
|---|---|
| app.example.com | 443 |
| api.example.com | 443 |
Routes:
| Hostname | Path | Container | Port |
|---|---|---|---|
| api.example.com | / | api | 8080 |
| app.example.com | / | frontend | 3000 |
Microservices
Multiple services behind one gateway with path-based routing:
| Parameter | Value |
|---|---|
| Gateway Name | api-gateway |
| Class | gw-large |
| Listener Hostname | api.example.com |
| Listener Port | 443 |
Routes:
| Path | Container | Port |
|---|---|---|
| /users | user-service | 8080 |
| /orders | order-service | 8080 |
| /payments | payment-service | 8080 |
| / | api-docs | 80 |
Troubleshooting
SSL Certificate Not Provisioning
- Verify DNS is correctly configured
- Check DNS propagation (can take up to 48 hours)
- Ensure hostname exactly matches your DNS record
- Wait 5-10 minutes after DNS change
# Check DNS configuration
dig api.yourdomain.com
Gateway Not Responding
- Verify DNS points to the correct endpoint
- Check SSL certificate status
- Verify at least one listener is configured
- Check container is running (if routes are configured)
502 Bad Gateway
The gateway cannot reach the container:
- Container may have crashed
- Port mismatch between route and container
- Container not ready yet
# Check container status
Dashboard → Containers → your-container → Status
504 Gateway Timeout
Request took too long:
- Container is overloaded
- Long-running operation
- Consider scaling your container