Skip to content

EllieBot Docker Guide

The EllieBot image is toastielab.dev/elliebotdevs/elliebot:v6. It has ffmpeg, yt-dlp and Deno, so music works without more steps. The bot keeps its database and config files in /app/data.

Before you start

Start the bot

  1. Make a folder for the bot and go into it:

    mkdir -p ~/ellie && cd ~/ellie
    
  2. Create the file compose.yml (for example with nano compose.yml) with this text. Put your token in bot_token and your time zone in TZ:

    services:
      ellie:
        image: toastielab.dev/elliebotdevs/elliebot:v6
        container_name: ellie
        restart: unless-stopped
        environment:
          TZ: Europe/Rome
          bot_token: YOUR_BOT_TOKEN
        volumes:
          - ./data:/app/data
    
  3. Start the bot and show its log:

    docker compose up -d
    docker compose logs -f
    
  1. Make a folder for the bot and go into it:

    mkdir -p ~/ellie && cd ~/ellie
    
  2. Start the bot. Put your token in place of YOUR_BOT_TOKEN and your time zone in place of Europe/Rome:

    docker run -d --name ellie --restart unless-stopped \
      -e TZ=Europe/Rome \
      -e bot_token=YOUR_BOT_TOKEN \
      -v "$PWD/data:/app/data" \
      toastielab.dev/elliebotdevs/elliebot:v6
    
  3. Show the log:

    docker logs -f ellie
    

On the first start, the log shows lines like these. Then the bot comes online in your server.

[12:17:22 INF] | #0 | Pid: 1
[12:17:23 INF] | #0 | Database does not exist. Creating a new database...
[12:17:24 INF] | #0 | Shard 0 logging in ...
[12:17:25 INF] | #0 | All services loaded in 1.24s

To stop the log, press Ctrl+C. The bot continues to run.

If the log shows 401: Unauthorized, the token is wrong, and the container restarts again and again. Stop it with docker stop ellie. Then put the correct token in compose.yml and type docker compose up -d. With docker run, type docker rm -f ellie and run the command again with the correct token.

Change the settings

The bot puts its files in the data folder: creds.yml, the config files and the database file EllieBot.db. To change creds.yml, edit the file, then restart the bot:

nano data/creds.yml
docker restart ellie

The bot writes these files as root. If your user is not root, use sudo nano data/creds.yml.

bot_token in the container settings replaces the token field of creds.yml. To change the token, change bot_token and start the container again as in step 2.

Stop the bot

The bot restarts after .die, because of restart: unless-stopped. To stop the bot, type docker stop ellie.

Update the bot

cd ~/ellie
docker compose pull
docker compose up -d
cd ~/ellie
docker pull toastielab.dev/elliebotdevs/elliebot:v6
docker rm -f ellie

Then start the bot with the same docker run command as before.

The update keeps the data folder.