Skip to content
conf
[Unit]
Description=Your Service Description
Documentation=https://example.com/docs
After=network.target

[Service]
# User and group to run the service as
User=youruser
Group=yourgroup

# Working directory of your app
WorkingDirectory=/opt/yourapp

# Command to start your application
ExecStart=/usr/bin/env bash -c "/opt/yourapp/start.sh"

# Restart logic
Restart=always
RestartSec=5

# Environment variables (optional)
Environment="ENVIRONMENT=production"
EnvironmentFile=/etc/yourapp.env

# Set resource limits (optional)
LimitNOFILE=65535

# Logging
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=multi-user.target