[Unit] Description=4NK Website Mailer (Express/Nodemailer) After=network.target [Service] Type=simple WorkingDirectory=/home/debian/website/server ExecStart=/usr/bin/node index.js Restart=always RestartSec=2 Environment=NODE_ENV=production # Optional: external environment file # Create /etc/default/4nk-mailer and uncomment the next line # EnvironmentFile=/etc/default/4nk-mailer NoNewPrivileges=true ProtectSystem=full ProtectHome=true PrivateTmp=true [Install] WantedBy=multi-user.target