Cockpit
Headless PHP CMS and content API. Define flexible content collections and singletons through a UI, then query them via REST or GraphQL. No rigid page structure — just a content backend your frontend consumes
Quick Start
docker run -d -p 8080:8080 -v cockpit_data:/var/www/html/storage agentejo/cockpit Overview
Cockpit is a headless PHP CMS that acts as a content API backend. You define Collections (repeating content types like posts or products) and Singletons (single structured records like site settings or a homepage hero) through a browser UI. Cockpit generates REST and GraphQL endpoints automatically. Your frontend — whatever framework or platform — queries those endpoints to get clean JSON.
The key difference from CMSes like WordPress or Drupal is that Cockpit has no frontend at all. There are no page templates, no theme system, and no output rendering. It is purely a content management backend with an API layer. For teams building decoupled frontends with Next.js, Astro, or a mobile app, this is a feature. For teams that want a CMS to also handle page rendering, it is not the right tool.
The content model is built through the admin UI. Add fields — text, rich text, image, boolean, date, relationship, or custom types — and the schema is live immediately. No migrations to run, no YAML to edit. This makes Cockpit fast to prototype with and easy to reshape as requirements change.
The default database backend is SQLite, which runs without a separate container. MongoDB is also supported for larger content volumes. The entire stack is PHP, which means it runs on shared hosting, VPS, or Docker without needing a Node.js runtime.
With 718 GitHub stars, Cockpit is a niche tool compared to Strapi or Directus. The community is smaller, and third-party integrations are limited. For developers who want a clean, minimal content API without the weight of a full CMS, it covers the fundamentals well.
Cockpit: Pros & Cons
| Pros (The Wins) | Cons (The Friction) |
|---|---|
| Flexible content model: Collections and singletons defined through the UI. | API only: No page rendering; requires a separate frontend. |
| Auto REST + GraphQL: Endpoints generated from your content model. | Small community: 718 stars; limited plugins and third-party integrations. |
| SQLite default: No separate database container needed. | Basic permissions: Complex multi-role access requires custom work. |
| Standard PHP: Runs on any host; no Node.js required. | Thin documentation: Edge cases left to GitHub issues. |
Use Cases
Specific ways to use Cockpit for your workflow.
Deployment Strategy
Recommended ways to host Cockpit in your own environment.