A lightweight, self-hostable CMS. Single Go binary. SQLite. Ships with a default Astro theme. No Docker required.
Most open source CMS options are either too heavy (WordPress, Ghost) or too opinionated about the frontend (Payload, Strapi). Folio is built for developers who self-host on a cheap VPS and want:
- A real Markdown editor out of the box
- A default frontend theme they can swap
- Zero external dependencies: no PostgreSQL, no Redis, no Docker
- One systemd service and done
- Go 1.21+
- Node.js 18+ and npm
- Git
- Linux or macOS
Note: Node.js 22 or later is required for the default theme (Astro 6).
Download and review the installer, then run it:
curl -O https://raw.githubusercontent.com/srmdn/foliocms/main/install.sh
bash install.sh
This will:
- Clone Folio and build the binary from source
- Clone and build the default Astro theme
- Create a
.envfile with a generatedJWT_SECRET - Run the first-time setup wizard to create your admin account
By default, everything is installed into ./folio/. To use a different directory:
bash install.sh --dir /opt/folio
After install:
cd folio
# Start the backend API (default port 8090)
./folio
# In a separate terminal: start the theme (default port 4321)
cd theme && node dist/server/entry.mjs
For production, run both as systemd services. See docs/configuration.md for all environment variables.
The installer runs --setup for you. If you need to re-run it later:
./folio --setup
This creates the admin account interactively. You can also set ADMIN_EMAIL and ADMIN_PASSWORD in .env instead.
All configuration is via .env. See docs/configuration.md for the full reference.
Key variables:
| Variable | Default | Description |
|---|---|---|
PORT |
8090 |
Backend API port |
JWT_SECRET |
(none) | Required. Generate with openssl rand -hex 32 |
CONTENT_DIR |
content/blog |
Path to Markdown content |
THEME_DIR |
theme |
Path to the theme directory |
THEME_BUILD_CMD |
npm run build |
Command to rebuild the theme |
THEME_SERVICE |
(none) | systemd service name to restart after rebuild |
Full API reference: docs/api.md
Folio ships with foliocms-theme-default, an Astro SSR theme. The installer sets it up automatically.
To build a custom theme, see docs/theme-contract.md.
- Backend: Go, Chi router, SQLite (
modernc.org/sqlite, pure Go, no CGo) - Auth: JWT (cookie + Bearer header) + stateless CSRF (HMAC-SHA256)
- Default theme: Astro SSR (separate repo)
- Content: Markdown files with YAML frontmatter in
content/blog/<slug>/index.md
MIT