ClientX/docs/clientx.service

28 lines
624 B
SYSTEMD
Raw Permalink Normal View History

2025-05-02 10:54:42 +00:00
[Unit]
2025-05-02 16:45:36 +00:00
Description=ClientX Discord Bot via NVM-Exec
2025-05-02 10:54:42 +00:00
After=network.target
[Service]
# Path to the Node.js executable and the entry point file.
2025-05-02 16:45:36 +00:00
ExecStart=/home/USER/.nvm/nvm-exec node /home/USER/clientx/index.js
2025-05-02 10:54:42 +00:00
# Set the working directory to your project folder.
2025-05-02 16:45:36 +00:00
WorkingDirectory=/home/USER/clientx
2025-05-02 10:54:42 +00:00
# Automatically restart process if it crashes.
2025-05-02 16:45:36 +00:00
Restart=on-failure
2025-05-02 10:54:42 +00:00
# Wait 10 seconds before attempting a restart.
2025-05-02 16:45:36 +00:00
RestartSec=3
2025-05-02 10:54:42 +00:00
2025-05-02 16:45:36 +00:00
# User/Group
User=USER
Group=GROUP
2025-05-02 10:54:42 +00:00
# Set any environment variables if needed.
Environment=NODE_ENV=production
[Install]
# Start the service on multi-user run levels.
WantedBy=multi-user.target