Promox Gitea - Change HTTP Port to 80

This-ah short one.

Problem

The current Proxmox Helper Script for gitea LXC runs on port 3000. Changing it to port 80 is not so simple… until now.

Solution

First run Proxmox helper script for Gitea as usual:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/gitea.sh)"

Once completed, access the shell of the newly created LXC container.

vim /etc/gitea/app.ini

Add the following contents to /etc/gitea/app.ini:

[server]
HTTP_PORT = 80
ROOT_URL = http://gitea.lan/

Next, execute the following command (which will allow /usr/local/bin/gitea to access port 80):

sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/gitea

Restart Gitea server:

systemctl restart gitea

Then delete the file /etc/gitea/app.ini as it will collide with the Gitea Console UI setup process.

rm /etc/gitea/app.ini

Go to the Gitea Console UI and proceed as normal.