This guide shows you how to deploy Convex using Docker Compose, the easiest way to get started with self-hosting.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/get-convex/convex-backend/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Docker and Docker Compose installed
- Latest version of the Convex npm package (
convex@latest)
Quick start
Start the services
Start the backend and dashboard:This will:
- Start the Convex backend on
http://127.0.0.1:3210 - Expose HTTP actions on
http://127.0.0.1:3211 - Start the dashboard on
http://localhost:6791 - Create a Docker volume for persistent data storage
Configure your Convex project
In your Convex project directory, create a
.env.local file with your deployment URL and admin key:.env.local
Docker Compose configuration
Thedocker-compose.yml file includes two services:
Backend service
Dashboard service
Customizing ports
You can customize the default ports by creating a.env file next to docker-compose.yml:
.env
Persistent storage
By default, data is stored in a Docker-managed volume nameddata. This volume persists even when containers are stopped or removed.
Pinning to a specific version
For production deployments, pin to a specific version instead of usinglatest:
.env file:
.env
Health checks
The backend includes a built-in health check endpoint:Accessing the dashboard
Visithttp://localhost:6791 in your browser. You’ll need to authenticate using the admin key generated in step 3.
Hosting on your own infrastructure
To run Convex on your own servers with custom domains:Set up routing
Configure your reverse proxy (nginx, Caddy, etc.) to forward requests:
https://api.my-domain.com→http://localhost:3210https://my-domain.com→http://localhost:3211https://dashboard.my-domain.com→http://localhost:6791
Next steps
Configuration
Configure environment variables and runtime options
Database setup
Connect to PostgreSQL or MySQL for production
Storage
Configure S3-compatible storage
Upgrading
Learn how to upgrade your self-hosted deployment