- Go 67.5%
- HTML 28.7%
- JavaScript 2.6%
- Dockerfile 1%
- CSS 0.2%
| static | ||
| templates | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| activitypub.go | ||
| AGENTS.md | ||
| db.go | ||
| docker-compose.yml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| handlers_admin.go | ||
| handlers_auth.go | ||
| handlers_public.go | ||
| handlers_upload.go | ||
| i18n.go | ||
| LICENSE | ||
| logblog | ||
| main.go | ||
| package.json | ||
| README.md | ||
| tailwind.config.js | ||
| Taskfile.yml | ||
log
A minimal self-hosted blog. Markdown editor, image uploads, dark/light theme, RSS feed, and a clean public reading experience.
Built with Go, HTMX, and TailwindCSS. Single binary, SQLite database, zero runtime dependencies.
Features
- Markdown editor with live preview and image upload
- Post separator (
---more---) — shows a teaser on the list and the full text on the post page - Infinite scroll on both the public list and the admin list
- Admin search
- Light / dark theme (follows system preference, manual toggle)
- RSS feed at
/rss - Admin behind a simple username + password login
Requirements
Development
- Go 1.22+
- Node.js (for recompiling TailwindCSS when editing templates)
- Task (
taskCLI)
Production
- Just the compiled binary — no runtime dependencies
Environment variables
| Variable | Default | Description |
|---|---|---|
LOG_TITLE |
log |
Site title shown in the header, browser tab, and RSS feed |
LOG_SUBTITLE |
(none) | Optional tagline shown below the title in the header. Markdown is supported (e.g. *italic*, links) |
LOG_USER |
admin |
Admin username |
LOG_PASSWORD |
password |
Admin password |
LOG_DB |
./log.db |
Path to the SQLite database file |
LOG_PORT |
8080 |
Port the server listens on |
LOG_BASE_URL |
http://localhost:8080 |
Public base URL (used in RSS links) |
LOG_UPLOADS_DIR |
./uploads |
Directory where uploaded images are stored |
LOG_SECRET |
(random) | HMAC secret for signing session cookies. Set this in production — without it sessions are lost on restart |
Copy .env.example to .env and edit before starting.
Development
# 1. Install Node dependencies (Tailwind)
npm install
# 2. Start the server (compiles CSS, then runs with go run)
LOG_USER=admin LOG_PASSWORD=secret task dev
The server starts on http://localhost:8080. Admin is at http://localhost:8080/admin.
If you edit templates and add new Tailwind classes, recompile CSS separately in a second terminal:
task css-watch
Production build
# Compile CSS + build a static binary
task build
# Run
LOG_USER=admin \
LOG_PASSWORD=yourpassword \
LOG_SECRET=a-long-random-string \
LOG_BASE_URL=https://yourdomain.example.com \
./log
The uploads/ directory and the database file (log.db) are created automatically on first start. Back these up — everything else is in the binary.
Docker
# Build image and start
docker compose up -d
# Logs
docker compose logs -f
# Stop
docker compose down
Configure the instance by editing the environment section in docker-compose.yml before the first start, or by creating a .env file alongside it (Docker Compose picks it up automatically).
Data is persisted in a named volume (log_data) that holds both the SQLite database and the uploads directory.