Forgejo: Difference between revisions
Instructed users to check for package manager packages first, otherwise install binary manually or use docker. |
Describe editing Docker port mappings |
||
| Line 7: | Line 7: | ||
== Step 1: Install Forgejo == | == Step 1: Install Forgejo == | ||
Go to the [https://codeberg.org/forgejo-contrib/delightful-forgejo#packaging delightful forgejo] repository and check whether Forgejo has been packaged for your operating system or distribution. If so, install using your package manager. Otherwise, go to the [https://forgejo.org/docs/latest/admin/installation/ Forgejo installation page](https://forgejo.org/releases/) , decide whether you're going to install from binary or from a docker container, and follow the corresponding instructions. | Go to the [https://codeberg.org/forgejo-contrib/delightful-forgejo#packaging delightful forgejo] repository and check whether Forgejo has been packaged for your operating system or distribution. If so, install using your package manager. Otherwise, go to the [https://forgejo.org/docs/latest/admin/installation/ Forgejo installation page](https://forgejo.org/releases/) , decide whether you're going to install from binary or from a docker container, and follow the corresponding instructions. | ||
If you're installing with Docker or Docker Compose, and want to use nonstandard ports, changing the Docker port mappings may be easier than directly editing the Forgejo configuration. | |||
Forgejo's ports are not configurable via the web UI, for Docker installations you must get a shell in the container with <code>sudo docker exec -it <container name> /bin/bash</code> and edit the config file at <code>/data/gitea/conf/app.ini</code>. | |||
== Step 2: Open Forgejo ports in your firewall == | == Step 2: Open Forgejo ports in your firewall == | ||
Revision as of 23:36, 10 September 2026
Forgejo is an open source git forge that aims to implement federation using the ActivityPub protocol. It can be self-hosted to provide code collaboration services similar to GitHub, such as remote git repositories, issue tracking, and pull/merge requests.
Step 0 (Optional): Change your SSH to a nonstandard port
Git forges provide the ability to interact via HTTP or SSH. If you want users to interact with your Forgejo instance using the standard SSH port, and you have an existing SSH server on the same device, you must move your regular SSH server to another port. Forgejo supports SSH over other ports, but all of your users will have to specify that port in their git clone commands or configure it in their ~/.ssh/ssh_config file.
To change your SSH port, edit /etc/ssh/sshd_config, uncomment the line starting with Port, and change the number to something other than 22. Open the corresponding port in your firewall. For more information on firewall configuration, see Firewalling Basics.
Step 1: Install Forgejo
Go to the delightful forgejo repository and check whether Forgejo has been packaged for your operating system or distribution. If so, install using your package manager. Otherwise, go to the Forgejo installation page(https://forgejo.org/releases/) , decide whether you're going to install from binary or from a docker container, and follow the corresponding instructions.
If you're installing with Docker or Docker Compose, and want to use nonstandard ports, changing the Docker port mappings may be easier than directly editing the Forgejo configuration.
Forgejo's ports are not configurable via the web UI, for Docker installations you must get a shell in the container with sudo docker exec -it <container name> /bin/bash and edit the config file at /data/gitea/conf/app.ini.