After creating a new droplet and forwarding git.nunosempere.com to it... ## 1. Create a new user adduser sealtiel usermod -aG sudo sealtiel # no firewall # # ufw allow OpenSSH # clone gitea git clone https://github.com/go-gitea/gitea cd gitea git checkout v1.17.1 git switch -c v1.17.1 git checkout main git checkout v1.17.1 # download go wget https://go.dev/dl/go1.19.1.linux-amd64.tar.gz -O go.tar.gz tar -xzvf go.tar.gz sudo mv go /usr/local # follow instructions on https://go.dev/doc/install go version # download node curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt-get install -y nodejs# follow instructions on https://go.dev/doc/install ## install make sudo apt install make ## build gitea export NODE_OPTIONS=--max-old-space-size=16384 TAGS="bindata sqlite sqlite_unlock_notify" make build ## build doesn't work: install binary instead (annoying) wget -O gitea https://dl.gitea.io/gitea/1.17.1/gitea-1.17.1-linux-amd64 chmod +x gitea ## adduser sudo adduser \ --system \ --shell /bin/bash \ --gecos 'Git Version Control' \ --group \ --disabled-password \ --home /home/git \ git ## Create required directory structure ## do below with sudo 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 ## copy to bin sudo cp gitea /usr/local/bin/gitea sudo chmod +x /usr/local/bin/gitea ## wget https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/systemd/gitea.service -O gitea.service sudo mv gitea.service /etc/systemd/system/gitea.service sudo systemctl enable gitea ## systemctl restart gitea ## To do sudo chmod 750 /etc/gitea sudo chmod 640 /etc/gitea/app.ini ## Install nginx, to reverse proxy it ## https://docs.gitea.io/en-us/reverse-proxies/ ## https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-22-04 sudo systemctl reload/start/stop/restart nginx Stopped gitea for now, to continue another day. Haha, using an Sqlite3 database, the thing works! ## Add certbot ## The working directory is /var/lib/gitea