Skip to content

Instantly share code, notes, and snippets.

@ryannjohnson
Created June 15, 2020 07:17
Show Gist options
  • Select an option

  • Save ryannjohnson/fd69ba2ae36106f7dc2478f5b7ee248c to your computer and use it in GitHub Desktop.

Select an option

Save ryannjohnson/fd69ba2ae36106f7dc2478f5b7ee248c to your computer and use it in GitHub Desktop.
Put in /etc/systemd/system/
[Unit]
Description=My application %I
After=network.target
[Service]
User=ubuntu
WorkingDirectory=/home/root/projects/project
Environment=PORT=5010
ExecStart=/path/to/executable arg1 arg2
Restart=always
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment