Skip to content

About

Dockerized Gunbot - Crypto Trading Bot

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Gunbot Docker

Dockerized Gunbot - Crypto Trading Bot.

Note: Gunbot only provides x86_64 (amd64) binaries. This image is built for linux/amd64 platform only. On Apple Silicon (M1/M2/M3), it runs via Rosetta/QEMU emulation.

Features

  • Multi-stage build for minimal image size
  • Persistent data volume for configs and state
  • Easy server migration - just copy the data/ folder
  • Non-root execution for security
  • Synology NAS compatible (PUID/PGID support)
  • GitHub Actions CI/CD for automated builds

Quick Start

1. Clone this repository

git clone https://github.com/YOUR_USERNAME/gunbot-docker.git
cd gunbot-docker

2. Start the container

docker compose up -d

3. Access the Web UI

Open http://localhost:3000 in your browser.

Configuration

Environment Variables

Variable Default Description
TZ UTC Timezone
PUID 1000 User ID (for NAS compatibility)
PGID 1000 Group ID (for NAS compatibility)

Ports

Port Description
3000 Web UI
5000 Alternative UI port

Volumes

The ./data directory is mounted to /data in the container. This contains:

Path Description
config.js Main configuration (exchanges, pairs, strategies)
autoconfig.json AutoConfig rules
UTAconfig.json UTA configuration
json/ Trading state and pair data
backups/ Configuration backups
customStrategies/ Custom JavaScript strategies
gunbot_logs/ Gunbot logs

Server Migration

To move to another server:

  1. Stop the container: docker compose down
  2. Copy the entire data/ folder to the new server
  3. Start on new server: docker compose up -d

Backup

Backup the data/ directory regularly. Critical files:

# Create a backup
tar -czvf gunbot-backup-$(date +%Y%m%d).tar.gz data/

# Restore from backup
tar -xzvf gunbot-backup-YYYYMMDD.tar.gz

Important: The config.js file contains your exchange API keys. Keep backups secure!

Building

Build locally (Docker)

docker compose build

Build locally (Podman)

podman build --platform linux/amd64 -t gunbot:latest .

Build with specific version

docker build --build-arg GUNBOT_VERSION=30.8.7 -t gunbot:30.8.7 .

Updating Gunbot

  1. Stop the container: docker compose down
  2. Rebuild with latest: docker compose build --no-cache
  3. Start: docker compose up -d

Your configuration in data/ is preserved.

Multiple Instances

To run multiple Gunbot instances (e.g., different exchanges):

# docker-compose.yml
services:
  gunbot-binance:
    container_name: gunbot-binance
    build: .
    ports:
      - "3001:3000"
    volumes:
      - ./data-binance:/data
    environment:
      - TZ=UTC

  gunbot-kucoin:
    container_name: gunbot-kucoin
    build: .
    ports:
      - "3002:3000"
    volumes:
      - ./data-kucoin:/data
    environment:
      - TZ=UTC

Troubleshooting

View logs

docker compose logs -f

Access container shell

docker compose exec gunbot bash

Check health

docker compose ps

First run - configure GUI port

On first run, Gunbot creates a default config.js. If you need to change the GUI port, edit data/config.js:

{
  "ws": {
    "port": 5001,
    "clientport": 3000,
    "hostname": "0.0.0.0"
  },
  "GUI": {
    "enabled": true,
    "port": 3000
  }
}

License

This Docker configuration is provided as-is. Gunbot requires a valid license from gunbot.com.

Credits

Inspired by:

About

Dockerized Gunbot - Crypto Trading Bot

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages