Skip to content

Forgejo

Install the latest stable Forgejo release with MariaDB, sendmail, Git LFS, and a systemd service. The playbook resolves the version at installation time and verifies the binary's signature before execution. Registration is disabled; the administrator creates additional accounts.

Install over SSH
uberspace app install forgejo
Manual installation
Forgejo Guide
Playbook
forgejo.yaml (version 0.1)
Last changed
2026-12-05

Before you start

Use a fresh Asteroid with an empty document root. The playbook refuses to reuse ~/opt/forgejo, an existing forgejo.service, an existing database, or a domain root served by another backend. This is a fresh-install playbook, not an upgrade or migration tool.

The default domain is your Asteroid domain, such as isabell.uber.space. Configure DNS first if you choose a custom domain. Port 3000 must be free unless you choose another port.

Installation

Over SSH: Run the app installer. It downloads the Forgejo playbook from the Lab, shows the configuration, and asks for confirmation before installing. Example output is abbreviated:

[isabell@moondust ~]$ uberspace app install forgejo
[...]
OK: playbook finished

Useful options:

Option Default Purpose
--var domain=git.example.com Your Asteroid domain Public domain; configure its DNS first
--var admin_username=alice Your Asteroid name Administrator username; Forgejo reserves names such as admin
--var admin_mailaddress=you@example.com sysmail@isabell.uber.space Receives the password-reset email; use an address you read
--var db_name=isabell_git isabell_forgejo New MariaDB database, prefixed with your Asteroid name and _
--var port=3001 3000 Internal HTTP port

To preview the configuration and preflight checks without installing, add --dry. Download, configuration, and service tasks are skipped in this mode.

First login

Open https://isabell.uber.space/user/login and choose Forgot password?. Enter the configured admin email address and follow the email link to set your password. The installer creates a random password and does not display it. Check your spam folder if the email does not arrive.

Configuration

Files and service: Forgejo lives in ~/opt/forgejo. Its private configuration is ~/opt/forgejo/custom/conf/app.ini; restart forgejo.service after changing it. See the systemd Manual for service management.

Web access: Forgejo listens on 0.0.0.0 so the Uberspace web backend can forward HTTPS requests to it. ROOT_URL contains your public HTTPS address.

Email: Forgejo uses local sendmail with your Asteroid's isabell@uber.space sender address. No SMTP credentials are needed.

SSH: Forgejo shares the Asteroid's SSH service and preserves existing shell-login keys. Use a separate key for Git access and add it in Forgejo under Settings > SSH/GPG Keys. Keep your shell-login key in the Uberspace dashboard. Follow the Guide's SSH setup to configure your local client.

Accounts: Login is required to view pages and use the API (REQUIRE_SIGNIN_VIEW = true). Public registration is disabled. Create additional users in Site Administration. Forgejo Actions runners are not installed.

Updates and backups

Updates are manual. Follow the Guide's update instructions and read the Forgejo upgrade notes before changing versions. Do not rerun this playbook to update.

Stop Forgejo before taking a consistent backup of its configuration, repositories, data, and database. Follow the Guide's backup instructions, including a separate native MariaDB dump. Substitute your database name if you changed db_name. Keep backups outside the Asteroid too.

For maintenance responsibilities, see Your app, your freedom, your responsibility.

Troubleshooting

Installation logs are in ~/logs/app_playbooks/. A failed installation may leave files or a database behind; inspect the logs before making changes. The playbook refuses to overwrite a partial installation.

Read the service log with the following command. Example output is abbreviated:

[isabell@moondust ~]$ journalctl --user -u forgejo -n 50
[...]
... [I] Listen: http://0.0.0.0:3000

For web failures, check that the service is running, the selected port is free before installation, and DNS points to your Asteroid. For password-reset problems, check the admin email address and the mailer messages in the service log.

Reset a user's password: Use Forgot password? on the login page. If email recovery is unavailable, follow the Guide's SSH password-reset instructions. They work for local users, including the administrator. Use the Forgejo username; the playbook defaults it to your Asteroid name unless you supplied admin_username.