# ───────────────────────────────────────────── # SPB Drive — Personal Cloud Drive # ───────────────────────────────────────────── # Author : Simon-Pierre Boucher # Contact : contact@spboucher.ai # File : deploy/spbdrive.service # Purpose : systemd unit (Linux alternative to pm2) # License : MIT © Simon-Pierre Boucher # ───────────────────────────────────────────── # Install: cp deploy/spbdrive.service /etc/systemd/system/ && systemctl enable --now spbdrive [Unit] Description=SPB Drive — personal cloud of Simon-Pierre Boucher After=network-online.target Wants=network-online.target [Service] Type=simple User=simon-pierreboucher WorkingDirectory=/srv/drive/app Environment=NODE_ENV=production Environment=SPBDRIVE_DATA_DIR=/srv/drive Environment=SPBDRIVE_PORT=7430 Environment=SPBDRIVE_PUBLIC_URL=https://drive.spboucher.ai ExecStart=/usr/bin/env node src/server.mjs Restart=always RestartSec=3 NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ReadWritePaths=/srv/drive [Install] WantedBy=multi-user.target