Go to file
crystal 2cbc8603ba
Support downloading binaries for experimental releases
This is a minor enhancement that allows the forgejo-bin package to match
the others, specifically when building a pull request for an official
Forgejo version that hasn't yet been released.
2024-05-01 19:57:10 -06:00
.forgejo/workflows better tag fetching 2024-05-01 17:58:21 -06:00
deb change GITEA_ to FORGEJO_ in env vars 2024-04-29 01:52:58 -06:00
etc change GITEA_ to FORGEJO_ in env vars 2024-04-29 01:52:58 -06:00
forgejo@554f3697fc Forgejo v7.0.1 2024-04-27 09:36:54 -06:00
repo-deb complex partial revert #36 #33 #32 2024-04-28 12:33:23 -06:00
.action-forgejo-mirror.sh allow for self-hosted tests 2024-04-28 08:18:23 -06:00
.ci-forgejo-apt.sh POSIX math 2023-07-02 11:42:14 -06:00
.ci-make.sh Support downloading binaries for experimental releases 2024-05-01 19:57:10 -06:00
.gitignore initial commit 2023-02-06 03:29:43 -07:00
.gitmodules [squash] Switch to Forgejo Actions 2024-04-27 18:55:53 -06:00
LICENSE add LICENSE 2023-09-10 13:44:26 -06:00
README.md [squash] Switch to Forgejo Actions 2024-04-27 18:55:53 -06:00

Debian Packages for Forgejo

Hello! If you want to run Forgejo on Debian/Ubuntu and you're looking for packages to install it to your system, you've come to the right place!

Download info

You can find the latest release downloads in the releases tab. There are currently 3 packages built by this script.

  • forgejo: A basic production-ready Forgejo build without SQLite support
  • forgejo-sqlite: A Forgejo build with SQLite support, best way to get started fast
  • forgejo-bin: A Debian package with the official Forgejo binary, in case you don't trust my builds

Installation

These packages are easy to use! Just download your preferred package, install it with sudo apt install ./forgejo*_amd64.deb and point your browser to http://localhost:3000. The package will set up Forgejo as a systemd service and take care of creating a new user for Forgejo, so all you need to do is set it up to your liking.

The default username for Forgejo's user is forgejo, but it can easily be changed prior to installation, for example if you would rather run Forgejo as user git. All you need to do is download the files from the etc folder in this repository, put them in the respective places on your system, and customize them to your liking. When you use apt to install the Forgejo package, it will create a new user with the specified settings.

Updates through apt

You can install updates for this package along with all the other software on your system with apt thanks to the Debian package registry added in Forgejo v1.20. Run the following commands to set up the repository on your system:

sudo apt install wget apt-transport-https
wget --content-disposition https://code.forgejo.org/forgejo-contrib/-/packages/debian/forgejo-deb-repo/0-0/files/2890
sudo apt install ./forgejo-deb-repo_0-0_all.deb
sudo apt update
sudo apt upgrade

If you already installed Forgejo using a package from the releases tab, it will now be automatically updated along with the rest of your system packages. If you have not yet installed Forgejo, you can now install it with apt install forgejo(-sqlite|-bin)

Removal

Removing Forgejo itself from your system is simple, just sudo apt remove forgejo(-sqlite|-bin). If you use sudo apt purge, the related configuration files will also be removed from /etc/forgejo. To avoid accidentally destroying user data, other things including the Forgejo user will be left behind. The following commands will remove everything from your system.

sudo apt purge forgejo
sudo rm -rf /var/lib/forgejo
sudo rm -rf /etc/forgejo /etc/default/forgejo /etc/systemd/system/forgejo.service.d
sudo deluser forgejo

If you customized the user or home directory before installing Forgejo, make sure to adjust the commands accordingly. If you get an error saying the files you are trying to delete do not exist, don't worry about it.

If you installed the apt repository and you would like to remove it, use sudo apt purge forgejo-deb-repo forgejo-deb-repokey