---
title: 'Cockpit CMS'
url: 'https://www.handtrixxx.com/de/wiki/self-hosted/cockpit-cms'
markdown: 'https://www.handtrixxx.com/de/wiki/self-hosted/cockpit-cms.md'
lang: de
date: '2026-11-05'
description: 'Cockpit CMS Verifiziert: Stand des Betriebs 2022, die Website-Generation vor nCMS; Konfigurationsdateien wie damals im Einsatz. Motivation und Geschichte: Blog-Beitrag Die (fast) perfekte Website – Konzept. Architektur der Headless-CMS-Website-Generation von niklas-stephan.de: Agentejo Cockpit (hea…'
---

#  Cockpit CMS 

*Verifiziert: Stand des Betriebs 2022, die Website-Generation vor nCMS; Konfigurationsdateien wie damals im Einsatz. Motivation und Geschichte: Blog-Beitrag [Die (fast) perfekte Website – Konzept](https://www.handtrixxx.com/de/blog/die-beinahe-perfekte-website-konzept).*

Architektur der Headless-CMS-Website-Generation von niklas-stephan.de: [Agentejo Cockpit](https://getcockpit.com/) (headless CMS) für Inhalte, Node-RED für den statischen Build, Auslieferung aus der RAM-Disk.

![Website-Webshot](https://www.handtrixxx.com/user/pages/wiki/02.self-hosted/cockpit-cms/webshot-scaled-1.webp)

## Werkzeug-Stack

- **Cockpit (Agentejo)** – WCMS mit sauberer Trennung von Backend/Frontend, Media-Verwaltung und integrierter HTTP-API; Webhooks lösen Builds aus.
- **Node-RED** – Build-Pipeline (hier nicht als IoT genutzt, es zählt die Flow-Engine).
- **Bootstrap 5** – Frontend-Gerüst; kein jQuery, vanilla JS.
- **VS Code** – Bearbeitung von Templates, CSS, JS; git für Versionierung.
- Begleitdienste: Nginx Reverse Proxy Manager, Let's Encrypt, Matomo, Docker/Docker-Compose.

## Inhaltsmodell und Pipeline

Statische HTML-Inhalte liegen in Cockpit-**Singletons** (mit Attributen wie Sprache und Version); Posts in einer **Collection**, eine Cockpit-Instanz kann also mehrere Websites bedienen. Bilder werden in Cockpit mit automatischen Thumbnails verwaltet. Die Website wird bei Bedarf generiert:

1. Start des Deployments manuell oder per Webhook (Cockpit feuert beim Speichern einen Webhook).
2. Einsammeln aller statischen Quellen.
3. Einsammeln aller vorhandenen Singletons und Posts.
4. Dynamische Erzeugung der Metadaten.
5. Rendern der einzelnen Seiten.
6. Speichern der Seiten auf Disk und im Speicher.

Die generierten Dateien landen in `/dev/shm` (RAM-Disk); der Reverse Proxy liefert von dort – ein CDN war nicht nötig. Der komplette Build dauerte 0,099 s auf einem Shared-Server.

## Compose: Cockpit

```yaml
<span class="hljs-attr">services:</span>
  <span class="hljs-attr">cms-db:</span>
    <span class="hljs-attr">image:</span> <span class="hljs-string">'mongo:latest'</span>
    <span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>
    <span class="hljs-attr">volumes:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">'./db:/data/db'</span>
    <span class="hljs-attr">networks:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">default</span>
    <span class="hljs-attr">logging:</span>
      <span class="hljs-attr">options:</span>
        <span class="hljs-attr">max-size:</span> <span class="hljs-string">"10m"</span>
        <span class="hljs-attr">max-file:</span> <span class="hljs-string">"3"</span>
  <span class="hljs-attr">cms:</span>
    <span class="hljs-attr">image:</span> <span class="hljs-string">agentejo/cockpit</span>
    <span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>
    <span class="hljs-attr">volumes:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">'./cms/config.php:/var/www/html/config/config.php'</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">'./cms/defines.php:/var/www/html/config/defines.php'</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">'./storage:/var/www/html/storage'</span>
    <span class="hljs-attr">environment:</span>
        <span class="hljs-attr">COCKPIT_SESSION_NAME:</span> <span class="hljs-string">SESSION</span>
        <span class="hljs-attr">COCKPIT_SALT:</span> <span class="hljs-string">SALT</span>
        <span class="hljs-attr">COCKPIT_DATABASE_SERVER:</span> <span class="hljs-string">'mongodb://cms-db:27017'</span>
        <span class="hljs-attr">COCKPIT_DATABASE_NAME:</span> <span class="hljs-string">DBNAME</span>
    <span class="hljs-attr">depends_on:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">cms-db</span>
    <span class="hljs-attr">ports:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">"8080:80"</span>
    <span class="hljs-attr">networks:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-string">default</span>
    <span class="hljs-attr">logging:</span>
      <span class="hljs-attr">options:</span>
        <span class="hljs-attr">max-size:</span> <span class="hljs-string">"10m"</span>
        <span class="hljs-attr">max-file:</span> <span class="hljs-string">"3"</span>
<span class="hljs-attr">volumes:</span>
  <span class="hljs-attr">mongo-vol:</span> <span class="hljs-literal">null</span>
```

![Cockpit-Backend](https://www.handtrixxx.com/user/pages/wiki/02.self-hosted/cockpit-cms/02-cockpit-2048x1230.webp)

## Compose: Node-RED-Build-Pipeline

```yaml
<span class="hljs-attr">services:</span>
  <span class="hljs-attr">node-red:</span>
    <span class="hljs-attr">image:</span> <span class="hljs-string">nodered/node-red:latest</span>
    <span class="hljs-attr">restart:</span> <span class="hljs-string">always</span>
    <span class="hljs-attr">environment:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">TZ=Europe/Berlin</span>
    <span class="hljs-attr">ports:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">"1880:1880"</span>
    <span class="hljs-attr">networks:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">default</span>
    <span class="hljs-attr">logging:</span>
      <span class="hljs-attr">options:</span>
        <span class="hljs-attr">max-size:</span> <span class="hljs-string">"10m"</span>
        <span class="hljs-attr">max-file:</span> <span class="hljs-string">"3"</span>
    <span class="hljs-attr">volumes:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">./data:/data</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">./templates:/templates</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">./static:/static</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">/etc/localtime:/etc/localtime:ro</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">/dev/shm/nsde:/ramdisk</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">./development:/development</span>
```

![VS Code als Bearbeitungszentrale](https://www.handtrixxx.com/user/pages/wiki/02.self-hosted/cockpit-cms/03-vscode.webp)

## Nachfolger

Diese Generation wurde durch [ncms](https://www.handtrixxx.com/de/wiki/self-hosted/ncms) ersetzt (eigenes Node-RED-Flat-File-CMS, 2022–2024), und dieses durch den heutigen Grav-Stack (siehe [den Website-Relaunch-Beitrag](https://www.handtrixxx.com/de/blog/website-relaunch-2026)).

 self-hostedcmswebretired

---

## Navigation

- Parent: [Selbst gehostet](https://www.handtrixxx.com/de/wiki/self-hosted.md)
- Previous: [Calibre Web](https://www.handtrixxx.com/de/wiki/self-hosted/calibre-web.md)
- Next: [Data Mesh Manager](https://www.handtrixxx.com/de/wiki/self-hosted/data-mesh-manager.md)
