Skip to content

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.

Terminal window
git clone https://github.com/inlinecms/inlinecms
cd inlinecms/docker
# Create your environment file
cp ../apps/api/.env.example .env

Edit .env with your values:

Terminal window
DATABASE_URL=postgresql://postgres:postgres@postgres:5432/inlinecms
JWT_SECRET=your-secret-here-at-least-32-characters-long

Start everything:

Terminal window
docker-compose up

The API runs at http://localhost:3001 and serves the dashboard at the same origin.

After the server starts, create a project and admin user:

Terminal window
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.

vite.config.ts
inlineCMS({
apiKey: 'your-api-key',
apiUrl: 'https://cms.yourdomain.com',
})

The docker-compose.yml runs two services:

ServiceDescription
postgresPostgreSQL 16 Alpine with health checks
apiInlineCMS API + dashboard, auto-runs migrations on start

For production, update the docker-compose.yml:

  1. Change JWT_SECRET to a strong random value
  2. Set proper POSTGRES_PASSWORD
  3. Configure a reverse proxy (nginx, Caddy) for HTTPS
  4. Optionally configure S3/R2 for media storage
  5. Optionally enable Google/GitHub sign-in — see OAuth Sign-In
Was this page helpful? Your feedback goes straight to the docs team.