Prerequisites
- Docker and Docker Compose installed
- Node.js 18 or later (for the Convex CLI)
Quick start
Download docker-compose.yml
Create a new directory and download the Docker Compose configuration:Or create a
docker-compose.yml file with this content:docker-compose.yml
Start the services
Launch the backend and dashboard:Wait for both services to start. You should see logs indicating the backend is ready.
Generate an admin key
In a new terminal, generate an admin key for the CLI:Save the generated admin key - you’ll need it in the next step.
Deploy your functions
Start the development server to deploy your Convex functions:This will:
- Push your schema and functions to the backend
- Generate TypeScript types
- Watch for changes and hot-reload
Verify your setup
Create a simple function to test your setup. In yourconvex/ directory, create messages.ts:
convex/messages.ts
What’s next?
Configure your database
Set up PostgreSQL or MySQL for production
Configure storage
Use S3-compatible storage for files
Explore features
Learn about database operations and queries
Build from source
Compile the backend yourself
Troubleshooting
Backend won't start
Backend won't start
Check that ports 3210 and 3211 are not already in use:Stop any conflicting services or change the ports in docker-compose.yml.
Can't connect to backend
Can't connect to backend
Verify the backend is running:If this fails, check the Docker logs:
Admin key not working
Admin key not working
Regenerate the admin key:Update your
.env.local file with the new key.Support
For self-hosting questions:- Join the
#self-hostedchannel on Discord - Check GitHub Issues
- Review the self-hosting documentation