installing gitea

Oct 20, 2023

adduser \
   --system \
   --shell /bin/bash \
   --gecos 'Git Version Control' \
   --group \
   --disabled-password \
   --home /home/git \
mkdir -p /var/lib/gitea/{custom,data,log}
chown -R git:git /var/lib/gitea/
chmod -R 750 /var/lib/gitea/
mkdir /etc/gitea
chown root:git /etc/gitea
chmod 770 /etc/gitea

# > NOTE: /etc/gitea is temporary set with write rights for user git so that Web installer could write configuration file. After installation is done, it is recommended to set rights to read-only using:

# > chmod 751 /etc/gitea
# > chmod 640 /etc/gitea/app.ini
mv gitea-1.17-linux-amd64 gitea
mv gitea /usr/local/bin/
# create this file and copy in the contents
vim /etc/systemd/system/gitea.service

# enable it (we're already root, no need to sudo)
root@billmill:~# systemctl enable gitea
Created symlink /etc/systemd/system/  /etc/systemd/system/gitea.service.

# start it
systemctl start gitea

# view it
systemctl status gitea
root@billmill:~# lsof -i -P -n | grep gitea
gitea     1587950             git    6u  IPv6 26317531      0t0  TCP *:3000 (LISTEN)
# reverse proxy to gitea {

ssh-keygen -t ed25519

↑ up