[Unit] Description=Celery Service After=network.target [Service] Type=simple User=helios-celeryd Group=helios-celeryd WorkingDirectory=/usr/lib/python3.6/site-packages/helios-server ExecStart=celery worker --app helios --events --beat --concurrency 1 -f /home/helios-celeryd/celery.log --pidfile /home/helios-celeryd/celery.pid -s /home/helios-celeryd/celerybeat-schedule # celeryd crashes (unfortunately with $? = 0) if it looses the database connection, so auto-restart it Restart=always RestartSec=10 [Install] WantedBy=multi-user.target