Already have a server running? Skip to the Quick Start to
install the CLI and start managing content.
Prerequisites
You need Docker and Docker Compose installed. No other runtime (Bun, Node.js) is required for running the server.- macOS
- Linux
- Windows
bash brew install --cask docker Setup
1
Get the MDCMS source
2
Configure environment variables
Copy the example environment file and review it:The defaults work for local evaluation. For production, you should change database credentials, S3 keys, and configure auth providers. See the environment variables section below.
3
Start all services
- MDCMS Server on port
4000— the API backend - PostgreSQL 16 on port
5432— primary database - Redis 7 on port
6379— sessions and caching - MinIO on ports
9000/9001— S3-compatible object storage - Mailhog on ports
1025/8025— email capture (dev/staging)
4
Verify the server is healthy
200 OK response. If the server is still starting, wait a few seconds and try again.Service Endpoints
First Boot
After the server starts, you need to create your first user and connect the CLI.Create an admin user
Open the Studio UI from your host app (see Embed the Studio UI below), or use the CLI to authenticate:Connect the CLI
Initialize a project against your server:Embed the Studio UI
Add the visual content editor to your application. Install@mdcms/studio and mount it on a catch-all route in your app. See the Integration Guide for full step-by-step instructions covering Studio embedding, MDX components, authentication, and CORS setup.
Environment Variables
Required
These must be set for the server to start. The Docker Compose defaults handle these automatically for local use.Server
Studio
Auth Providers (optional)
Configure SSO providers for your organization. Providers are enabled by presence — no feature flag is needed.Example OIDC provider config
Example OIDC provider config
Example SAML provider config
Example SAML provider config
Production Considerations
Security
- Set strong, unique values for
S3_ACCESS_KEY,S3_SECRET_KEY, and database credentials - Configure
MDCMS_STUDIO_ALLOWED_ORIGINSto restrict CORS to your actual Studio host domain - Set
NODE_ENV=productionto enable secure cookie defaults and disable development features - Remove
MDCMS_AUTH_INSECURE_COOKIES(or set tofalse) when running behind HTTPS - Replace Mailhog with a production SMTP provider
Persistence
The Docker Compose configuration uses named volumes (pgdata, miniodata) for PostgreSQL and MinIO. These persist across container restarts. To back up your data:
Upgrading
To upgrade to a newer version of MDCMS:Using an External Database
To use an existing PostgreSQL instance instead of the bundled container, setDATABASE_URL to your external connection string and remove the postgres service from docker-compose.yml. The same applies to Redis (REDIS_URL) and S3-compatible storage (S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY).
Stopping and Resetting
Next Steps
Quick Start
Install the CLI, define your schema, and start managing content
CLI Commands
Push, pull, login, schema sync, and all CLI flags
Studio Guide
Embed the visual content editor in your application
API Reference
REST API endpoints, authentication, and the TypeScript SDK