How to deploy TeleIRC¶
There are several ways to deploy TeleIRC persistently. This page offers suggestions on possible deployment options.
The recommended deployment method is with systemd. This method requires a basic understanding of systemd unit files. Create a unique systemd service for each TeleIRC instance.
A provided systemd service file is available.
Add the systemd unit file to
/usr/lib/systemd/system/ to activate it.
systemctl can be used to control your TeleIRC instance.
Note the provided file makes two assumptions:
- Using a dedicated system user (e.g.
- TeleIRC config files located at
/usr/lib64/teleirc/(i.e. files inside TeleIRC repository)
pm2 keeps NodeJS running in the background. If you run an application and it crashes, pm2 restarts the process. pm2 also restarts processes if the server reboots. Read the pm2 documentation for more information.
After pm2 is installed, run these commands to start TeleIRC:
cd teleirc/ pm2 start -n my-teleirc-bot teleirc.js
Arch Linux AUR¶
On ArchLinux, see teleirc-git in the AUR.
The AUR package uses the systemd method to deploy TeleIRC.
Place TeleIRC configuration files in the
Docker is another way to deploy TeleIRC.
Dockerfiles and images are available in
Which image do I choose?¶
Node Alpine Linux and Fedora images are provided.
|Node Alpine Linux (
This guide uses
If you wish to use
Building Docker image¶
You may see errors running
You can safely ignore them.
They are not fatal.
docker build . -f images/Dockerfile.alpine -t teleirc docker run -d -u teleirc --name teleirc --restart always \ -e TELEIRC_TOKEN="000000000:AAAAAAaAAa2AaAAaoAAAA-a_aaAAaAaaaAA" \ -e IRC_CHANNEL="#channel" \ -e IRC_BOT_NAME="teleirc" \ -e IRC_BLACKLIST="CowSayBot,AnotherNickToIgnore" \ -e TELEGRAM_CHAT_ID="-0000000000000" \ teleirc