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:

Image name
tzylo/auth-ce:latest

The container listens on port 7200.

Basic Run Command

The minimum required environment variables are:

  • DATABASE_URL
  • JWT_SECRET
docker run
docker run -p 7200:7200 \
  -e DATABASE_URL="postgresql://user:pass@host:5432/db" \
  -e JWT_SECRET="supersecret" \
  tzylo/auth-ce:latest

Port Mapping

The container exposes port 7200. You must map it explicitly to access the API from your host machine.

Port mapping
-p 7200:7200

If 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
Local database example
DATABASE_URL=postgresql://user:pass@host.docker.internal:5432/authdb
Using localhost 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:

Using env file
docker run -p 7200:7200 \
  --env-file .env \
  tzylo/auth-ce:latest

Logs and Debugging

To view container logs:

View 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