Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Posts

demo of 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

VariableDescriptionDefault
POSTS_PASSWORDPassword for admin loginchangeme
POSTS_DB_PATHSQLite database file pathposts.sqlite
UPLOADS_DIRDirectory for uploaded files (used when R2 unset)uploads
SITE_URLPublic URL for RSS feed and linkshttp://localhost:3000
HOSTServer bind address127.0.0.1
PORTServer port3000
COOKIE_SECUREEnable HTTPS-only cookiesfalse
R2_BUCKETCloudflare R2 bucket name (enables R2 storage)(unset)
R2_ACCOUNT_IDCloudflare account ID(unset)
R2_ACCESS_KEY_IDR2 access key ID(unset)
R2_SECRET_ACCESS_KEYR2 secret access key(unset)
R2_PUBLIC_URLPublic 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.

Deploy on Railway

Docker

cd apps/posts
cp .env.example .env
# Edit .env with your password
docker compose up -d

This will start Posts on port 3000 with a persistent volume for the SQLite database and uploads.

Binary

Install with Homebrew:

brew install stevedylandev/tap/posts

Or 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.