Gitea¶
Install the latest stable Gitea 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.
Before you start¶
Use a fresh Asteroid with an empty document root. The playbook refuses to reuse ~/opt/gitea, an existing gitea.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 Gitea playbook from the Lab, shows the configuration, and asks for confirmation before installing. Example output is abbreviated:
[isabell@moondust ~]$ uberspace app install gitea
[...]
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; Gitea 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_gitea |
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: Gitea lives in ~/opt/gitea. Its private configuration is ~/opt/gitea/custom/conf/app.ini; restart gitea.service after changing it. See the systemd Manual for service management.
Web access: Gitea 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: Gitea uses local sendmail with your Asteroid's isabell@uber.space sender address. No SMTP credentials are needed.
SSH: Gitea shares the Asteroid's SSH service and preserves existing shell-login keys. Use a separate key for Git access and add it in Gitea 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. This default limits anonymous repository scraping and its resource cost. The experimental expensive alternative is explained in the Guide. Gitea Actions runners are not installed.
Security: The playbook enables HSTS for your domain, so browsers always use HTTPS.
Updates and backups¶
Updates are manual. Follow the Guide's update instructions and read the Gitea upgrade notes before changing versions. Do not rerun this playbook to update.
Stop Gitea 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 gitea -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 Gitea username; the playbook defaults it to your Asteroid name unless you supplied admin_username.