- Overview
- Features
- Requirements
- Project Structure
- Installation
- Configuration
- Accessing the Interface
- Volumes & Persistent Data
- Resource Limits
- Updating
- Managing
- Contributing
- Security
PBGui-Docker provides a ready-to-use Docker setup to deploy PBGui by msei99 β a Streamlit-based web GUI for managing Passivbot v7 trading bot instances β inside an isolated Docker container.
The image is built on Ubuntu 24.04 LTS and bundles the full dependency stack at build time:
- Python 3.12 (via the deadsnakes PPA)
- Rust toolchain (required to compile
passivbot-rust, the performance-critical Rust extension of Passivbot v7) - Ansible (used internally by PBGui for remote bot management)
- Two isolated Python virtual environments: one for PBGui (
venv_pbgui) and one for Passivbot v7 (venv_pb7)
- β‘ One-command setup β no manual Python, Rust, or Ansible installation required
- π³ Cross-platform β works on Linux, macOS, and Windows via Docker
- πΎ Persistent volumes β all data, configs, backtests, and API keys survive container restarts
- π Re-runnable setup script β can be safely run multiple times; never overwrites existing credentials
- π Security-hardened β runs with dropped Linux capabilities and
no-new-privileges; the container process runs as a non-root user whose UID/GID matches the host user that owns the bind-mounted volumes - π©Ί Healthcheck built-in β Docker automatically monitors the Streamlit interface
- π₯οΈ TrueNAS SCALE compatible β
install.shdetects TrueNAS environments and adapts accordingly
- Docker v25+
- Docker Compose v2.20+
- A valid exchange API key (Bybit, Bitget, OKX, Binance and many others) for Passivbot v7
pbgui-docker/
βββ Dockerfile # Container image definition (Ubuntu 24.04 LTS + Python 3.12 + Rust)
βββ docker-compose.yml # Service orchestration with volumes, ports, and security config
βββ install.sh # Installation script
βββ README.md # This file
βββ userdata/ # Created by the installer β all persistent data lives here
βββ api-keys.json # Exchange API credentials
βββ configs/ # secrets.toml and other app-level config
βββ pbgui_data/ # PBGui runtime state, bot list, UI settings
βββ historical_data/ # Downloaded OHLCV market data
βββ pb7/ # Passivbot v7 configs, backtests, and optimisation results
install.sh handles the entire setup: checks prerequisites, clones the repository, creates the directory structure, guides you through initial configuration, builds and starts the Docker container, and verifies that the service is healthy.
| Minimum | Recommended | |
|---|---|---|
| CPU | 2 cores | 4+ cores |
| RAM | 4GB | 8GB+ |
| Disk | 20GB free | 50GB+ free |
| OS | Any Linux with Docker | Ubuntu Server 26.04 LTS / TrueNAS |
Note: The first build compiles a Rust extension (
passivbot-rust) and may take 5-10 minutes depending on your hardware. Subsequent builds are much faster thanks to Docker layer caching.
Required software:
- Docker v20.10+
- Docker Compose v2.0+ (plugin, not standalone)
- Git
curl -fsSL https://raw.githubusercontent.com/dreamelite96/pbgui-docker/main/install.sh -o /tmp/install.sh && sudo bash /tmp/install.sh && sudo rm /tmp/install.shThe script can also be run locally from an already-cloned repository:
sudo ./install.shThe installer walks you through a short interactive setup. All prompts have a default value β press Enter to accept it.
-
Host Docker user β the OS account that will own the repository files and run Docker commands (
docker compose up,docker logs, β¦)- Create a new
pbguiuser (recommended) β a dedicated account is created; its UID and GID are used both to own the files on the host and to run the process inside the container, so bind-mounted volumes are always accessible from both sides without permission errors - Use an existing user β the installer checks that the account exists and belongs to the
dockergroup (or offers to add it) - Continue as root β no host user is created; the container process still runs as a non-root user with UID/GID 1000
Note: Membership in the
dockergroup grants root-level access to the host, as it allows mounting arbitrary paths and running privileged containers. Only assign it to accounts you fully control and trust. On TrueNAS, create the user from the TrueNAS UI first and then select the "existing user" option. - Create a new
-
Install directory β base path where
pbgui-docker/will be created- Default on Linux:
/opt/docker - Default on TrueNAS Scale:
/mnt/tank/docker - On TrueNAS, the installer can automatically create a ZFS dataset at the chosen path
- Default on Linux:
-
Default exchange β pre-populates
api-keys.jsonwith the exchange name (default:binance); supported values includebybit,bitget,gateio,hyperliquid,okx,kucoin,bingx. Real API credentials are added later from the Web UI. -
Password protection β optionally set a login password for the Web UI. Can be enabled or changed at any time from the Web UI or by editing
userdata/configs/secrets.toml.
Once the installer reports PBGui is up and running:
- Open the Web UI at http://<your-host-ip>:8501
- Add your exchange Wallet Address and Private Key under System β API-Keys
- Add your CoinMarketCap API key under System β API-Keys
- You're ready β create your first bot instance under PBv7 β Run
API keys can be configured directly from the PBGui web interface at http://<your-host-ip>:8501 β no manual file editing required.
Alternatively, you can edit userdata/api-keys.json directly:
{
"default_user": {
"exchange": "YOUR_EXCHANGE",
"key": "YOUR_API_KEY",
"secret": "YOUR_API_SECRET"
}
}The PBGui-Docker installer will ask you to set a password for the Web UI directly, but you can also set it from the PBGui web interface at http://<your-host-ip>:8501.
Alternatively, you can enable it manually by editing userdata/configs/secrets.toml and adding:
password = "your-strong-password"| Interface | URL |
|---|---|
| WebUI (Streamlit) | http://<your-host-ip>:8501 |
| New WebUI (FastAPI) | http://<your-host-ip>:8000 |
All persistent data is stored under ./userdata/ on the host and mapped into the container:
| Host path | Container path | Description |
|---|---|---|
./userdata/pbgui_data |
/app/pbgui/data |
PBGui runtime state, bot list, UI settings |
./userdata/configs/secrets.toml |
/app/pbgui/.streamlit/secrets.toml |
Streamlit secrets and optional login password |
./userdata/api-keys.json |
/app/pb7/api-keys.json |
Exchange API credentials |
./userdata/historical_data |
/app/pb7/historical_data |
Downloaded OHLCV market data |
./userdata/pb7/configs |
/app/pb7/configs |
Passivbot v7 live trading configs |
./userdata/pb7/backtests |
/app/pb7/backtests |
Backtest result archives |
./userdata/pb7/optimize_results |
/app/pb7/optimize_results |
Raw optimisation output files |
./userdata/pb7/optimize_results_analysis |
/app/pb7/optimize_results_analysis |
Post-processed optimisation reports |
./userdata/pb7/caches |
/app/pb7/caches |
Cached market data |
The container is configured with the following default resource limits (adjustable in docker-compose.yml):
| Resource | Default limit |
|---|---|
| CPU | 4 cores |
| Memory | 8 GB |
PBGui and Passivbot v7 can be updated directly from the PBGui web interface at http://<your-host-ip>:8501 β no terminal access required.
If you made changes to the Dockerfile or need a fresh image build:
docker compose down
docker compose build --no-cache
docker compose up -dYour
userdata/directory is never affected by image rebuilds.
To stop and remove the PBGui-Docker container without losing its data you can run:
docker compose downTo simply pause the container without removing it you can run:
docker stop pbguiTo restart the paused container you can run:
docker start pbguiContributions, bug reports, and suggestions are welcome!
Feel free to open an Issue if you find a bug or have any questions, or submit a Pull Request if you'd like to contribute code or improvements.
If you find this project useful and want to support its development, consider buying me a coffee β it helps keep the project alive and motivates future updates!
To report a vulnerability, please follow the Security Policy. Do not open a public issue for security-sensitive matters.
This project is an independent Docker setup for PBGui by msei99. It does not redistribute, modify, or include any code from the original PBGui or Passivbot repositories. The only interaction with those projects is cloning them from GitHub at image build time.
This project, PBGui, and Passivbot are provided "as is", without any warranty of any kind. Automated trading involves significant financial risk. Neither the authors of this project or the authors of PBGui or Passivbot are responsible for any financial losses, damages, or missed profits that may result from the use of this software. Trade at your own risk.
The code in this repository is original work released under the GNU General Public License v3.0.
Copyright Β© 2026 @dreamelite96
Any use, modification, or redistribution of this project's code requires:
- Attribution to the original author
- Release of derivative works under the same GPL-3.0 license