You can run Gitea as service, using either systemd or supervisor. The steps below tested on Ubuntu 16.04, but those should work on any Linux distributions (with little modification).
You can run Gitea as a Linux service, using either systemd or supervisor. The steps below tested on Ubuntu 16.04, but those should work on any Linux distributions (with little modification).
#### Using systemd
## Using systemd
Copy the sample [gitea.service](https://github.com/go-gitea/gitea/blob/main/contrib/systemd/gitea.service) to `/etc/systemd/system/gitea.service`, then edit the file with your favorite editor.
@ -41,7 +41,7 @@ If you have systemd version 220 or later, you can enable and immediately start G
sudo systemctl enable gitea --now
```
#### Using supervisor
## Using supervisor
Install supervisor by running below command in terminal:
This will ensure that when the Windows machine restarts, the automatic starting of Gitea is postponed until the database is ready and thus mitigate failed startups.
## Unregister as a service
## Unregister Gitea
To unregister Gitea as a service, open a command prompt (cmd) as an Administrator and run:
To unregister Gitea as a Windows service, open a command prompt (cmd) as an Administrator and run: