Docker Usage
Run Tzylo Auth CE in Docker with correct configuration and networking.
This page explains how to run Tzylo Auth CE inside a Docker container and avoid common configuration mistakes.
Docker Image
Tzylo Auth CE is distributed as a prebuilt Docker image:
tzylo/auth-ce:latestThe container listens on port 7200.
Basic Run Command
The minimum required environment variables are:
DATABASE_URLJWT_SECRET
docker run -p 7200:7200 \
-e DATABASE_URL="postgresql://user:pass@host:5432/db" \
-e JWT_SECRET="supersecret" \
tzylo/auth-ce:latestPort Mapping
The container exposes port 7200. You must map it explicitly to access the API from your host machine.
-p 7200:7200If you change the host port, update your client base URL accordingly.
Database Connectivity
The database must be reachable from inside the container.
Common scenarios:
- Cloud database → use public/private endpoint
- Database in another container → use Docker network name
- Local database → use
host.docker.internal
DATABASE_URL=postgresql://user:pass@host.docker.internal:5432/authdblocalhost inside Docker usually points to the container itself, not your host machine.Environment Variables
Environment variables can be passed using -e flags or an env file:
docker run -p 7200:7200 \
--env-file .env \
tzylo/auth-ce:latestLogs and Debugging
To view container logs:
docker logs <container-id>Startup failures are usually caused by missing or invalid environment variables, or database connectivity issues.
When should you use Docker?
- Running Auth CE in production
- Deploying to cloud providers
- Keeping runtime consistent across environments