Decap CMS Proxy Server

3.7.0 · active · verified Tue Apr 21

Decap CMS Proxy Server (`decap-server`) is a lightweight Node.js Express server designed to facilitate local development with Decap CMS, particularly when using `git-gateway` or `proxy` backends. It acts as an unauthenticated intermediary between your local Decap CMS instance and a Git repository (e.g., GitHub, GitLab), allowing content changes to be saved directly to your local files during development without needing a live backend connection. The current stable version is 3.7.0, with releases typically following the frequent cadence of the broader Decap CMS project (major, minor, and patch releases occurring regularly). Its key differentiator is simplifying the local development workflow for Decap CMS by abstracting Git operations, making it an essential tool for local content authoring and testing.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates setting up `config.yml` for Decap CMS to use the local proxy server, then starting `decap-server`.

{
  "backend": {
    "name": "git-gateway",
    "branch": "main",
    "local_backend": {
      "url": "http://localhost:8081/api/v1"
    }
  },
  "media_folder": "public/uploads",
  "public_folder": "/uploads",
  "collections": [
    {
      "name": "posts",
      "label": "Posts",
      "folder": "content/posts",
      "create": true,
      "fields": [
        { "label": "Title", "name": "title", "widget": "string" },
        { "label": "Publish Date", "name": "date", "widget": "datetime" },
        { "label": "Body", "name": "body", "widget": "markdown" }
      ]
    }
  ]
}
// Save the above as public/admin/config.yml

// Then, in your project root, run the server:
// npx decap-server

// If port 8081 is in use, create a .env file:
// PORT=8082
// npx decap-server

view raw JSON →