Docker is the recommended way to run pwr-bot. It provides a consistent environment and easy setup.
Prerequisites
Docker Compose Installation Docker Compose provides the easiest way to manage pwr-bot with persistent volumes and configuration.
Clone the Repository
git clone https://github.com/FAZuH/pwr-bot
cd pwr-bot
Configure Environment
Copy the example environment file and edit it with your Discord credentials: Edit the .env file with your text editor and configure the required variables. See Configuration for details. At minimum, you must set DISCORD_TOKEN and ADMIN_ID.
Start the Bot
Run the bot in detached mode: To view logs: Managing the Bot Stop the bot
Restart the bot
Update to latest version
View logs
Docker Run Installation If you prefer to run the container directly without Docker Compose or cloning the repository:
Prepare Directories
Create directories to persist data and logs: mkdir -p pwr-bot/data pwr-bot/logs
cd pwr-bot
Run the Container
Replace the placeholder values with your actual configuration: docker run -d \
--name pwr-bot \
--restart unless-stopped \
-v $( pwd ) /data:/app/data \
-v $( pwd ) /logs:/app/logs \
-e DISCORD_TOKEN="your_discord_token_here" \
-e ADMIN_ID="your_admin_id_here" \
ghcr.io/fazuh/pwr-bot:latest
This example uses only the required variables. See Configuration for all available options. If you have a .env file in your current directory: docker run -d \
--name pwr-bot \
--restart unless-stopped \
--env-file .env \
-v $( pwd ) /data:/app/data \
-v $( pwd ) /logs:/app/logs \
ghcr.io/fazuh/pwr-bot:latest
Managing the Bot Stop the bot
Start the bot
Restart the bot
View logs
Update to latest version
Remove the bot
Volume Mounts
The Docker containers use two volume mounts:
Stores the SQLite database and other persistent data files
Stores application log files
Always ensure these volumes are mounted to persist data between container restarts. Losing the data volume means losing all subscriptions and tracked voice channel data.
Next Steps
After the bot is running:
Check the logs to ensure the bot started successfully
See the command registration steps in the Quick Start guide
Start using the bot’s features