; can go in /etc/systemd/system/mysite.service ; make sure to: ; $ systemctl enable ; $ systemctl start [Unit] Description=mysite Wants=network-online.target After=network-online.target [Service] ;PIDFile=/tmp/mysite.pid ExecStart=/opt/yoursite/yourbinary WorkingDirectory=/opt/yoursite/ LimitNOFILE=4096 User=root Group=root Restart=always RestartSec=10 StartLimitInterval=0 TimeoutStopSec=10s KillMode=mixed KillSignal=SIGQUIT ;PrivateDevices=true ;ProtectHome=true ;ProtectSystem=full ;PrivateTmp=true [Install] WantedBy=multi-user.target