{"id":49523030,"url":"https://github.com/dreamelite96/pbgui-docker","last_synced_at":"2026-05-05T04:01:47.808Z","repository":{"id":355113957,"uuid":"1223712857","full_name":"dreamelite96/pbgui-docker","owner":"dreamelite96","description":"🐳 Production-ready Docker setup for pbgui and Passivbot v7. Isolated environments, persistent volumes, built-in healthcheck, and TrueNAS Scale support — self-host your trading stack in minutes.","archived":false,"fork":false,"pushed_at":"2026-05-02T11:00:57.000Z","size":70,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-04T03:01:02.135Z","etag":null,"topics":["bot","crypto","cryptocurrency","docker","docker-container","passivbot","pbgui","python","python3","python312","ubuntu","ubuntu2404","ubuntu2404lts"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dreamelite96.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-28T15:26:15.000Z","updated_at":"2026-05-02T10:45:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"aeff545e-2536-43f4-9c4a-d4252c46a99f","html_url":"https://github.com/dreamelite96/pbgui-docker","commit_stats":null,"previous_names":["dreamelite96/pbgui-docker"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dreamelite96/pbgui-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamelite96%2Fpbgui-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamelite96%2Fpbgui-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamelite96%2Fpbgui-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamelite96%2Fpbgui-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreamelite96","download_url":"https://codeload.github.com/dreamelite96/pbgui-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamelite96%2Fpbgui-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32592720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","crypto","cryptocurrency","docker","docker-container","passivbot","pbgui","python","python3","python312","ubuntu","ubuntu2404","ubuntu2404lts"],"created_at":"2026-05-02T01:01:18.077Z","updated_at":"2026-05-04T03:01:14.416Z","avatar_url":"https://github.com/dreamelite96.png","language":"Shell","funding_links":["https://www.buymeacoffee.com/dreamelite96"],"categories":[],"sub_categories":[],"readme":"# PBGui-Docker\n\n[![Docker](https://img.shields.io/badge/Docker-container-2496ED?style=for-the-badge\u0026logo=docker\u0026logoColor=white)](https://www.docker.com/)\n[![Ubuntu](https://img.shields.io/badge/Ubuntu-24.04_LTS-E95420?style=for-the-badge\u0026logo=ubuntu\u0026logoColor=white)](https://ubuntu.com/)\n[![Python](https://img.shields.io/badge/Python-3.12-3776AB?style=for-the-badge\u0026logo=python\u0026logoColor=white)](https://www.python.org/)\n\n\u003ca href=\"https://www.buymeacoffee.com/dreamelite96\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me a Coffee\" width=\"200\" height=\"50\"\u003e\n\u003c/a\u003e\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Requirements](#requirements)\n- [Project Structure](#project-structure)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Accessing the Interface](#accessing-the-interface)\n- [Volumes \u0026 Persistent Data](#volumes--persistent-data)\n- [Resource Limits](#resource-limits)\n- [Updating](#updating)\n- [Managing](#managing)\n- [Contributing](#contributing)\n\n## Overview\n\n**PBGui-Docker** provides a ready-to-use Docker setup to deploy [PBGui](https://github.com/msei99/pbgui) by msei99 — a Streamlit-based web GUI for managing [Passivbot v7](https://github.com/enarjord/passivbot) trading bot instances — inside an isolated Docker container.\n\nThe image is built on **Ubuntu 24.04 LTS** and bundles the full dependency stack at build time:\n\n- **Python 3.12** (via the deadsnakes PPA)\n- **Rust toolchain** (required to compile `passivbot-rust`, the performance-critical Rust extension of Passivbot v7)\n- **Ansible** (used internally by PBGui for remote bot management)\n- Two isolated Python virtual environments: one for PBGui (`venv_pbgui`) and one for Passivbot v7 (`venv_pb7`)\n\n\n## Features\n\n- ⚡ **One-command setup** — no manual Python, Rust, or Ansible installation required\n- 🐳 **Cross-platform** — works on Linux, macOS, and Windows via Docker\n- 💾 **Persistent volumes** — all data, configs, backtests, and API keys survive container restarts\n- 🔄 **Re-runnable setup script** — can be safely run multiple times; never overwrites existing credentials\n- 🔒 **Security-hardened** — runs with dropped Linux capabilities and `no-new-privileges`\n- 🩺 **Healthcheck built-in** — Docker automatically monitors the Streamlit interface\n- 🖥️ **TrueNAS SCALE compatible** — `install.sh` detects TrueNAS environments and adapts accordingly\n\n\n## Requirements\n\n- [Docker](https://docs.docker.com/get-docker/) v20.10+\n- [Docker Compose](https://docs.docker.com/compose/install/) v2.0+\n- A valid exchange API key (Bybit, Bitget, OKX, Binance and many others) for Passivbot v7\n\n\n## Project Structure\n\n```\npbgui-docker/\n├── Dockerfile              # Container image definition (Ubuntu 24.04 LTS + Python 3.12 + Rust)\n├── docker-compose.yml      # Service orchestration with volumes, ports, and security config\n├── install.sh              # Installation script\n├── README.md               # This file\n└── userdata/               # Created by the installer — all persistent data lives here\n    ├── api-keys.json       # Exchange API credentials\n    ├── configs/            # secrets.toml and other app-level config\n    ├── pbgui_data/         # PBGui runtime state, bot list, UI settings\n    ├── historical_data/    # Downloaded OHLCV market data\n    └── pb7/                # Passivbot v7 configs, backtests, and optimisation results\n```\n\n***\n\n## Installation\n\n`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.\n\n### System Requirements\n\n|  | Minimum | Recommended |\n|---|---|---|\n| CPU | 2 cores | 4+ cores |\n| RAM | 4GB | 8GB+ |\n| Disk | 20GB free | 50GB+ free |\n| OS | Any Linux with Docker | Ubuntu Server 26.04 LTS / TrueNAS |\n\n\u003e **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.\n\n**Required software:**\n- [Docker](https://docs.docker.com/get-docker/) v20.10+\n- [Docker Compose](https://docs.docker.com/compose/install/) v2.0+ (plugin, not standalone)\n- [Git](https://git-scm.com/install/)\n\n### One-Command Install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/dreamelite96/pbgui-docker/main/install.sh -o /tmp/install.sh \u0026\u0026 sudo bash /tmp/install.sh \u0026\u0026 sudo rm /tmp/install.sh\n```\n\nThe script can also be run locally from an already-cloned repository:\n\n```bash\nsudo ./install.sh\n```\n\n### What the Installer Asks\n\nThe installer walks you through a short interactive setup. All prompts have a default value — press Enter to accept it.\n\n1. **Install directory** — base path where `pbgui-docker/` will be created\n   - Default on Linux: `/opt/docker`\n   - Default on TrueNAS Scale: `/mnt/tank/docker`\n   - On TrueNAS, the installer can automatically create a ZFS dataset at the chosen path\n\n2. **Default exchange** — pre-populates `api-keys.json` with the exchange name *(default: `binance`)*; supported values include `bybit`, `bitget`, `gateio`, `hyperliquid`, `okx`, `kucoin`, `bingx`. Real API credentials are added later from the Web UI.\n\n3. **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`.\n\n### First-Time Setup\n\nOnce the installer reports **PBGui is up and running**:\n\n1. Open the Web UI at **http://\\\u003cyour-host-ip\\\u003e:8501**\n2. Add your exchange **Wallet Address** and **Private Key** under **System → API-Keys**\n3. Add your **CoinMarketCap API key** under **System → API-Keys**\n4. You're ready — create your first bot instance under **PBv7 → Run**\n\n***\n\n## Configuration\n\n### Configure your API keys\n\nAPI keys can be configured directly from the **PBGui web interface** at `http://\u003cyour-host-ip\u003e:8501` — no manual file editing required.\n\nAlternatively, you can edit `userdata/api-keys.json` directly:\n\n```json\n{\n  \"default_user\": {\n    \"exchange\": \"YOUR_EXCHANGE\",\n    \"key\": \"YOUR_API_KEY\",\n    \"secret\": \"YOUR_API_SECRET\"\n  }\n}\n```\n\n### Enable password protection\n\nThe 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://\u003cyour-host-ip\u003e:8501`.\n\nAlternatively, you can enable it manually by editing `userdata/configs/secrets.toml` and adding:\n\n```toml\npassword = \"your-strong-password\"\n```\n\n***\n\n## Accessing the Interface\n\n| Interface | URL |\n|---|---|\n| WebUI (Streamlit) | http://\\\u003cyour-host-ip\\\u003e:8501 |\n| New WebUI (FastAPI) | http://\\\u003cyour-host-ip\\\u003e:8000 |\n\n***\n\n## Volumes \u0026 Persistent Data\n\nAll persistent data is stored under `./userdata/` on the host and mapped into the container:\n\n| Host path | Container path | Description |\n|---|---|---|\n| `./userdata/pbgui_data` | `/app/pbgui/data` | PBGui runtime state, bot list, UI settings |\n| `./userdata/configs/secrets.toml` | `/app/pbgui/.streamlit/secrets.toml` | Streamlit secrets and optional login password |\n| `./userdata/api-keys.json` | `/app/pb7/api-keys.json` | Exchange API credentials |\n| `./userdata/historical_data` | `/app/pb7/historical_data` | Downloaded OHLCV market data |\n| `./userdata/pb7/configs` | `/app/pb7/configs` | Passivbot v7 live trading configs |\n| `./userdata/pb7/backtests` | `/app/pb7/backtests` | Backtest result archives |\n| `./userdata/pb7/optimize_results` | `/app/pb7/optimize_results` | Raw optimisation output files |\n| `./userdata/pb7/optimize_results_analysis` | `/app/pb7/optimize_results_analysis` | Post-processed optimisation reports |\n| `./userdata/pb7/caches` | `/app/pb7/caches` | Cached market data |\n\n***\n\n## Resource Limits\n\nThe container is configured with the following default resource limits (adjustable in `docker-compose.yml`):\n\n| Resource | Default limit |\n|---|---|\n| CPU | 4 cores |\n| Memory | 8 GB |\n\n***\n\n## Updating\n\n### Update PBGui / Passivbot v7\nPBGui and Passivbot v7 can be updated directly from the **PBGui web interface** at `http://\u003cyour-host-ip\u003e:8501` — no terminal access required.\n\n### Rebuild the Docker image\nIf you made changes to the `Dockerfile` or need a fresh image build:\n```bash\ndocker compose down\ndocker compose build --no-cache\ndocker compose up -d\n```\n\u003e Your `userdata/` directory is never affected by image rebuilds.\n\n***\n\n## Managing\n\n### Stopping the Container\n\nTo stop and remove the PBGui-Docker container without losing its data you can run:\n```bash\ndocker compose down\n```\n\nTo simply pause the container without removing it you can run:\n```bash\ndocker stop pbgui\n```\n\n### Starting the Container\n\nTo restart the paused container you can run:\n```bash\ndocker start pbgui\n```\n\n***\n\n## Contributing\n\nContributions, bug reports, and suggestions are welcome!\n\nFeel free to open an [Issue](https://github.com/dreamelite96/pbgui-docker/issues) if you find a bug or have any questions, or submit a [Pull Request](https://github.com/dreamelite96/pbgui-docker/pulls) if you'd like to contribute code or improvements.\n\nIf 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!\n\n\u003ca href=\"https://www.buymeacoffee.com/dreamelite96\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me a Coffee\" width=\"200\" height=\"50\"\u003e\n\u003c/a\u003e\n\n***\n\n## Disclaimer\n\nThis project is an **independent** Docker setup for [PBGui](https://github.com/msei99/pbgui) by msei99.\nIt does not redistribute, modify, or include any code from the original PBGui or Passivbot repositories.\nThe only interaction with those projects is cloning them from GitHub at image build time.\n\nThis project, PBGui, and Passivbot are provided \"as is\", without any warranty of any kind. Automated trading\ninvolves significant financial risk. Neither the authors of this project or the authors of PBGui or Passivbot\nare responsible for any financial losses, damages, or missed profits that may result from the use of this\nsoftware. Trade at your own risk.\n\n***\n\n## License\n\nThe code in this repository is original work released under the **[GNU General Public License v3.0](LICENSE)**.\n\nCopyright © 2026 [@dreamelite96](https://github.com/dreamelite96)\n\nAny use, modification, or redistribution of this project's code requires:\n- Attribution to the original author\n- Release of derivative works under the same GPL-3.0 license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamelite96%2Fpbgui-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreamelite96%2Fpbgui-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamelite96%2Fpbgui-docker/lists"}