2
Description=Gitea (Git with a cup of tea)
5
# Don't forget to add the database service dependencies
14
#Wants=postgresql.service
15
#After=postgresql.service
17
#Wants=memcached.service
18
#After=memcached.service
24
# If using socket activation for main http/s
27
#After=gitea.main.socket
28
#Requires=gitea.main.socket
31
# (You can also provide gitea an http fallback and/or ssh socket too)
33
# An example of /etc/systemd/system/gitea.main.socket
37
## Description=Gitea Web Socket
38
## PartOf=gitea.service
41
## Service=gitea.service
42
## ListenStream=<some_port>
46
## WantedBy=sockets.target
51
# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
52
# LimitNOFILE=524288:524288
57
WorkingDirectory=/var/lib/gitea/
58
# If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file
59
# (manually creating /run/gitea doesn't work, because it would not persist across reboots)
60
#RuntimeDirectory=gitea
61
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
63
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
64
# If you install Git to directory prefix other than default PATH (which happens
65
# for example if you install other versions of Git side-to-side with
66
# distribution version), uncomment below line and add that prefix to PATH
67
# Don't forget to place git-lfs binary on the PATH below if you want to enable
69
#Environment=PATH=/path/to/git/bin:/bin:/sbin:/usr/bin:/usr/sbin
70
# If you want to bind Gitea to a port below 1024, uncomment
71
# the two values below, or use socket activation to pass Gitea its ports as above
73
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
74
#AmbientCapabilities=CAP_NET_BIND_SERVICE
76
# In some cases, when using CapabilityBoundingSet and AmbientCapabilities option, you may want to
77
# set the following value to false to allow capabilities to be applied on gitea process. The following
78
# value if set to true sandboxes gitea service and prevent any processes from running with privileges
79
# in the host user namespace.
85
WantedBy=multi-user.target