Exposing Containers
Make your containers accessible from the internet in seconds.
SailOps provides two ways to expose your containers to external traffic: Quick Expose for instant, zero-configuration access, and Custom Gateway for full control over domains and routing.
Exposure Modes
Quick Expose
Quick Expose is the fastest way to get a public URL for your container. It creates an HTTP route on the shared default gateway with an auto-generated hostname.
How it works:
- Go to your container
- Click Expose
- Select the port your container listens on
- Optionally set a path prefix (defaults to
/) - Click Expose
You can change the exposed port at any time from the Network tab by selecting a different port in the Port dropdown.
SailOps creates an HTTPRoute on the shared gateway and gives you a URL like:
https://my-container-my-project-abc123.gw.sailops.io
The hostname follows the pattern {containerName}-{namespace}.{domain}.
Quick Expose takes just a few seconds. No DNS configuration, no certificate management -- everything is handled automatically.
If you edit a container port that is currently exposed (for example, changing port 8080 to 8081), SailOps automatically updates the exposure to target the new port. This prevents the route from pointing at a port that no longer exists.
Custom Gateway
For production workloads, you'll typically want your own domain. This requires creating a gateway, adding your domain, and configuring a route.
Workflow:
- Create a gateway: Navigate to Gateways and create a new gateway
- Add a domain: Add your custom domain to the gateway
- Configure DNS: Point your domain's DNS records to the gateway's address
- Create a route: Add an HTTP route from your domain to your container and port
my-app.example.com → Gateway → Route → Container:8080
SailOps automatically provisions and renews TLS certificates for both Quick Expose and custom domains.
Comparison
| Feature | Quick Expose | Custom Gateway |
|---|---|---|
| Setup time | Seconds | Minutes |
| Custom domain | No (auto-generated .sailops.io) | Yes |
| DNS configuration | Not required | Required |
| TLS certificate | Automatic | Automatic |
| Path-based routing | Yes | Yes |
| Multiple routes | One per container | Unlimited |
| Best for | Development, demos, testing | Production, custom branding |
Viewing Exposure
To see how your container is exposed:
- Go to your container
- Open the Network tab
- View active routes, hostnames, and ports
Each route shows:
- The hostname visitors use to reach the container
- The target port on the container
- The gateway the route is attached to
Removing Exposure
Quick Expose Route
To remove a Quick Expose route:
- Go to your container's Network tab
- Switch the exposure mode to Internal only
- Click Save
SailOps detaches the container from the shared gateway and deletes the associated route.
Custom Gateway Route
To remove a custom gateway route:
- Navigate to Gateways
- Select the gateway
- Find and delete the route
Deleting a route immediately stops external traffic from reaching the container on that hostname. Internal networking within the project is not affected.
When to Use Each Mode
Use Quick Expose When
- You need to share a preview or demo quickly
- You're developing and need a public URL for webhooks or testing
- You don't need a custom domain
- You want the simplest possible setup
Use Custom Gateway When
- You're running a production workload
- You need your own domain (e.g.,
api.example.com) - You need advanced routing rules (multiple paths, multiple backends)
- You want to control gateway configuration (timeouts, headers, etc.)
Best Practices
Start with Quick Expose, Graduate to Custom Gateway
Use Quick Expose during development and switch to a custom gateway when you go to production. This lets you iterate quickly without worrying about DNS and domain configuration early on.
Always Specify the Correct Port
Make sure the port you expose matches the port your application listens on. If your app listens on port 3000, expose port 3000 -- not 80 or 443 (TLS termination is handled by the gateway).
Use Path Prefixes for Multi-Service Routing
If you have multiple services behind a single domain, use path prefixes to route traffic:
example.com/api → api-container:8080
example.com/web → web-container:3000
example.com/docs → docs-container:4000