Complete guide to install and update Road To on your own infrastructure with Docker and docker-compose.selfhost.yml.
This guide covers self-hosting Road To with Docker, from pulling the image to updating an existing instance. For pricing and licensing, see the Pricing page.
app service)Pull the official Road To Docker image, published on Docker Hub as baptman87/road-to-next (multi-arch amd64/arm64):
docker pull baptman87/road-to-next
The self-hosted stack references this image by default through the ROADTO_IMAGE variable in docker-compose.selfhost.yml:
services:
app:
image: ${ROADTO_IMAGE:-baptman87/road-to-next:latest}
docker-compose.selfhost.yml and .env.example from the Road To repository.cp .env.example .env
docker compose -f docker-compose.selfhost.yml up -d
The stack starts three services: app (Road To), postgres (PostgreSQL 17) and redis (Redis 7). The app service waits for postgres and redis to be healthy before starting.
.envThe .env file (based on .env.example) configures the application and the database. Main variables:
| Variable | Description |
|---|---|
POSTGRES_PASSWORD | PostgreSQL password — required, no default value |
POSTGRES_USER / POSTGRES_DB | PostgreSQL user and database (default: roadto) |
BETTER_AUTH_URL | Public URL of the instance (e.g. https://roadto.yourdomain.com) |
BETTER_AUTH_SECRET | Session secret — generate with openssl rand -base64 32 |
APP_PORT | Port exposed on the host (default 3000) |
RESEND_API_KEY / EMAIL_FROM | Transactional email delivery (required) |
GEMINI_API_KEY / AI_CHAT_HMAC_SECRET | AI assistant and template generation (optional) |
GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET, GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET | OAuth sign-in (optional) |
DATABASE_URL, DATABASE_URL_UNPOOLED and REDIS_URL are built automatically by docker-compose.selfhost.yml from the postgres and redis services — do not set them manually in compose mode.
No manual database step is required: the image automatically applies Prisma migrations when the app container starts (entrypoint prisma migrate deploy), once postgres is ready.
Once the stack is up, the application is available at http://localhost:${APP_PORT:-3000} (or the URL configured via BETTER_AUTH_URL behind your reverse proxy). Create your first account and organization from the sign-up screen.
To update an existing instance to the latest image version:
docker compose -f docker-compose.selfhost.yml pull
docker compose -f docker-compose.selfhost.yml up -d
Prisma migrations are automatically reapplied when the app container restarts, with no manual step.