Last active
April 14, 2026 19:15
-
-
Save HorlogeSkynet/81a3a4ff2ea342dc3a77dc038cbc0e35 to your computer and use it in GitHub Desktop.
systemd unit service for Gitea server running against Redis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=Gitea (Git with a cup of tea) | |
| After=syslog.target | |
| After=network.target | |
| Wants=redis-server.service | |
| Requires=redis-server.service | |
| [Service] | |
| User=git | |
| WorkingDirectory=/var/lib/gitea/ | |
| Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea | |
| ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini | |
| # From <https://github.com/go-gitea/gitea/issues/13015#issuecomment-702739005> | |
| ExecStop=/usr/local/bin/gitea manager --config /etc/gitea/app.ini flush-queues | |
| ExecStop=/usr/local/bin/gitea manager --config /etc/gitea/app.ini shutdown | |
| RestartSec=2s | |
| Restart=always | |
| # Security options override moved to : | |
| # <https://github.com/HorlogeSkynet/systemd-hardene.d/blob/master/collection/gitea.service.d/00-hardened.conf> | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment