Deploying a Private Location¶
To deploy a Private Location, you only need to retrieve your API key from the platform. With the API key, you will be able to create locations, list them, and delete them.
To get your API key, go to your profile page.
Now save it in your environment variables as ESCAPE_API_KEY=....
Using the Escape CLI¶
If you have installed the Escape CLI, you can manage your Private Locations with the following commands:
This will start a new Private Location on your computer and will automatically connect it to your Escape account. If the location does not exist, it will be created, and you will be able to see its status in the Escape platform on the Private Locations page.
Using Helm¶
helm repo add escape-cli https://escape-technologies.github.io/cli/
helm repo update
# Get your API key from https://app.escape.tech/user/profile/
helm install escape-private-location escape-cli/private-location --set ESCAPE_API_KEY="${ESCAPE_API_KEY}"
The Helm chart sets HEALTH_CHECK_PORT=8080 and a Kubernetes liveness probe on GET /health. You don't need extra configuration for the health check when you deploy with Helm.
Using Docker¶
You can start a Private Location with Docker by running:
docker run \
-e ESCAPE_API_KEY="${ESCAPE_API_KEY}" \
-e HEALTH_CHECK_PORT=8080 \
-p 8080:8080 \
-it --rm escapetech/cli:latest locations start location-name
Set HEALTH_CHECK_PORT so the container serves GET /health. Orchestrators such as Kubernetes use that endpoint to decide whether the application is healthy and whether the deployment can complete. See Health Check for the response codes and probe timing.
Using Podman¶
If you prefer Podman, you can use:
podman run \
-e ESCAPE_API_KEY="${ESCAPE_API_KEY}" \
-e HEALTH_CHECK_PORT=8080 \
-p 8080:8080 \
-it --rm escapetech/cli:latest locations start location-name
Using Docker Compose¶
---
services:
private-location:
image: escapetech/cli:latest
restart: always
command: locations start -v location-name
ports:
- "8080:8080"
environment:
- ESCAPE_API_KEY=<ESCAPE_API_KEY>
- HEALTH_CHECK_PORT=8080
/health is served on the mapped port and returns 503 until the location is connected.
Compose can't restart the container on its own when the location is unhealthy:
- The image is distroless, with no shell or
curl, so a Composehealthcheckhas nothing to run inside the container. restart: alwaysonly reacts to the container process exiting, never to an unhealthy status.
Poll /health and restart the container when it stops returning 200. Use the address that's reachable from wherever the poller runs:
| Poller location | Address |
|---|---|
| The Docker host | http://localhost:8080/health |
| Another service on the Compose network | http://private-location:8080/health |
| Another host | http://<docker-host>:8080/health |
localhost only works from the Docker host itself. From another container it resolves to that container, not to the Private Location.
If you want the restart handled for you, deploy on Kubernetes with the liveness probe below, or use the Helm chart.
Health Check¶
The Private Location starts an HTTP server only when HEALTH_CHECK_PORT is set. If the variable is empty, there's no /health endpoint.
Use a port of 1024 or higher. The image runs as a non-root user (uid 65532), which can't bind privileged ports.
Once the server is up, query http://<host>:<HEALTH_CHECK_PORT>/health:
| HTTP status | Body | Meaning |
|---|---|---|
200 |
OK |
The location is connected to Escape |
503 |
Not connected |
The process is running but not connected yet |
For a Kubernetes Deployment that doesn't use the Helm chart, set the same environment variable and probe as the chart:
env:
- name: HEALTH_CHECK_PORT
value: "8080"
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 60
periodSeconds: 60
failureThreshold: 60
You can also use /health to restart a disconnected location. See Logging & Monitoring.