Self-host the server
Your server, your Postgres, your keys. The repo ships a compose file wiring the published GHCR image to Postgres.
Quick start with Docker Compose
git clone https://github.com/Omotolani98/foostash.git
cd foostash
docker compose pull
docker compose up -d
curl http://localhost:8400/v1/health
# {"status":"ok","version":"v0.2.3","database":"ok"}Defaults
| Setting | Value |
|---|---|
| API port | 8400 (host and container) |
| Postgres | postgres:16-alpine · user/pass/db foostash |
| Data volume | foostash-pgdata (Docker-managed) |
| Image | ghcr.io/omotolani98/foostash:latest |
| DB URL | postgres://foostash:foostash@postgres:5432/foostash?sslmode=disable |
Pin a release, or build locally
FOOSTASH_IMAGE_TAG=v0.2.2 docker compose up -d
docker compose up -d --buildRun without Docker
export FOOSTASH_PG_URL="postgres://foostash:foostash@localhost:5432/foostash?sslmode=disable"
make build
./bin/foostash serve --addr :8400Makefile helpers: make docker-build, make docker-up, make docker-down.
Operational notes
- Migrations run at startup. Every foostash serve applies pending SQL migrations idempotently — no separate migrate step.
- Healthcheck. GET /v1/health pings the DB with a 2s timeout. Compose uses it for container health; load balancers can too.
- Data lifecycle. docker compose down keeps the foostash-pgdata volume. Use down -v to wipe it.
- TLS. The server speaks plain HTTP. Terminate TLS in front (Caddy, nginx, Cloudflare, a managed LB) before exposing it to the internet.