# Example systemd unit for the Celery worker WITHOUT Docker (bare-metal / VM). # Install to /etc/systemd/system/bulkmailer-worker.service, then: # sudo systemctl daemon-reload # sudo systemctl enable --now bulkmailer-worker [Unit] Description=Bulk Gmail Mailer Celery worker (real Gmail sending) After=network.target postgresql.service redis.service [Service] Type=simple User=bulkmailer Group=bulkmailer WorkingDirectory=/opt/bulkmailer EnvironmentFile=/opt/bulkmailer/.env ExecStart=/opt/bulkmailer/venv/bin/celery -A app.worker.celery_app worker \ --loglevel=INFO -Q send,control Restart=on-failure RestartSec=5 NoNewPrivileges=true ProtectSystem=full PrivateTmp=true [Install] WantedBy=multi-user.target