Skip to content

Instantly share code, notes, and snippets.

@TehPeGaSuS
Last active September 16, 2025 12:41
Show Gist options
  • Select an option

  • Save TehPeGaSuS/037e1873b1f76220a47210be7a3c6abf to your computer and use it in GitHub Desktop.

Select an option

Save TehPeGaSuS/037e1873b1f76220a47210be7a3c6abf to your computer and use it in GitHub Desktop.
Limnoria tricks and tips (you need venv to be activated on your user)
[Unit]
Description=Limnoria
[Service]
WorkingDirectory=/home/bot/botname
ExecStart=/path/to/venv/bin/limnoria /path/to/bot-folder/botname.conf
Restart=on-failure
[Install]
WantedBy=default.target
@TehPeGaSuS
Copy link
Author

TehPeGaSuS commented May 7, 2021

Systemd User Service

Using a systemd service is the recommended method to run Limnoira.
You must also use systemd as your init system (this is usually the case on Linux, especially newer Ubuntu/Debian systems).

To enable systemd services as normal user (tested on Ubuntu 18.04+)

Run the following commands as the shell user where you'll be running your bot:

  • loginctl enable-linger
  • mkdir -p ~/.config/systemd/user/ to create the user systemd folder
  • Place the above systemd unit inside ~/.config/systemd/user/ and name it <BOTNAME>.service
  • Run systemctl --user daemon-reload to make systemd aware of changed files, systemctl --user enable <BOTNAME>.service to make the bot start on boot, and systemctl --user start <BOTNAME>.service to start the bot.

Some Useful Commands

  • autostart on boot: systemctl --user enable <BOTNAME>.service
  • disable autostart on boot: systemctl --user disable <BOTNAME>.service
  • start the bot: systemctl --user start <BOTNAME>.service
  • stop the bot: systemctl --user stop <BOTNAME>.service
  • reload config files: systemctl --user reload <BOTNAME>.service
  • show the latest logs: journalctl --user -fu <BOTNAME>.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment