Install GitNotify
Run these commands from the repository root. GitNotify listens on port 8000 and stores its default SQLite database at /data/gitnotify.db inside the container.
Docker Compose
Section titled “Docker Compose”Copy the environment template and add the values from the configuration reference:
cp selfhosted/.env.example selfhosted/.envchmod 600 selfhosted/.envKeep this file out of version control and readable only by the account that runs GitNotify.
Start the gitnotify service:
docker compose -f selfhosted/docker-compose.yml up -d gitnotifyThe Compose service mounts persistent storage at /data and publishes GitNotify on 127.0.0.1:8000. The optional cloudflared service is in the tunnel profile and is covered in Public URL.
After any change to selfhosted/.env, apply it with docker compose -f selfhosted/docker-compose.yml up -d gitnotify. docker compose restart keeps the old environment. Without Compose, remove the container and run the docker run command again.
Check the service:
docker compose -f selfhosted/docker-compose.yml pscurl -fsS http://127.0.0.1:8000/healthThe health response is JSON with ok set to true and the running version.
Build the container locally
Section titled “Build the container locally”The production image is built from selfhosted/Dockerfile. To build and run it without Compose:
docker build -t gitnotify:local selfhosteddocker volume create gitnotify-datadocker run -d \ --name gitnotify \ --restart unless-stopped \ --env-file selfhosted/.env \ -p 127.0.0.1:8000:8000 \ -v gitnotify-data:/data \ gitnotify:localVerify it with the same health request:
curl -fsS http://127.0.0.1:8000/healthBuild the binary with Cargo
Section titled “Build the binary with Cargo”The native binary needs a current Rust toolchain and a writable database path. The default /data/gitnotify.db only works if /data exists and the service account can write to it. Otherwise set DATABASE_URL=sqlite://./gitnotify.db in selfhosted/.env.
cd selfhostedcargo build --release --locked./target/release/gitnotifyGitNotify reads selfhosted/.env when it starts from this directory. Put the binary behind a service manager so it restarts after a reboot. The process handles SIGTERM and closes its background tasks and database pool before exiting.