cockpit-hq / cockpit
Cockpit Content Platform
Installs: 76
Dependents: 0
Suggesters: 0
Security: 20
Stars: 471
Watchers: 11
Forks: 68
Open Issues: 56
Type:project
Requires
- php: ^8.3.0
- ext-curl: *
- ext-fileinfo: *
- ext-gd: *
- ext-json: *
- ext-pdo: *
- ext-pdo_sqlite: *
- ext-zip: *
- bacon/bacon-qr-code: ^3.0
- claviska/simpleimage: ^4.0
- colinodell/json5: ^2.2
- doctrine/annotations: ^2.0
- firebase/php-jwt: ^6.0
- guzzlehttp/guzzle: ^7.4.5
- ksubileau/color-thief-php: ^2.0
- league/flysystem: ^3.0
- league/flysystem-aws-s3-v3: ^3.0
- maennchen/zipstream-php: ^3.1.0
- mongodb/mongodb: ^2.0.0
- phpmailer/phpmailer: ^6.4
- robthree/twofactorauth: ^3.0
- symfony/console: ^5.3
- symfony/polyfill-mbstring: ^1.22
- symfony/polyfill-php84: ^1.30
- symfony/process: ^6.2
- webonyx/graphql-php: ^15.0
- zircote/swagger-php: ^4.5.1
- dev-develop
- 2.11.4
- 2.11.3
- 2.11.2
- 2.11.1
- 2.11.0
- 2.10.3
- 2.10.2
- 2.10.1
- 2.10.0
- 2.9.4
- 2.9.3
- 2.9.2
- 2.9.1
- 2.9.0
- 2.8.6
- 2.8.5
- 2.8.4
- 2.8.3
- 2.8.2
- 2.8.1
- 2.8.0
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.3
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.9
- 2.3.8
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.2
- 2.0.1
- 2.0.0
- dev-master
This package is auto-updated.
Last update: 2025-07-16 10:19:51 UTC
README
Modern, flexible CMS that adapts to your workflow
Cockpit is a headless CMS that gives you the flexibility to build content-driven applications your way. Whether you're creating websites, mobile apps, or IoT applications, Cockpit provides the content infrastructure you need.
β¨ Why Developers Choose Cockpit
- π Headless by Design - Use any frontend technology (React, Vue, Flutter, etc.)
- π Flexible Content Models - Collections, Singletons, and Trees with custom fields
- π GraphQL & REST APIs - Modern APIs with real-time capabilities
- π Multi-language Support - Built-in internationalization for global applications
- π¨ No Vendor Lock-in - Own your data, deploy anywhere
- β‘ Performance First - MongoDB or SQLite backend, your choice
π Quick Start
Get Cockpit running in under 5 minutes:
Option 1: Traditional Setup
# Download and extract wget https://github.com/cockpit-hq/cockpit/releases/latest/download/cockpit.zip unzip cockpit.zip && cd cockpit # Make storage writable chmod -R 755 storage/ # Open in browser and complete setup open http://localhost/cockpit/install
Option 2: Docker (Recommended)
# Run Cockpit with persistent storage docker run -d \ --name cockpit \ -p 8080:80 \ -v cockpit_storage:/var/www/html/storage \ cockpithq/cockpit:core-latest # Access at http://localhost:8080/install
Start Building
Once installed, create content models through the admin UI or via API:
// Fetch your content anywhere fetch('/api/content/items/blog') .then(res => res.json()) .then(posts => { // Use in React, Vue, mobile apps, etc. console.log('My content:', posts); });
π οΈ Key Features
Feature | Description |
---|---|
Content Modeling | Collections, Singletons, Trees with 20+ field types |
Asset Management | Image processing, video thumbnails, CDN integration |
User Management | Roles, permissions, 2FA, API tokens |
Multi-language | Localized content with fallback support |
Developer Tools | GraphQL playground, REST docs, CLI commands |
Extensibility | Custom fields, addons, hooks, events |
Multi-tenancy | Spaces for multiple sites and clients |
π System Requirements
- PHP >= 8.3 with PDO, GD extensions
- Database SQLite (default) or MongoDB
- Web Server Apache with mod_rewrite or Nginx
- Permissions Writable
/storage
directory
Ensure $_SERVER['DOCUMENT_ROOT']
is properly configured.
π API Examples
REST API
# Get all published blog posts curl "https://yoursite.com/api/content/items/blog?filter={tags:'cms'}" # Get single post by ID curl "https://yoursite.com/api/content/item/blog/60f1b2b3c4d5e6f7a8b9c0d1" # Create new post curl -X POST "https://yoursite.com/api/content/item/blog" \ -H "Cockpit-Token: your-token" \ -H "Content-Type: application/json" \ -d '{"title":"New Post","content":"Content here","tags":["cms"]}'
GraphQL
# Query blog posts with pagination query GetBlogPosts($limit: Int, $skip: Int) { blog(limit: $limit, skip: $skip, filter: {tags: "cms"}) { _id title content _created _modified } } # Create new blog post mutation CreatePost($data: JSON!) { saveContentItem(model: "blog", data: $data) { _id title } }
π Resources
- Documentation - Complete guides and API reference
- GitHub - Source code and issues
- Community Forum - Get help and share knowledge
π± Use Cases
- Headless Websites - Static sites with JAMstack
- Mobile Apps - iOS/Android with native or hybrid frameworks
- E-commerce - Product catalogs and content management
- Corporate Sites - Multi-language corporate websites
- IoT Dashboards - Content for smart devices and displays
- Multi-tenant SaaS - Content infrastructure for platforms
π³ Docker
Run Cockpit in containers for consistent, scalable deployments across any environment.
Quick Start with Docker
# Run with SQLite (development) docker run -d \ --name cockpit \ -p 8080:80 \ -v cockpit_storage:/var/www/html/storage \ cockpithq/cockpit:core-latest # Access at http://localhost:8080/install
Production Setup with MongoDB
# docker-compose.yml version: '3.8' services: cockpit: image: cockpithq/cockpit:core-latest ports: - "80:80" environment: - COCKPIT_DATABASE_SERVER=mongodb://mongo:27017 - COCKPIT_DATABASE_NAME=cockpit volumes: - ./storage:/var/www/html/storage - ./config:/var/www/html/config depends_on: - mongo mongo: image: mongo:8 volumes: - mongo_data:/data/db environment: - MONGO_INITDB_DATABASE=cockpit volumes: mongo_data:
Configuration
Create a config/config.php
file and mount it to connect to MongoDB:
<?php // config/config.php return [ 'database' => [ 'server' => $_ENV['COCKPIT_DATABASE_SERVER'] ?? 'mongodb://mongo:27017', 'database' => $_ENV['COCKPIT_DATABASE_NAME'] ?? 'cockpit' ], 'sec-key' => $_ENV['COCKPIT_SEC_KEY'] ?? 'your-random-security-key' ];
Mount config via Docker Compose:
volumes: - ./config:/var/www/html/config
Or create custom Docker image:
FROM cockpithq/cockpit:core-latest COPY ./config/config.php /var/www/html/config/config.php
Available Tags
core-latest
- Latest stable releasecore-{version}
- Specific version tagspro-latest
- Latest pro stable releasepro-{version}
- Specific pro version tags
Visit Docker Hub for all available tags.
π Partners
We create websites and apps that click with users.
Live, Web-Based Browser Testing
π Sponsors
Become a backer or sponsor through:
Thank you to all our backers! π
Copyright and license
Copyright since 2015 π °π Άπ ΄π ½ππ ΄π Ήπ Ύ under the MIT license.
See LICENSE for more information.