Skip to main content

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:

  1. Go to your container
  2. Click Expose
  3. Select the port your container listens on
  4. Optionally set a path prefix (defaults to /)
  5. 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}.

Instant Access

Quick Expose takes just a few seconds. No DNS configuration, no certificate management -- everything is handled automatically.

Automatic port remapping

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:

  1. Create a gateway: Navigate to Gateways and create a new gateway
  2. Add a domain: Add your custom domain to the gateway
  3. Configure DNS: Point your domain's DNS records to the gateway's address
  4. Create a route: Add an HTTP route from your domain to your container and port
my-app.example.com → Gateway → Route → Container:8080
SSL/TLS

SailOps automatically provisions and renews TLS certificates for both Quick Expose and custom domains.

Comparison​

FeatureQuick ExposeCustom Gateway
Setup timeSecondsMinutes
Custom domainNo (auto-generated .sailops.io)Yes
DNS configurationNot requiredRequired
TLS certificateAutomaticAutomatic
Path-based routingYesYes
Multiple routesOne per containerUnlimited
Best forDevelopment, demos, testingProduction, custom branding

Viewing Exposure​

To see how your container is exposed:

  1. Go to your container
  2. Open the Network tab
  3. 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:

  1. Go to your container's Network tab
  2. Switch the exposure mode to Internal only
  3. Click Save

SailOps detaches the container from the shared gateway and deletes the associated route.

Custom Gateway Route​

To remove a custom gateway route:

  1. Navigate to Gateways
  2. Select the gateway
  3. Find and delete the route
warning

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