/opt/primetradingbot.
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y ufw curl
We will use the standard directory /opt/primetradingbot.
sudo mkdir -p /opt/primetradingbot
Upload your server.bin (and config.json if you have one) to /opt/primetradingbot/.
Then set permissions:
sudo chmod +x /opt/primetradingbot/server.bin
sudo ufw allow 22/tcp
sudo ufw allow 8765/tcp
sudo ufw enable
Create the service file:
sudo nano /etc/systemd/system/primetradingbot.service
Paste this content (matches Auto-Installer configuration):
[Unit]
Description=Prime Trading Bot Server
After=network.target
[Service]
# You can change User=root to a specific user if needed
User=root
WorkingDirectory=/opt/primetradingbot
ExecStart=/opt/primetradingbot/server.bin
Restart=always
RestartSec=5
StandardOutput=append:/opt/primetradingbot/server.log
StandardError=append:/opt/primetradingbot/server.error.log
[Install]
WantedBy=multi-user.target
Save and exit (Ctrl+O, Enter, Ctrl+X).
sudo systemctl daemon-reload
sudo systemctl enable primetradingbot
sudo systemctl start primetradingbot
sudo systemctl status primetradingbot