Skip to main content

Run MyTonCtrl in Docker

Hardware requirements:

  • 16 cores CPU
  • 128 GB RAM
  • 1TB NVME SSD OR Provisioned 64+k IOPS storage
  • 1 Gbit/s network connectivity
  • Public IP address (fixed IP address)
  • 16 TB/month traffic on peak load

Not recommended! For testing purposes only!

Variable IGNORE_MINIMAL_REQS=true turns off requirements verification of CPU/RAM.

Software requirements:

  • docker-ce

  • docker-ce-cli

  • containerd.io

  • docker-buildx-plugin

  • docker-compose-plugin

    Installation guide in official Docker

Tested operational systems:

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • Debian 11
  • Debian 12

Run MyTonCtrl v2 using official docker image:

  • Pull the image and run the node with MyTonCtrl
docker run -d --name ton-node -v <YOUR_LOCAL_FOLDER>:/var/ton-work -it ghcr.io/ton-community/ton-docker-ctrl:latest

Install and start MyTonCtrl from sources:

  1. Clone the last version of the repository
git clone https://github.com/ton-community/ton-docker-ctrl.git
  1. Go to directory
cd ./ton-docker-ctrl
  1. Indicate the necessary values in the .env file
vi .env
  1. Initiate assembling of docker image. This step involves the compilation of the latest versions of fift, validator-engine, lite-client, etc., as well as the installation and initial setup of MyTonCtrl.
docker compose build ton-node
  1. Start of MyTonCtrl
docker compose up -d

Migrate non-Docker fullnode or validator to a dockerized MyTonCtrl v2

Specify paths to TON binaries and sources, as well as to TON work directory, but most importantly to MyTonCtrl settings and wallets.

docker run -d --name ton-node --restart always \
-v <EXISTING_TON_WORK_FOLDER>:/var/ton-work \
-v /usr/bin/ton:/usr/bin/ton \
-v /usr/src/ton:/usr/src/ton \
-v /home/<USER>/.local/share:/usr/local/bin \
ghcr.io/ton-community/ton-docker-ctrl:latest

Variables setting:

Variables indicated in the file .env

  • GLOBAL_CONFIG_URL - Network configs of TON Blockchain (default: Testnet)
  • MYTONCTRL_VERSION - Git branch from which MyTonCtrl assembled
  • TELEMETRY - Enabling/Disabling telemetry
  • MODE - Set MyTonCtrl in the indicated mode (validator or liteserver)
  • IGNORE_MINIMAL_REQS - Ignore hardware requirements

Stop and delete MyTonCtrl:

  1. Stop container
docker compose stop
  1. Delete container
docker compose down
  1. Delete container with data
docker compose down --volumes

Connection to MyTonCtrl:

docker compose exec -it ton-node bash -c "mytonctrl"

As soon as get connected it is possible to check the status by using the command status

MyTonCtrl> status

Reflects the list of accessible commands help

MyTonCtrl> help

Review of MyTonCtrl logs:

docker compose logs

Updates of MyTonCtrl and TON:

To get the last versions of TON validator and MyTonCtrl, it is necessary to go to catalogue with docker-compose.yml and make assembling

cd ./ton-docker-ctrl
docker compose build ton-node

Once finished, start Docker Compose again

docker compose up -d

When connected to MyTonCtrl, an automatic verification for updates is performed. If any updates are detected, a message is displayed"MyTonCtrl update available. Please update it with update command."

Update is done using the update command by specifying the necessary branch

MyTonCtrl> update mytonctrl2

Change of data storage path:

By default TON and Mytoncore works are stored in /var/lib/docker/volumes/

You can change it in the file docker-compose.yml, by indicating the required route in volumes section