Gitea Server Installation on a Raspberry Pi
Gregg
Create a ‘git’ user:
$ sudo adduser git
Login as the ‘git’ user and download the gitea binary from the gitea website (choose the latest version):
wget -O gitea https://dl.gitea.io/gitea/1.14.5/gitea-1.14.5-linux-amd64 chmod +x gitea
Create a service. We’re keeping it simple here so we don’t need a lot of the database-specific stuff:
[Unit] Description=Gitea (Git with a cup of tea) After=syslog.target After=network.target [Service] # Modify these two values and uncomment them if you have # repos with lots of files and get an HTTP error 500 because # of that #LimitMEMLOCK=infinity #LimitNOFILE=65535 RestartSec=2s Type=simple User=git Group=git WorkingDirectory=/home/git/ # If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file # (manually creating /run/gitea doesn’t work, because it would not persist across reboots) #RuntimeDirectory=gitea ExecStart=/home/git/gitea web –config /home/git/custom/conf/app.ini Restart=always Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/home/git [Install] WantedBy=multi-user.target
Enable and start Gitea at boot:
sudo systemctl enable gitea sudo systemctl start gitea