docker.recipes

Squidex CMS

intermediate

Open-source headless CMS with event sourcing and GraphQL.

Overview

Squidex is an open-source headless CMS built on .NET that implements event sourcing architecture, making it unique among content management systems. Originally created by Sebastian Stehle in 2017, Squidex stores all changes as immutable events, providing complete audit trails and the ability to replay system state at any point in time. This event-driven approach, combined with automatic GraphQL and REST API generation, makes it particularly powerful for modern application architectures requiring content versioning and real-time synchronization. This stack pairs Squidex with MongoDB 7 to provide both event storage and content persistence in a single database solution. MongoDB's document-oriented structure aligns perfectly with Squidex's flexible schema system, while its change streams enable real-time content updates across connected applications. The combination leverages MongoDB's aggregation framework for complex content queries and its horizontal scaling capabilities for growing content volumes. This configuration is ideal for development teams building headless applications, content creators managing multi-channel publishing workflows, and enterprises requiring comprehensive content audit trails. The event sourcing architecture makes this stack particularly valuable for applications needing content versioning, collaborative editing, or compliance with data governance requirements.

Key Features

  • Event sourcing architecture with complete audit trail and time-travel debugging capabilities
  • Auto-generated GraphQL and REST APIs from custom content schemas
  • Real-time content synchronization using MongoDB change streams
  • Flexible content modeling with dynamic field types and validation rules
  • Built-in content versioning and draft/publish workflows
  • Multi-language content support with field-level localization
  • Advanced content querying using MongoDB aggregation pipelines
  • Webhook system for triggering external integrations on content changes

Common Use Cases

  • 1Multi-channel content publishing for websites, mobile apps, and IoT devices
  • 2E-commerce platforms requiring product catalog management with price history
  • 3News and media sites needing editorial workflows and content scheduling
  • 4SaaS applications providing customizable user interfaces and content
  • 5Enterprise content hubs managing documentation across multiple departments
  • 6Digital agencies building headless websites for multiple clients
  • 7Compliance-heavy industries requiring complete content change auditing

Prerequisites

  • Minimum 2GB RAM available (MongoDB requires 1GB+, Squidex needs 512MB+)
  • Port 5000 available for Squidex web interface access
  • Valid email address and strong password for admin account setup
  • Basic understanding of headless CMS concepts and API consumption
  • Docker and Docker Compose installed with network creation permissions
  • Sufficient disk space for MongoDB data growth and event log storage

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 squidex:
3 image: squidex/squidex:latest
4 container_name: squidex
5 restart: unless-stopped
6 environment:
7 URLS__BASEURL: http://localhost:5000
8 EVENTSTORE__TYPE: MongoDb
9 EVENTSTORE__MONGODB__CONFIGURATION: mongodb://mongodb
10 STORE__TYPE: MongoDb
11 STORE__MONGODB__CONFIGURATION: mongodb://mongodb
12 IDENTITY__ADMINEMAIL: ${ADMIN_EMAIL}
13 IDENTITY__ADMINPASSWORD: ${ADMIN_PASSWORD}
14 ports:
15 - "5000:5000"
16 depends_on:
17 - mongodb
18 networks:
19 - squidex-network
20
21 mongodb:
22 image: mongo:7
23 container_name: squidex-mongodb
24 volumes:
25 - mongodb_data:/data/db
26 networks:
27 - squidex-network
28
29volumes:
30 mongodb_data:
31
32networks:
33 squidex-network:
34 driver: bridge

.env Template

.env
1ADMIN_EMAIL=admin@example.com
2ADMIN_PASSWORD=changeme123

Usage Notes

  1. 1Docs: https://docs.squidex.io/
  2. 2Access at http://localhost:5000 - login with ADMIN_EMAIL/ADMIN_PASSWORD
  3. 3Event sourcing: full audit trail, time travel debugging
  4. 4GraphQL and REST APIs auto-generated from schemas
  5. 5Built on .NET 8, MongoDB for storage
  6. 6Strong password required (min 8 chars, mixed case, numbers)

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

squidex
squidex:
  image: squidex/squidex:latest
  container_name: squidex
  restart: unless-stopped
  environment:
    URLS__BASEURL: http://localhost:5000
    EVENTSTORE__TYPE: MongoDb
    EVENTSTORE__MONGODB__CONFIGURATION: mongodb://mongodb
    STORE__TYPE: MongoDb
    STORE__MONGODB__CONFIGURATION: mongodb://mongodb
    IDENTITY__ADMINEMAIL: ${ADMIN_EMAIL}
    IDENTITY__ADMINPASSWORD: ${ADMIN_PASSWORD}
  ports:
    - "5000:5000"
  depends_on:
    - mongodb
  networks:
    - squidex-network
mongodb
mongodb:
  image: mongo:7
  container_name: squidex-mongodb
  volumes:
    - mongodb_data:/data/db
  networks:
    - squidex-network

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 squidex:
5 image: squidex/squidex:latest
6 container_name: squidex
7 restart: unless-stopped
8 environment:
9 URLS__BASEURL: http://localhost:5000
10 EVENTSTORE__TYPE: MongoDb
11 EVENTSTORE__MONGODB__CONFIGURATION: mongodb://mongodb
12 STORE__TYPE: MongoDb
13 STORE__MONGODB__CONFIGURATION: mongodb://mongodb
14 IDENTITY__ADMINEMAIL: ${ADMIN_EMAIL}
15 IDENTITY__ADMINPASSWORD: ${ADMIN_PASSWORD}
16 ports:
17 - "5000:5000"
18 depends_on:
19 - mongodb
20 networks:
21 - squidex-network
22
23 mongodb:
24 image: mongo:7
25 container_name: squidex-mongodb
26 volumes:
27 - mongodb_data:/data/db
28 networks:
29 - squidex-network
30
31volumes:
32 mongodb_data:
33
34networks:
35 squidex-network:
36 driver: bridge
37EOF
38
39# 2. Create the .env file
40cat > .env << 'EOF'
41ADMIN_EMAIL=admin@example.com
42ADMIN_PASSWORD=changeme123
43EOF
44
45# 3. Start the services
46docker compose up -d
47
48# 4. View logs
49docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/squidex/run | bash

Troubleshooting

  • Identity validation failed error: Ensure ADMIN_PASSWORD meets complexity requirements (8+ characters, mixed case, numbers)
  • MongoDB connection timeout: Check that mongodb container is fully started before squidex attempts connection
  • Port 5000 already in use: Change the host port mapping from 5000:5000 to another port like 5001:5000
  • Event store initialization failed: Clear mongodb_data volume and restart containers to reset database state
  • GraphQL schema not updating: Clear browser cache and wait for Squidex schema compilation to complete
  • High memory usage: Monitor MongoDB memory consumption and consider setting wiredTiger cache limits

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Components

squidexmongodb

Tags

#squidex#headless#event-sourcing#dotnet#graphql

Category

CMS & Blogging
Ad Space