LibrePortal
Sponsor
Install

Forgejo

Git Repository Management

Forgejo is a home for your Git repositories, with issues, pull requests, wikis and releases, run by a community rather than a company. On LibrePortal it starts private to your own network, and you open it up when you're ready to share.

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

Good to know before you install

Forgejo is the community fork of Gitea and does the same job, so pick whichever one you prefer rather than running both.

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 forgejo.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#

Forgejo gives you what the big code-hosting sites do, on your own server: repositories to browse in the browser, issues to keep track of work, pull requests to review changes, a wiki per project, releases with downloadable files, and a package registry for things like container images. It's light enough for a small box and suits anyone from one person with a few projects to a small team.

Forgejo or Gitea?

LibrePortal also has Gitea, the project Forgejo was forked from in 2022 when Gitea's name and domains moved to a company. Forgejo is steered by its community under a non-profit, and it has gone its own way on some features since, but day to day the two look and work almost the same. LibrePortal sets both up the same way, with the same tools. The practical differences here:

  • Who can reach it at first. Forgejo starts private: only your trusted places can open it. Gitea's web page starts public so people can browse your public repositories, with signing in kept to your trusted places.
  • Updates. Forgejo follows its long-term support line, so bug-fix releases arrive whenever you press Update. Gitea is pinned to one exact release.
  • Monitoring. Gitea can send its statistics to Prometheus and Grafana, with a ready-made dashboard. Forgejo can't here yet.
  • Tested tools. Forgejo's Tools tab is marked as tested on the version it runs.

If you care that the project answers to its community, pick Forgejo. Either way, pick one: running both only splits your projects in two.

Signing in#

There's no sign-up page and no setup wizard left open. LibrePortal locks Forgejo's installer and, once Forgejo is answering, makes the admin account with Forgejo's own command-line tool, so there's never a moment when someone else could claim it. 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, forgejo-admin@ followed by Forgejo's host name (or forgejo-admin@forgejo.invalid on a plain IP address), which Forgejo keeps hidden. Forgejo credits every commit to the account whose email matches its author, so giving the admin the address you commit with would make all your work look like the admin's. Make yourself a normal account for everyday work and keep the admin for running the server.

Choosing a different admin name

In Forgejo, users and organisations share one list of names, and case doesn't count. An account can never have the same name as an organisation on the same server. So if you change the admin's name before installing, pick one no organisation will ever want; a name like your project's is exactly the one you'll later want for its organisation.

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

First steps#

  1. Make your own account. On Forgejo'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, so you can push without 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 one from another Git host, as a one-off copy or a mirror that keeps in step.

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

The rest of the Tools tab: List Users, List Repositories (with whether each is public or private), Set Admin Status (it won't demote the only admin, so you can't lock yourself out) and Delete User Account, which can't be undone.

Pushing and pulling#

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

Both ports answer only your trusted places: your home network, your own addresses and your VPN devices. From anywhere else, connect with the LibrePortal VPN first.

Opening it up#

Forgejo starts private because every page it serves carries its sign-in form and a way into the admin area. Once you want people outside to browse and clone your public repositories, set the Web Interface port to public (see Who can reach what).

Do that with a domain and Traefik, and Forgejo is at forgejo.<your domain> over HTTPS with LibrePortal's split in place. Reading 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 still only answer your trusted places. Anonymous docker pull of public packages works from anywhere; logging in to the registry and pushing don't.

Without Traefik there's no such split: a public port means the sign-in page is public too. Leave it private until you have a domain.

The Git SSH Access port can be made public too, if people outside need to push over SSH. Think about whether they could use the VPN instead.

API tokens

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 Forgejo keeps only a fingerprint of it. Remove old ones in Forgejo under your settings' Applications. Tokens only work from your trusted places.

Good to know#

  • Updates wait for you, and stay on the long-term line. Forgejo 15 is a long-term support release, looked after until July 2027, where ordinary releases get about three months. LibrePortal follows 15, so pressing Update brings its latest bug fixes. It never moves to a newer major version by itself, because each one changes the database on first start and can't go back; the Updates tab may offer one, but Upgrade can't move Forgejo across yet. A backup is taken before any update.
  • Its address is fixed at install. Clone links use the address Forgejo was set up with: forgejo.<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 Forgejo picks up the new one.
  • No email. Forgejo has no mail server to use, so there are no notifications by email and no reset links. Use Reset User Password.
  • It doesn't call out to Gravatar or other outside sites for avatars and page assets.
  • No CI runner. Forgejo Actions needs a separate runner program, which LibrePortal doesn't install.
  • Backups include everything: the database, repositories, uploads and packages.
  • You can run more than one. Forgejo can run as several copies, each with its own data and address.

Addresses and ports#

Forgejo 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.

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

Settings#

In its config file#

Forgejo'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_FORGEJO_DISPLAY_NAME
What this app is called on your dashboards. Leave empty to use its usual name Empty
Show on the LibrePortal Dashboard
CFG_FORGEJO_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
Sign in automatically
CFG_FORGEJO_GATE_AUTOLOGIN
Behind the Authelia gate, open your Forgejo account straight from your Authelia login (needs the gate). Turn off to get Forgejo's own sign-in page again
Choices: true, false
true
Update Check
CFG_FORGEJO_UPDATE_CHECK
Whether Forgejo may ask forgejo.org once a week which version is current
Choices: true, false
false
Detailed logs
CFG_FORGEJO_VERBOSE_LOGS
Whether Forgejo writes its normal, chattier logs, including who connected, instead of only warnings and errors.
Choices: true, false
false
Debug logging for 24 hours
CFG_FORGEJO_DEBUG_LOGS
Turn on to see everything Forgejo is doing while you look for a problem; it turns itself off after 24 hours.
Choices: true, false
false
Clean up deleted packages
CFG_FORGEJO_PACKAGE_CLEANUP_ENABLED
Whether Forgejo removes the files of deleted packages from disk
Choices: true, false
true
Free deleted packages after
CFG_FORGEJO_PACKAGE_CLEANUP_OLDER_THAN
How long the files of a deleted package stay on disk before Forgejo removes them
Choices: 1 hour, 6 hours, 24 hours, 7 days
1h
Check every
CFG_FORGEJO_PACKAGE_CLEANUP_SCHEDULE
How often Forgejo looks for deleted packages to remove
Choices: Every hour, Every 6 hours, Every night
@every 1h
Check when Forgejo starts
CFG_FORGEJO_PACKAGE_CLEANUP_RUN_AT_START
Whether Forgejo also runs the clean-up each time it starts
Choices: true, false
true

Tools#

Forgejo'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 PasswordTested on 15.0.9

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

Asks for: Username, New password (optional)
Create User AccountTested on 15.0.9

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

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

List every user.

Delete User AccountCan't be undoneTested on 15.0.9

Permanently remove a user.

Asks for: Username
Set Admin StatusTested on 15.0.9

Promote or demote a user. Forgejo's only admin cannot be demoted.

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

Make a Forgejo access token for scripts, the container registry 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 15.0.9

Show every repository and whether it is public or private.

Works with#

These are the other apps Forgejo 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 Forgejo is your own Git hosting. LibrePortal closes sign-ups and switches off Gravatar, web CDNs and the update check, so it contacts nobody on its own.

What leaves this server#

  • Actions runners, if you add any, fetch actions from data.forgejo.org

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: GPL-3.0-or-later (from memory; verify at forgejo.org). Audited: 21 October 2026. See the privacy of every app and the Promise.

Sources#

Under the hood#

  • It runs this image: codeberg.org/forgejo/forgejo:15.0.10@sha256:7b2f61163ff1d19f2aaf62d37ae4e805e822c2f86d6628b2bd468470929beacb. 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: codeberg.org/forgejo/forgejo

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