- Create myapp.service file
[Unit]
Description=myapp[Service]
ExecStart=<path>/start.sh
# Required on some systems
WorkingDirectory=<path>
Restart=always
# Restart service after 10 seconds if node service crashes
RestartSec=10
# Output to syslog
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=backend
User=root
Group=root
EnvironmentFile=<path>/.env[Install]
WantedBy=multi-user.target
2. Copy your service file into the /etc/systemd/system
3. Start it with systemctl start myapp
4. enable app: systemctl enable myapp
5. see log: systemctl status myapp.service