Using systemd
Copy the sample gitea.service.
Uncomment any service that needs to be enabled on this host, such as MySQL.
Change the user, home directory, and other required startup values. Change thePORT or remove the -p flag if default port is used.
sudo systemctl start gitea
Using supervisor
Install supervisor by running below command in terminal:
Create a log dir for the supervisor logs:
Open supervisor config file in a file editor:
Change the user(git) and home(/home/git) settings to match the deploymentenvironment. Change the PORT or remove the -p flag if default port is used.
Lastly enable and start supervisor at boot:
sudo systemctl start supervisor