Skip to content

Public URL

GitHub, Discord, Slack, and Telegram must reach GitNotify over HTTPS. Choose one public origin, such as https://gitnotify.example.com, and set it as PUBLIC_URL without a trailing slash.

The same origin is used for provider webhooks, OAuth callbacks, and the short-lived repository connection pages. Changing it later means updating each provider app and registering the Telegram webhook again.

Any reverse proxy with a valid TLS certificate works. Forward the public origin to http://127.0.0.1:8000, keep the paths unchanged, and pass request bodies and signature headers through unchanged.

After the proxy is configured, check it from outside the host:

Terminal window
curl -fsS https://gitnotify.example.com/health

Do not continue until this returns a successful JSON response.

Cloudflare Tunnel is optional. It needs a Cloudflare account and a domain on Cloudflare DNS, but the GitNotify server itself does not depend on Cloudflare.

Install cloudflared on the host, authenticate it, and create a named tunnel:

Terminal window
cloudflared tunnel login
cloudflared tunnel create gitnotify

The create command prints a tunnel ID and writes a credentials JSON file under ~/.cloudflared/.

Create the configuration directory:

Terminal window
mkdir -p selfhosted/config/cloudflared

Create selfhosted/config/cloudflared/config.yml:

tunnel: YOUR_TUNNEL_ID
credentials-file: /etc/cloudflared/credentials.json
ingress:
- hostname: gitnotify.example.com
service: http://gitnotify:8000
- service: http_status:404

The host name gitnotify is the Compose service name on the shared Docker network. Copy the credentials file that cloudflared tunnel create wrote:

Terminal window
cp ~/.cloudflared/YOUR_TUNNEL_ID.json selfhosted/config/cloudflared/credentials.json
chmod 644 selfhosted/config/cloudflared/credentials.json
cloudflared tunnel route dns gitnotify gitnotify.example.com

The cloudflared container runs as its own unprivileged user, so it needs read access to this file. Keep the repository checkout readable only by your account (chmod 700 on its folder), because the credentials JSON controls the tunnel. Do not commit it.

Start the optional profile:

Terminal window
docker compose -f selfhosted/docker-compose.yml --profile tunnel up -d

The profile starts both gitnotify and cloudflared. Keep port 8000 bound to localhost. The tunnel container reaches GitNotify over the Compose network.

Check both containers and then the public URL:

Terminal window
docker compose -f selfhosted/docker-compose.yml ps
curl -fsS https://gitnotify.example.com/health

Set PUBLIC_URL=https://gitnotify.example.com in selfhosted/.env, then apply the change with docker compose -f selfhosted/docker-compose.yml up -d gitnotify before configuring the provider apps.