Skip to main content

Setup server systemd unit

info

ℹ️ Use this systemd unit to start TunGo automatically on reboot.

⚙️ Prerequisites

  1. TunGo is installed as described in Quickstart.

🛠️ Setup

1️⃣ Create the service file

sudo vim /etc/systemd/system/tungo.service

2️⃣ Paste in this configuration

[Unit]
Description=TunGo VPN Service
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=tungo s
User=root
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

3️⃣ Enable the service

sudo systemctl enable tungo.service

4️⃣ Start the service

sudo systemctl start tungo.service

5️⃣ Check its status

sudo systemctl status tungo.service