PHPackages                             cockpit-hq/cockpit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. cockpit-hq/cockpit

ActiveProject[API Development](/categories/api)

cockpit-hq/cockpit
==================

Cockpit Content Platform

2.14.0(1mo ago)68111280[56 issues](https://github.com/Cockpit-HQ/Cockpit/issues)[3 PRs](https://github.com/Cockpit-HQ/Cockpit/pulls)MITPHPPHP ^8.3.0CI failing

Since Jul 13Pushed 1mo ago12 watchersCompare

[ Source](https://github.com/Cockpit-HQ/Cockpit)[ Packagist](https://packagist.org/packages/cockpit-hq/cockpit)[ Docs](https://getcockpit.com/)[ RSS](/packages/cockpit-hq-cockpit/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (40)Versions (63)Used By (0)Security (21)

Cockpit CMS - Headless Content Management
=========================================

[](#cockpit-cms---headless-content-management)

[![cockpit banner](https://private-user-images.githubusercontent.com/321047/385493542-c8d4daf1-86cc-45c9-be24-5c6a6a2ca8ca.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUwMTU3MjYsIm5iZiI6MTc3NTAxNTQyNiwicGF0aCI6Ii8zMjEwNDcvMzg1NDkzNTQyLWM4ZDRkYWYxLTg2Y2MtNDVjOS1iZTI0LTVjNmE2YTJjYThjYS5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwMVQwMzUwMjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04NTZlOGY5NmNiODRkYWMzMGJhZDk5YTUxOWZkMDE4Mjc3OGZhNDQyZjQxZjlmYTkzMGU2YzUxYmE0ODJlMGY0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.6n-mPBMHRSUMJhKOL2t07zf9f2ocgumj-wqmwCBwdmc)](https://private-user-images.githubusercontent.com/321047/385493542-c8d4daf1-86cc-45c9-be24-5c6a6a2ca8ca.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUwMTU3MjYsIm5iZiI6MTc3NTAxNTQyNiwicGF0aCI6Ii8zMjEwNDcvMzg1NDkzNTQyLWM4ZDRkYWYxLTg2Y2MtNDVjOS1iZTI0LTVjNmE2YTJjYThjYS5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwMVQwMzUwMjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04NTZlOGY5NmNiODRkYWMzMGJhZDk5YTUxOWZkMDE4Mjc3OGZhNDQyZjQxZjlmYTkzMGU2YzUxYmE0ODJlMGY0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.6n-mPBMHRSUMJhKOL2t07zf9f2ocgumj-wqmwCBwdmc)

> **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
-------------------------------

[](#-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 &amp; 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
-------------

[](#-quick-start)

Get Cockpit running in under 5 minutes:

### Option 1: Traditional Setup

[](#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)

[](#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

[](#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
---------------

[](#️-key-features)

FeatureDescription**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
---------------------

[](#-system-requirements)

- **PHP** &gt;= 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
--------------

[](#-api-examples)

### REST API

[](#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

[](#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
-----------

[](#-resources)

- **[Documentation](https://getcockpit.com/documentation)** - Complete guides and API reference
- **[GitHub](https://github.com/cockpit-hq/cockpit)** - Source code and issues
- **[Community Forum](https://discourse.getcockpit.com)** - Get help and share knowledge

📱 Use Cases
-----------

[](#-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
--------

[](#-docker)

Run Cockpit in containers for consistent, scalable deployments across any environment.

### Quick Start with Docker

[](#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

[](#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

[](#configuration)

Create a `config/config.php` file and mount it to connect to MongoDB:

```
