Welcome to the pyTMbot Docker Hub page! This guide will walk you through setting up and running pyTMbot step-by-step, ensuring a smooth experience from initial configuration to deployment.
orenlab/pytmbot
latest
- The latest stable release image based on Alpine Linux.0.X.X
- Specific stable release versions based on Alpine Linux.alpine-dev
- Latest development version based on Alpine Linux.Before we begin, ensure you have Docker and Docker Compose installed on your system. If not, please refer to the Docker documentation for installation instructions.
To securely configure the bot, you’ll need a unique salt value for Time-Based One-Time Passwords (TOTP). Run the following command to generate it:
sudo docker run --rm orenlab/pytmbot:latest --salt
Save the generated salt for later use in the pytmbot.yaml
configuration.
Create a pytmbot.yaml
file to define your bot’s settings. Here’s how:
sudo curl -o /root/pytmbot.yaml https://raw.githubusercontent.com/orenlab/pytmbot/refs/heads/master/pytmbot.yaml.sample
nano /root/pytmbot.yaml
Please follow the instructions provided in the sample configuration.
docker-compose.yml
FileNow, create a docker-compose.yml
file to define the container configuration:
services:
pytmbot:
image: orenlab/pytmbot:latest
container_name: pytmbot
restart: on-failure
environment:
- TZ=Asia/Yekaterinburg
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /root/pytmbot.yaml:/opt/app/pytmbot.yaml:ro
security_opt:
- no-new-privileges
read_only: true
cap_drop:
- ALL
pid: host
logging:
options:
max-size: "10m"
max-file: "3"
command: --plugins monitor,outline # if needed
Start the bot using Docker Compose:
docker-compose up -d
Alternatively, you can launch the container directly with the Docker CLI:
docker run -d \
--name pytmbot \
--restart on-failure \
--env TZ="Asia/Yekaterinburg" \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
--volume /root/pytmbot.yaml:/opt/app/pytmbot.yaml:ro \
--security-opt no-new-privileges \
--read-only \
--cap-drop ALL \
--pid=host \
--log-opt max-size=10m \
--log-opt max-file=3 \
orenlab/pytmbot:latest --plugins monitor,outline
pyTMbot supports an extensive plugin system to extend its functionality. Below are examples for commonly used plugins:
The Monitor Plugin tracks system metrics and Docker events.
To monitor your Outline VPN
For more detailed plugin configurations, visit the plugins documentation.
Keep your pyTMbot image up to date by following these steps:
Stop and Remove the Current Container:
sudo docker stop pytmbot
sudo docker rm pytmbot
Pull the Latest Image:
sudo docker pull orenlab/pytmbot:latest
Restart the Container:
docker-compose up -d