Docker Setup
Run InlineCMS on your own infrastructure with Docker Compose.
InlineCMS is designed for easy self-hosting. One docker-compose up gets you a fully working instance with PostgreSQL, the API, and the dashboard.
Quick start
Section titled “Quick start”git clone https://github.com/inlinecms/inlinecmscd inlinecms/docker
# Create your environment filecp ../apps/api/.env.example .envEdit .env with your values:
DATABASE_URL=postgresql://postgres:postgres@postgres:5432/inlinecmsJWT_SECRET=your-secret-here-at-least-32-characters-longStart everything:
docker-compose upThe API runs at http://localhost:3001 and serves the dashboard at the same origin.
Creating your first project
Section titled “Creating your first project”After the server starts, create a project and admin user:
curl -X POST http://localhost:3001/v1/projects \ -H 'Content-Type: application/json' \ -d '{ "name": "My Site", "admin": { "email": "admin@example.com", "password": "your-secure-password" } }'Save the apiKey from the response — you’ll need it for the SDK.
Pointing the SDK at your instance
Section titled “Pointing the SDK at your instance”inlineCMS({ apiKey: 'your-api-key', apiUrl: 'https://cms.yourdomain.com',})Docker Compose services
Section titled “Docker Compose services”The docker-compose.yml runs two services:
| Service | Description |
|---|---|
postgres | PostgreSQL 16 Alpine with health checks |
api | InlineCMS API + dashboard, auto-runs migrations on start |
Production deployment
Section titled “Production deployment”For production, update the docker-compose.yml:
- Change
JWT_SECRETto a strong random value - Set proper
POSTGRES_PASSWORD - Configure a reverse proxy (nginx, Caddy) for HTTPS
- Optionally configure S3/R2 for media storage
- Optionally enable Google/GitHub sign-in — see OAuth Sign-In
Was this page helpful? Your feedback goes straight to the docs team.