Posts

A self-hosted blog CMS built in Go.
- Single Go binary with embedded assets
- Password authentication with session cookies
- Create, edit, publish, and delete blog posts with markdown
- Static pages with custom navigation links
- File uploads with admin management
- Custom CSS support from the admin panel
- RSS feed at
/feed.xml - Dark themed UI with Commit Mono font
- SQLite for persistent storage
Configure
Environment Variables
| Variable | Description | Default |
|---|---|---|
POSTS_PASSWORD | Password for admin login | changeme |
POSTS_DB_PATH | SQLite database file path | posts.sqlite |
UPLOADS_DIR | Directory for uploaded files (used when R2 unset) | uploads |
SITE_URL | Public URL for RSS feed and links | http://localhost:3000 |
HOST | Server bind address | 127.0.0.1 |
PORT | Server port | 3000 |
COOKIE_SECURE | Enable HTTPS-only cookies | false |
R2_BUCKET | Cloudflare R2 bucket name (enables R2 storage) | (unset) |
R2_ACCOUNT_ID | Cloudflare account ID | (unset) |
R2_ACCESS_KEY_ID | R2 access key ID | (unset) |
R2_SECRET_ACCESS_KEY | R2 secret access key | (unset) |
R2_PUBLIC_URL | Public URL prefix for uploaded files | (unset) |
Upload storage falls back to local filesystem (UPLOADS_DIR) when R2_BUCKET is empty. Set all five R2_* variables to switch uploads to Cloudflare R2.
Deploy
Railway
The easiest way to deploy Posts is with the one-click Railway template. See the Deploying with Railway guide for a walkthrough of the process. Posts requires POSTS_PASSWORD and SITE_URL to be set during the configure step.
Docker
cd apps/posts
cp .env.example .env
# Edit .env with your password
docker compose up -dThis will start Posts on port 3000 with a persistent volume for the SQLite database and uploads.
Binary
Install with Homebrew:
brew install stevedylandev/tap/postsOr grab a prebuilt binary from the releases page.
You can also build from source:
cd apps/posts && go build .The resulting binary is self-contained with all assets embedded. Copy it to your server with a configured .env file and run it directly.
Use
Log in at /login with your configured password to access the admin panel. From there you can manage blog posts, static pages, file uploads, and site settings including custom CSS. Your blog's RSS feed is available at /feed.xml.
Acknowledgements
Posts is heavily inspired by Bear Blog. If you'd rather not self-host, Bear Blog is a great alternative with the same minimal, no-nonsense approach to blogging.