Self-hosted app
The project, data and links on this page are made up, to show what dokk’s components can do. It does not document dokk itself.
Ledgerly is a small bookkeeping app for teams. This guide runs it on your own server.
You need a server with 1 GB of memory, and PostgreSQL 15 or newer. SQLite works for trying it out.
Install #
services:
app:
image: ghcr.io/example/ledgerly:3
env_file: .env
ports: ["8000:8000"]
depends_on: [db]
db:
image: postgres:16
environment:
POSTGRES_PASSWORD: change-me
volumes: [db:/var/lib/postgresql/data]
volumes:
db:
docker compose up -d
pip install ledgerly
uv add ledgerly
ledgerly migrate
ledgerly serve --host 0.0.0.0 --port 8000
Settings #
Put these in .env, next to compose.yaml or in the folder you run ledgerly serve from.
| Variable | Default | Description |
|---|---|---|
SECRET_KEY required |
— | A long random string; keep it secret. |
DATABASE_URL |
sqlite:///ledgerly.db |
postgres://user:password@db/ledgerly in production. |
ALLOWED_HOSTS |
localhost |
Your domain, comma separated. |
EMAIL_URL |
console:// |
smtp://user:password@host:587 to send mail. |
DEBUG |
false |
Never true on a public server. |
Without SECRET_KEY anyone can sign in as anyone. Generate one with
python -c "import secrets; print(secrets.token_urlsafe(50))".
Before you go live #
- Create the first admin:
ledgerly createadmin. - Put a reverse proxy with HTTPS in front, such as Caddy or nginx.
- Back up the database every night, and try a restore once.
- Subscribe to the release feed to hear about security fixes.
Troubleshooting #
The page shows "Bad Request (400)"
The domain you visit is not in ALLOWED_HOSTS. Add it, comma separated, and restart.
Emails never arrive
EMAIL_URL is still console://, which prints mails to the log instead of sending them.
Upgrading from 2.x
Back up first, then pull the new image and run ledgerly migrate. 3.0 needs PostgreSQL 15.