Skip to content
Sveltia CMS
Esc
↑↓navigate↵open⌘Jpreview
On this page

Sveltia CMS Additions

Sveltia CMS Additions is a free, self-hosted service that adds user roles, sign-in without GitHub, real-time entry locks, comments and shared API keys.

Sveltia CMS Additions is a free, open-source service that adds the features a team needs to Sveltia CMS. You deploy it to your own Cloudflare account, on the Workers Free plan, and connect it to your site’s GitHub repository.

It provides:

  • user management with admin, editor and viewer roles, and sign-in with a username and password, so people don’t need a GitHub account
  • entry locks, so two people don’t edit the same entry at once by accident, and a list of who else has an entry open, both updated in real time
  • a Conversation panel for comments on each entry, which appear in everyone’s open tabs as they’re posted
  • shared credentials: API keys and a deploy hook that an admin enters once for everyone
  • an Administration page in the CMS to manage all of it
  • multi-tenancy: several sites on one deployment, each with its own users and data — useful for agencies

To get started, follow the setup guide.

How It Works

Sveltia CMS Additions runs as a Cloudflare Worker, with a Durable Object that stores its data. It connects to your repository through a GitHub App of its own, which the setup wizard creates for you.

  • Signing in: people sign in to the service rather than to GitHub. It checks their account and role, then gives the browser a short-lived GitHub token limited to your site’s repository and to what their role allows.
  • Editing: the CMS uses that token to talk to GitHub directly. Content never passes through the service, so loading, editing and saving are just as fast as with any other GitHub sign-in.
  • Staying signed in: the CMS gets a new GitHub token from the service about once an hour.
  • Collaborating: each CMS tab keeps a WebSocket connection to the service, which pushes entry locks, comments and who has an entry open to every tab in real time, without a reload. Idle connections hibernate, so they cost nothing.

If the service goes down, people who are already signed in keep working until their GitHub token expires, which takes an hour at most. Entry locks show a notice that they’re unavailable, and saving still works.

Cost

Sveltia CMS Additions is designed to run on the Workers Free plan. It only handles sign-in, the hourly token refresh, user management, comments and small WebSocket messages, so a typical team stays well within the free allowances. The service is MIT-licensed, with no subscription and no usage fees of its own.

Security

  • Passwords: they never leave the browser. The CMS derives a hash from the password with PBKDF2 (600,000 iterations) before sending it, and the service hashes that again before storing it.
  • Secrets: sensitive data, such as the GitHub App’s private key, is stored encrypted, under a key protected by the admin secret you choose when deploying.
  • Revocation: demoting, disabling or signing out a user revokes their GitHub tokens on GitHub’s side right away, rather than waiting for them to expire.
  • Allowed domains: only the sites you list can use the service. An empty list allows none.

The setup guide ends with a checklist for securing your accounts and repository.

Requirements

  • Sveltia CMS v0.271.0 or later.
  • The GitHub backend. GitHub Enterprise isn’t supported yet.
  • A Cloudflare account. The Free plan is enough.
  • A GitHub account that can create a GitHub App and install it on the site’s repository.

Limitations

  • GitHub tokens can’t be limited to certain files or branches, so roles apply to the whole repository.
  • A GitHub collaborator who also has a CMS account keeps their own GitHub access. Giving them the viewer role only makes the CMS read-only for them.
  • For now, people can only sign in with a username and password, or with GitHub. Other identity providers are planned.

Planned Features

  • Support for other backends: GitLab, Gitea and Forgejo
  • Support for other serverless platforms, such as Vercel and Netlify
  • More sign-in methods, including Google, OpenID Connect providers and Cloudflare Access
  • Passkeys and two-factor authentication
  • Granular access control for users and roles, including the ability to restrict access to specific collections and locales1
  • Scheduled posts2
  • Private configuration3
  • Proxy for services that don’t support CORS, such as Cloudflare Images, DeepL Translate and Git LFS support for GitHub4

Footnotes

  1. Netlify/Decap CMS #7303 ↩

  2. Netlify/Decap CMS #263, #2034 ↩

  3. Netlify/Decap CMS #7874 ↩

  4. Netlify/Decap CMS #1206 ↩

Was this page helpful?