# ============================================================================== # CheckIn App V2 - Systemd Service File Example # ============================================================================== # # This file defines a systemd service for running the CheckIn App backend # # Installation: # 1. Copy this file: sudo cp deploy/systemd/checkin-app.service.example /etc/systemd/system/checkin-app.service # 2. Edit the file and replace placeholders with your actual values # 3. Reload systemd: sudo systemctl daemon-reload # 4. Enable service: sudo systemctl enable checkin-app.service # 5. Start service: sudo systemctl start checkin-app.service # 6. Check status: sudo systemctl status checkin-app.service # # Management Commands: # Start: sudo systemctl start checkin-app # Stop: sudo systemctl stop checkin-app # Restart: sudo systemctl restart checkin-app # Status: sudo systemctl status checkin-app # Logs: sudo journalctl -u checkin-app -f # # ============================================================================== [Unit] Description=CheckIn App V2 - Backend API Service Documentation=https://github.com/Cccc-owo/CheckInApp After=network.target Wants=network-online.target [Service] Type=simple # CHANGE THIS: Replace with your actual username User=username # CHANGE THIS: Replace with your actual installation path # Example: /home/username/CheckInApp WorkingDirectory=/path/to/CheckInApp # Start backend using the Python project manager ExecStart=/path/to/CheckInApp/venv/bin/python /path/to/CheckInApp/main.py backend --no-reload # Restart policy Restart=on-failure RestartSec=10s # Kill settings KillSignal=SIGTERM KillMode=mixed # Timeout settings TimeoutStartSec=60 TimeoutStopSec=30 # Resource limits LimitNOFILE=65535 # Security settings NoNewPrivileges=true # Logging StandardOutput=journal StandardError=journal SyslogIdentifier=checkin-app [Install] WantedBy=multi-user.target