homelab-blueprint/docker-compose-files/forgejo/.env.sample
Brian Pooe 1c2f4a1c81 fix(forgejo): set SSH_DOMAIN so the UI's clone URL is actually usable
Forgejo's displayed SSH clone URL comes from SSH_DOMAIN, which defaults
to "localhost" (not DOMAIN) when unset — completely unusable, and
DOMAIN itself would've been wrong anyway since it resolves through
Caddy's wildcard CNAME, which SSH can't traverse. Point it at the
dedicated forgejo.home.brianpooe.com A record instead.
2026-07-19 15:17:25 +02:00

31 lines
1.3 KiB
Text

# Forgejo
FORGEJO_VERSION=10
FORGEJO_HTTP_PORT=3000
# Defaults to 2222 because the LXC's own system sshd already owns port 22.
# To use the standard port 22 for git-over-SSH instead, first move the LXC's
# own admin sshd off 22 (e.g. via a systemd ssh.socket override setting
# ListenStream to another port), then set FORGEJO_SSH_PORT=22 here.
FORGEJO_SSH_PORT=2222
FORGEJO_BIND_IP=0.0.0.0
FORGEJO_MEM_LIMIT=1G
# Full URL where Forgejo is reachable (used for clone URLs, webhooks, CSRF)
FORGEJO_ROOT_URL=https://git.home.example.com
FORGEJO_DOMAIN=git.home.example.com
# Hostname shown in the web UI's SSH clone URL. Must resolve directly to
# this LXC (not through Caddy — SSH can't be proxied), so it needs its own
# DNS A record rather than reusing FORGEJO_DOMAIN's wildcard CNAME to Caddy.
FORGEJO_SSH_DOMAIN=forgejo.home.example.com
# Generate with: openssl rand -base64 32
FORGEJO_DB_PASSWORD=<random-secret>
# Root of the UNAS forgejo_data share (bind-mounted into the LXC). Must
# contain repositories/, lfs/, attachments/, and avatars/ subdirectories.
FORGEJO_DATA_ROOT=/mnt/unas/forgejo_data
# false = open self-signup; leave true and create accounts with
# `docker exec forgejo forgejo admin user create ...` instead.
FORGEJO_DISABLE_REGISTRATION=true
FORGEJO_REQUIRE_SIGNIN_VIEW=false