LogoLogo
  • What is WildBeast?
  • Guides
    • Linux guides
      • Setup
      • Running as a service
  • Fundamentals
    • Commands
      • Slash commands
        • Subcommands
        • Options
        • Buttons
      • Context menu actions
    • Jobs
  • Extras
    • VPS recommendations
    • Creating a bot account
    • Adding your bot to your server
Powered by GitBook
On this page
  • Making a new service
  • Controlling the service
  • Starting
  • Stopping
  • Start on boot
  • Restarting

Was this helpful?

Export as PDF
  1. Guides
  2. Linux guides

Running as a service

Using systemd, run WildBeast as a service for automatic (re)starting

Good to know: This guide uses systemd, we're assuming this is present on your system.

If you're using Ubuntu 20.04, you're already using systemd.

Making a new service

Start creating a new service:

sudo nano /etc/systemd/system/wildbeast.service

Copy and paste the following example:

[Unit]
After=network.target network-online.target
Requires=network.target network-online.target
StartLimitBurst=3
StartLimitIntervalSec=0

[Service]
WorkingDirectory=/REPLACE THIS
Type=simple
Restart=on-failure
RestartSec=1
User=REPLACE THIS
ExecStart=/usr/bin/env npm start

[Install]
WantedBy=multi-user.target

Pay attention to the REPLACE THIS, as you might've guessed you need to replace these values.

  • WorkingDirectory - The folder where you saved WildBeast

    For example: /home/wildbeast/WildBeast

  • User - The user that's going to run WildBeast

Controlling the service

Starting

sudo systemctl start wildbeast.service

Stopping

sudo systemctl stop wildbeast.service

Start on boot

sudo systemctl enable wildbeast.service

To undo:

sudo systemctl disable wildbeast.service

Restarting

sudo systemctl restart wildbeast.service
PreviousSetupNextCommands

Last updated 3 years ago

Was this helpful?

Do NOT use root, for safety.

create a new user