Documentation

Web services

Run HTTP servers and APIs with HTTPS, health checks, zero-downtime deploys and autoscaling.

A web service runs your HTTP server and gets a public HTTPS URL at https://<name>.rebasable.com. You can add custom domains at any time.

Port and host

Your app must listen on host 0.0.0.0 and the port in PORT (default 10000). If your app uses a fixed port, set it in Settings → Port instead.

Health checks

Set a health check path (for example /healthz) that returns 2xx when your app is ready. During a deploy, new instances must pass it before they get traffic, so a broken release never replaces a working one. Without a path we wait until the port accepts TCP connections.

Protocols

HTTP/1.1, HTTP/2, WebSockets and Server-Sent Events work out of the box. TLS terminates at our edge; your app receives plain HTTP with X-Forwarded-For, X-Forwarded-Proto and CF-Connecting-IP headers.

Instance types and scaling

Pick an instance type for CPU and memory, and how many instances to run. Paid instance types can autoscale on CPU and memory. Free web services sleep when idle and wake in about two seconds.

Built-in environment variables

Variable Example
PORT 10000
REBASABLE true
REBASABLE_SERVICE_ID srv_0a1b2c3d4e5f6g7h
REBASABLE_SERVICE_NAME my-api
REBASABLE_SERVICE_TYPE web
REBASABLE_EXTERNAL_URL https://my-api.rebasable.com
REBASABLE_EXTERNAL_HOSTNAME my-api.rebasable.com
REBASABLE_INSTANCE_ID ins_...
REBASABLE_GIT_COMMIT / REBASABLE_GIT_BRANCH commit SHA / branch
REBASABLE_DEPLOY_ID dep_...
IS_PULL_REQUEST true in preview environments

Operations

  • Restart: restarts every instance without rebuilding.
  • Suspend / resume: stops the service and its billing; the URL shows a suspended page.
  • Rollback: one click on any previous deploy, no rebuild (deploys).
  • Logs and metrics: live logs, search, CPU, memory, bandwidth and request charts in the dashboard or rebasable logs -f.