[Unit] Description=Gitea (Git with a cup of tea) After=network.target Wants=postgresql.service After=postgresql.service [Service] # Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that # LimitNOFILE=524288:524288 RestartSec=2s Type=simple User=git Group=git WorkingDirectory={{ gitea_path }} # If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file # (manually creating /run/gitea doesn't work, because it would not persist across reboots) #RuntimeDirectory=gitea ExecStart={{ gitea_bin }} web --config {{ gitea_etc_path }}/app.ini Restart=always Environment=USER=git HOME=/home/git GITEA_WORK_DIR={{ gitea_path }} [Install] WantedBy=multi-user.target