Skip to content

Forgejo

Self-hosted git forge. Docs: forgejo.org/docs, source: codeberg.org/forgejo/forgejo

  • URL: https://{forgejo_subdomain}.{domain} (default subdomain: git), or https://{forgejo_subdomain}.{<zone>_domain} in its own DNS zone
  • Data: repositories, SQLite database and indexes under /var/lib/forgejo/; app.ini and the signing secrets under /etc/forgejo/
  • Pinned version: 16.0.5

Run one for identity. A Forgejo account is not a github.com account, so someone can hold write access to a repository without one, which is how Decap CMS authenticates an editor against this forge.

Terminal window
auberge deploy forgejo
Key Purpose
forgejo_subdomain Subdomain for HTTPS access
forgejo_admin_user Administrator username
forgejo_admin_password Administrator password (first deploy)

Forgejo can serve from a zone other than the fleet’s. A zone is two keys sharing a prefix you choose: <zone>_domain and <zone>_cloudflare_dns_api_token. The fleet’s zone is the unprefixed pair, domain and cloudflare_dns_api_token. auberge config init does not scaffold these keys, and the auberge config set picker does not list them, so set them by name:

Terminal window
auberge config set shop_domain shop-example.com
auberge config set shop_cloudflare_dns_api_token YOUR_TOKEN

The domain must be its own Cloudflare zone. Scope the token to that zone only, as for the agent tier’s token.

Then point Forgejo at the zone with auberge config edit. Leave forgejo_zone unset to keep it in the fleet’s zone.

[hosts.auberge]
forgejo_zone = "shop"

auberge deploy forgejo publishes the A record in shop-example.com. auberge dns list, status, set-all and migrate hold only the fleet’s zone. They report Forgejo under off_zone and do not manage its record.

For the OAuth application an editor logs in through, see the role README. Decap reaches Forgejo through decap-cms-backend-gitea, not decap-cms-backend-forgejo.