code.gitea.io/gitea@v1.21.7/contrib/systemd/gitea.service (about) 1 [Unit] 2 Description=Gitea (Git with a cup of tea) 3 After=syslog.target 4 After=network.target 5 ### 6 # Don't forget to add the database service dependencies 7 ### 8 # 9 #Wants=mysql.service 10 #After=mysql.service 11 # 12 #Wants=mariadb.service 13 #After=mariadb.service 14 # 15 #Wants=postgresql.service 16 #After=postgresql.service 17 # 18 #Wants=memcached.service 19 #After=memcached.service 20 # 21 #Wants=redis.service 22 #After=redis.service 23 # 24 ### 25 # If using socket activation for main http/s 26 ### 27 # 28 #After=gitea.main.socket 29 #Requires=gitea.main.socket 30 # 31 ### 32 # (You can also provide gitea an http fallback and/or ssh socket too) 33 # 34 # An example of /etc/systemd/system/gitea.main.socket 35 ### 36 ## 37 ## [Unit] 38 ## Description=Gitea Web Socket 39 ## PartOf=gitea.service 40 ## 41 ## [Socket] 42 ## Service=gitea.service 43 ## ListenStream=<some_port> 44 ## NoDelay=true 45 ## 46 ## [Install] 47 ## WantedBy=sockets.target 48 ## 49 ### 50 51 [Service] 52 # Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that 53 # LimitNOFILE=524288:524288 54 RestartSec=2s 55 Type=simple 56 User=git 57 Group=git 58 WorkingDirectory=/var/lib/gitea/ 59 # If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file 60 # (manually creating /run/gitea doesn't work, because it would not persist across reboots) 61 #RuntimeDirectory=gitea 62 ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini 63 Restart=always 64 Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea 65 # If you install Git to directory prefix other than default PATH (which happens 66 # for example if you install other versions of Git side-to-side with 67 # distribution version), uncomment below line and add that prefix to PATH 68 # Don't forget to place git-lfs binary on the PATH below if you want to enable 69 # Git LFS support 70 #Environment=PATH=/path/to/git/bin:/bin:/sbin:/usr/bin:/usr/sbin 71 # If you want to bind Gitea to a port below 1024, uncomment 72 # the two values below, or use socket activation to pass Gitea its ports as above 73 ### 74 #CapabilityBoundingSet=CAP_NET_BIND_SERVICE 75 #AmbientCapabilities=CAP_NET_BIND_SERVICE 76 ### 77 # In some cases, when using CapabilityBoundingSet and AmbientCapabilities option, you may want to 78 # set the following value to false to allow capabilities to be applied on gitea process. The following 79 # value if set to true sandboxes gitea service and prevent any processes from running with privileges 80 # in the host user namespace. 81 ### 82 #PrivateUsers=false 83 ### 84 85 [Install] 86 WantedBy=multi-user.target