forgejo-contrib-forgejo-deb.md
Watch13
Star30
Fork
You've already forked forgejo-deb
CodeIssues 7Pull requests 1Releases 57ActivityActions
Debian packages for Forgejo
231 commits10 branches57 tags 632 KiB
Shell 97.6%
Makefile 2.4%
main
HTTPS Download ZIPDownload TAR.GZDownload BUNDLEOpen with VS CodeOpen with VSCodiumOpen with Intellij IDEA
|
All checks were successful
/ mirror (push) Successful in 29s
/ build-forgejo-deb (push) Successful in 4m5s
/ installtest-bullseye-docker (push) Successful in 31s
/ installtest-bookworm-lxc (push) Successful in 57s
/ installtest-trixie-lxc-full (push) Successful in 1m39s
/ publish-release-repo (push) Has been skipped
/ build-forgejo-deb_arm64 (push) Successful in 11m44s
/ installtest-bookworm-arm64 (push) Successful in 1m7s
/ installtest-bullseye-arm64 (push) Successful in 1m21s
/ installtest-trixie-arm64 (push) Successful in 1m36s
/ publish-release-repo_arm64 (push) Has been skipped
split mirror action to independent workflow (#173) ...
Reviewed-on:[#173](https://codeberg.org/forgejo-contrib/forgejo-deb/pulls/173)Reviewed-by: Lars Mühlbauer <[email protected]>
| 2026-06-14 14:10:57 +02:00 | | --- | --- | | .forgejo/workflows | split mirror action to independent workflow (#173) | 2026-06-14 14:10:57 +02:00 | | deb | Forgejo v15.0.3 (#171) | 2026-06-10 09:52:23 +02:00 | | etc |
| | | forgejo@f6d4219f10 | Forgejo v15.0.3 (#171) | 2026-06-10 09:52:23 +02:00 | | test-res |
| | | .auto-pr.sh |
| | | .ci-make.sh |
| | | .gitignore |
| | | .gitmodules |
| | | .scripted-action.sh | [chore] refactor workflow (#168) | 2026-06-11 00:08:03 +02:00 | | LICENSE |
| | | README.md |
| |
Project to bring Forgejo to Debian/Ubuntu as a system package with full systemd integration. This project is relatively stable for daily use, though it admittedly has some maintainership difficulties. We are currently working on automating more of the update process to allow for more streamlined updates.
You should use apt to install the package. It will take care of dependencies and online updates with minimal additional effort. The packages provided by this repo are described below.
forgejo: Production-ready build for PostgreSQL or MariaDB (no SQLite support!)forgejo-sqlite: Build with SQLite support, no manual database setup requiredforgejo-common: Common files for Forgejo v7.0.7+, required dependency for both packages aboveforgejo-bin: Package with official binary downloaded from Codeberg, common package not requiredYou can also directly download releases for manual installation. This installation method is not recommended.
Debian's integrated package manager will be used in conjunction with Forgejo's Debian package registry to install and update Forgejo and any other required software. Run the following commands to install the repository on your system:
⚠️ This procedure will install the new repository on your system. If you have previously installed the old repository, please use sudo apt purge forgejo-deb-repo forgejo-deb-repokey to remove it from your system before proceeding!
sudo apt install curl apt-transport-https
sudo curl https://code.forgejo.org/api/packages/apt/debian/repository.key -o /etc/apt/keyrings/forgejo-apt.asc
echo "deb [signed-by=/etc/apt/keyrings/forgejo-apt.asc] https://code.forgejo.org/api/packages/apt/debian lts main" | sudo tee /etc/apt/sources.list.d/forgejo.list
sudo apt update
sudo apt install forgejo-sqlite
You should now be able to access Forgejo setup by pointing a browser to http://localhost:3000. Replace forgejo-sqlite with whichever variant of the package you prefer from the list above. If you have previously installed one of these packages using the manual installation method, the commands above will use apt to update it. After installing the repository, future Forgejo updates will be installed along with system updates when running apt upgrade.
⁉️ If you wish to upgrade to the latest stable version of Forgejo instead of the LTS version, change lts to stable in /etc/apt/sources.list.d/forgejo.list, then run sudo apt update && sudo apt upgrade
#On Debian 13 (trixie) or later, you can optionally use the DEB822 source format instead of a traditional sources.list file. Click here for details (for skilled Debian users) If you wish to use DEB822 source format, use the same instructions from above, delete (or omit the creation of) the /etc/apt/sources.list.d/forgejo.list file and instead create a file called /etc/apt/sources.list.d/forgejo.sources with the following contents:
Types: deb
URIs: https://code.forgejo.org/api/packages/apt/debian
Suites: lts
Components: main
Architectures: amd64
Signed-By: /etc/apt/keyrings/forgejo-apt.asc
Remember to change the architecture according to your host system and change Suites to lts or stable according to your release cycle preferences.
Alternatively, you can use sudo apt modernize-sources to automatically convert all sources.list files on your machine to DEB822 source format. Please note that this will also convert your base system's sources.list file to debian.sources. See the Debian Wiki for more information
Join us in the #forgejo-deb Matrix channel to chat about development, support, and package updates!
You can also find us on the Forgejo Space or join us by room address: #forgejo-deb:matrix.org
The default username for Forgejo is forgejo, but it can easily be changed prior to installation. For example, if you would rather run Forgejo as user git. Download the files from the etc folder in this repository, place them in the respective directories on your filesystem, 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.
The following Forgejo versions are currently supported
| Forgejo | Supported |
|---|---|
| v15.0.x LTS | ✅ stable |
| v14.0.x | ⚠️ EOL |
| v13.0.x | ⚠️ EOL |
| v12.0.x | ⚠️ EOL |
| v11.0.x LTS | ✅ LTS |
| v7.0.x LTS | ⚠️ EOL |
This installation procedure is not recommended! It is annoying to install, difficult to maintain, and requires manual updates.
#If you wish to proceed anyway, click to expand
forgejo-common package, if requiredapt to install the package(s) from your local filesystem.sudo apt install ./forgejo*.debhttp://localhost:3000#Click to expand
You can remove the package using 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 forgejo-sqlite forgejo-common forgejo-bin
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 installed the apt repository and you would like to remove it, use sudo rm /etc/apt/keyrings/forgejo-apt.asc /etc/apt/sources.list.d/forgejo.list