[Unit] Description=Gitea on {{ domain }} After=syslog.target After=network.target Requires=mariadb.service [Service] # Modify these two values and uncomment them if you have # repos with lots of files and get an HTTP error 500 because # of that ### #LimitMEMLOCK=infinity #LimitNOFILE=65535 RestartSec=2s Type=simple User={{ gitea_system_user }} Group={{ gitea_system_user }} WorkingDirectory={{ gitea_installation_directory }} ExecStart="{{ gitea_binary_path }}" web -c "{{ gitea_configuration_path }}" Restart=always Environment="USER={{ gitea_system_user }}" Environment="HOME={{ gitea_user_directory }}" Environment="GITEA_WORK_DIR={{ gitea_installation_directory }}" [Install] WantedBy=multi-user.target