LibrePortal
Sponsor
Install

Gitea

Git Repository Management

Gitea is your own place for Git repositories, with issues, pull requests, wikis and releases around them, much like the big code-hosting sites but on your server. It's quick, light on memory, and new repositories start private.

On this page
  1. At a glance
  2. What it's good for
  3. Signing in
  4. First steps
  5. Pushing and pulling
  6. Who can see what
  7. Works with
  8. Good to know
  9. Addresses and ports
  10. Settings
  11. In its config file
  12. Tools
  13. Works with
  14. Privacy and security
  15. What leaves this server
  16. What LibrePortal turns off
  17. Sources
  18. Under the hood

At a glance#

What it is
Git Repository Management Development
Where it opens
Web Interface On its own port at http://your-server:port, or git.your-domain once you have a domain
Updates
When you choose New versions wait for you to press Update
Backups
Included Part of the daily backup when that's switched on
Copies
As many as you like Run several copies, each with its own data

What it's good for#

If you write code, keep configuration in Git, or just want your projects somewhere that isn't a company's servers, Gitea gives you the familiar set: repositories you browse in the browser, issues to track what needs doing, pull requests to review changes, a wiki per project, and releases with downloadable files. It also has a package registry, so you can keep your own container images next to the code that builds them.

It's small enough to run happily on a modest box, and it suits one person with a pile of side projects just as well as a small team.

Gitea or Forgejo?

LibrePortal also has Forgejo. Forgejo started as a fork of Gitea in 2022, when Gitea's name and domains moved to a company, and it's run by a community under a non-profit. The two still look and work almost the same, and LibrePortal sets them up the same way, with the same tools. The practical differences here:

  • Who can reach it at first. Gitea's web page starts open to everyone so people can browse your public repositories, with sign-in kept to your trusted places. Forgejo starts private and you open it when you're ready.
  • Updates. Gitea is pinned to one exact release. Forgejo follows its long-term support line, so its bug-fix releases arrive whenever you press Update.
  • Monitoring. Gitea can send its statistics to Prometheus and Grafana, with a dashboard ready made. Forgejo can't here yet.
  • Who's behind it. If it matters to you that the project is steered by its community rather than a company, choose Forgejo.

Pick one. They do the same job, and running both only splits your projects in two.

Signing in#

There's no sign-up page and no setup wizard to grab. LibrePortal locks Gitea's installer and, once Gitea is answering, makes the admin account with Gitea's own command-line tool. The account is libreportal-admin, and its password is in the Login Details shown when the install finishes; press Welcome on the app's page to see it again.

The admin gets a made-up address, gitea-admin@ followed by Gitea's host name (or gitea-admin@gitea.invalid if Gitea is on a plain IP address), which Gitea keeps hidden. That's deliberate. Gitea credits every commit to the account whose email matches the commit's author, so if the admin had the address you commit with, all your work would show up as the admin's. Give yourself a normal account for everyday work (see below) and keep the admin for running the server.

Change the admin's password with the Reset User Password tool rather than inside Gitea. It changes it in both places, so the password LibrePortal shows you stays right.

Installed before 0.4.7? Reset the admin password

Some Gitea installs made with LibrePortal 0.4.6 or earlier gave the admin password the same value as the token that guards Gitea's statistics (see "Works with" below). With monitoring switched on, that token is written into Prometheus's settings in plain text. Updating LibrePortal doesn't change either value, so run Reset User Password once with the username libreportal-admin and the password left empty. The admin gets a new password of its own, and the Login Details show it. Installs made from 0.4.7 get two separate values from the start.

First steps#

  1. Make your own account. On Gitea's Tools tab, run Create User Account with your username and the email address you commit with. Leave the password empty to have one made for you. Tick Make admin only if you want to run the server from this account too.
  2. Add your SSH key. Sign in as yourself, open your settings, and add your public SSH key. That's what lets you push without typing a password.
  3. Create or bring in a repository. Make a new one with the + menu, or use New Migration from the same menu to copy a repository from another Git host, with or without keeping it in step as a mirror.

New repositories start private. Make one public in its settings when you want other people to see it.

The other tools do what they say: List Users, List Repositories (with whether each is public or private), Set Admin Status (it won't demote the last admin, so you can't lock yourself out) and Delete User Account, which can't be undone.

Pushing and pulling#

Every repository shows two clone addresses. The HTTP one uses the web address. The SSH one uses Gitea's second port, Git SSH Access, which LibrePortal picked at install, so it looks like ssh://git@192.168.1.50:<port>/you/project.git. The port is already in the address Gitea shows you, so copy it rather than typing it.

The SSH port only answers your trusted places: your home network, your own addresses and your VPN devices. Pushing from elsewhere works over the LibrePortal VPN.

Who can see what#

Gitea's web page is public from the start, because the point of public repositories is that anyone can read them. What makes that safe depends on whether you have a domain.

With a domain and Traefik, Gitea lives at git.<your domain> over HTTPS, and LibrePortal splits it in two. Browsing and cloning public repositories works for anyone. Signing in, account recovery, your settings, the site admin, anything that changes data through the API, and any request carrying a password or token only answer your trusted places. Someone outside can read your public code, but can't even try a password. Anonymous docker pull of public packages works from anywhere too; logging in to the registry and pushing images don't.

Without Traefik, Gitea is plain http://192.168.1.50:<port> with no such split, sign-in page included, so anyone who can reach your server can reach it. If your server is reachable from the internet, set the port to private until you've got a domain set up.

If you'd rather nobody outside saw anything, set the Web Interface port to private and it's yours alone.

Tokens only work from your trusted places

For scripts, the API, or pushing container images, make a token with Create API Token on the Tools tab. Leave User empty for the admin, or give your own username. Scopes default to all; write:package is enough to push images. The token is shown once in the task output and never again, because Gitea keeps only a fingerprint of it. And because requests carrying credentials are kept to trusted places, a token won't work from outside them either.

Works with#

With Prometheus and Grafana installed, switch on Export metrics to Grafana on Gitea's Config tab. Prometheus starts collecting Gitea's figures and Grafana gets a Gitea dashboard: memory and CPU, plus counts of repositories, users, issues, stars and the rest. The figures sit behind a token LibrePortal generates, since they'd otherwise ride on the public web port.

Uptime Kuma watches it like any other app.

Good to know#

  • Updates wait for you. Gitea changes its database the first time a new version starts, and there's no going back. So LibrePortal starts it on Manual and pins it to an exact release: pressing Update brings fresh builds of that release, and it never jumps to a new version on its own at six in the morning. When the Updates tab shows a newer version, Upgrade moves Gitea up one version at a time, taking a backup and checking it works at each step, so you do it when you've read the release notes. A backup is taken before any update. See Updates.
  • Its address is fixed at install. Clone links and page links use the address Gitea was set up with: git.<your domain>, or your server's network address and port. If you add a domain later, or the server's address changes, run Update Configuration so Gitea picks up the new one. If the domain's DNS record didn't point at your server yet, no HTTPS certificate was requested; add the record and do the same.
  • It runs a small cache beside it, Redis, which keeps pages quick. It's part of the app, and backed up and updated with it.
  • No email. Gitea has no mail server to use, so there are no notification emails or password-reset links. Use Reset User Password.
  • It doesn't call out. Avatars and page assets come from Gitea itself, not from Gravatar or other outside sites.
  • No CI runner. Gitea Actions needs a separate runner program, which LibrePortal doesn't install.
  • Backups include everything: the database, the repositories, uploads and packages.
  • You can run more than one. Gitea can run as several copies, each with its own data and address.

Addresses and ports#

Gitea has 2 ports. LibrePortal picks a free port number for each when you install, so yours will differ from anyone else's. The Config tab's Network section shows them, and the app's Open button uses the right one. "Anyone" means it's reachable from wherever your server is reachable; you can make it private later.

What it isWho can reach itWith a domain
Web Interface Anyone git.your-domain
Git SSH Access TCP Trusted places only Port only

Settings#

In its config file#

Gitea's own settings aren't on the Config tab yet. They live in the app's config file, described here so you know they exist. How to change them.

SettingWhat it doesStarts as
Name
CFG_GITEA_DISPLAY_NAME
What this app is called on your dashboards. Leave empty to use its usual name Empty
Show on the LibrePortal Dashboard
CFG_GITEA_SHOW_ON_DASHBOARD
Whether this app gets a shortcut on the front page of the LibrePortal WebUI, separate from any Dashy dashboard
Choices: true, false
true
Update Check
CFG_GITEA_UPDATE_CHECK
Whether Gitea may ask gitea.com once a week which version is current
Choices: true, false
false
Detailed logs
CFG_GITEA_VERBOSE_LOGS
Whether Gitea writes its normal, chattier logs, including who connected, instead of only warnings and errors.
Choices: true, false
false
Debug logging for 24 hours
CFG_GITEA_DEBUG_LOGS
Turn on to see everything Gitea is doing while you look for a problem; it turns itself off after 24 hours.
Choices: true, false
false

Tools#

Gitea's Tools tab has 7 buttons for jobs you'd otherwise need a terminal for. Each one runs as a task, so you can watch it on the Tasks page and read what it did. More about Tools.

Reset User Password

Set a new password for an existing user. Leave blank to generate one.

Asks for: Username, New password (optional)
Create User Account

Add a new user. Tick "Make admin" for full rights.

Asks for: Username, Email, Password (optional), Make admin
List UsersTested on 1.27.3

List every user.

Delete User AccountCan't be undone

Permanently remove a user.

Asks for: Username
Set Admin Status

Promote or demote a user.

Asks for: Username, Make admin
Create API TokenTested on 1.27.3

Make a Gitea access token for scripts or LibrePortal integrations. Copy it from the app's login card (Newest Api Token). Tokens only work from your trusted places.

Asks for: User (optional), Token name (optional), Scopes (optional)
List RepositoriesTested on 1.27.3

Show every repository and whether it is public or private.

Works with#

These are the other apps Gitea knows how to work with. Once it's installed, its page shows the same list with whether each one is connected. How this works.

  • Email: Sends its own email (password resets, notifications, invitations) through your mail server, from an account of its own. LibrePortal sets this up by itself when both are installed.
  • Grafana: Shows dashboards for the apps that have one. works with every app
  • Prometheus: Collects metrics from the apps that can export them. works with every app
  • Uptime Kuma: Watches your apps and shows when one goes down. works with every app

Privacy and security#

All clear Gitea is your own Git hosting. LibrePortal closes sign-ups and stops Gravatar, CDN use and the weekly update check, so it contacts nobody on its own.

What leaves this server#

  • Actions runners, if you add any, fetch actions from GitHub

What LibrePortal turns off#

  • Detailed logs and per-request access logging (switchable in Config)
  • Weekly update check (switchable in Config)
  • Gravatar and web CDNs (offline mode)

Licence: MIT. Audited: 21 October 2026. See the privacy of every app and the Promise.

Sources#

Under the hood#

  • It runs these images: gitea/gitea:1.27.3@sha256:87a67ee09d3ae0d1df5fda5dcda3e2a1f9236a45b0a59025d6e00e46adc43bef, redis:8.10.2-alpine@sha256:9f8d2d789b9a1d1e3f283f979aa9cbf393373806472e1ccd460e2f9c869b833b. The version is pinned, and moves only when you update it.
  • It can sit behind Authelia's sign-in once Authelia is installed.
  • Its own project and documentation: github.com/go-gitea/gitea

Ports, settings, tools and connections on this page are read from LibrePortal v0.10.97's app catalogue each time the guide is built.

Next steps