Skip to content

Instantly share code, notes, and snippets.

@LearnWebCode
Created October 3, 2026 14:24
Show Gist options
  • Select an option

  • Save LearnWebCode/489d0fd4bb24842c68fc003723c5679e to your computer and use it in GitHub Desktop.

Select an option

Save LearnWebCode/489d0fd4bb24842c68fc003723c5679e to your computer and use it in GitHub Desktop.
Example service file
[Unit]
Description=My Express App
After=network.target
[Service]
Type=simple
User=debian
WorkingDirectory=/home/debian/myprojects/minecraft-express-app
ExecStart=/home/debian/.nvm/versions/node/v24.21.0/bin/node server.js
Restart=on-failure
RestartSec=10
Environment=NODE_ENV=production
# Environment=PORT=3000
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment