Running MyTonCtrl in Docker
This guide provides a step-by-step process for installing MyTonCtrl using Docker.
Hardware requirements
To ensure an optimal experience while running MyTonCtrl, here are the recommended hardware specifications:
- 16-core CPU
- 128 GB RAM
- 1 TB NVMe SSD or storage provisioned for 64k+ IOPS
- 1 Gbit/s network connectivity
- Public static IP address
- 64 TB/month traffic (100 TB/month at peak load)
This setup may not be suitable for production environments. If you’d like to bypass hardware checks for any reason, you can easily do this by setting the variable IGNORE_MINIMAL_REQS=true
.
Software requirements
To get started, please ensure you have the following software installed:
- Docker CE
- Docker CE CLI
- Containerd.io
- Docker Buildx Plugin
- Docker Compose Plugin
For detailed installation instructions, see the official Docker installation guide.
Supported operating systems
Supported:
- Ubuntu 22.04
- Ubuntu 24.04
- Debian 11
Tested (community verified, not officially supported):
- Ubuntu 20.04
- Debian 12
Running MyTonCtrl using the official Docker image
Here’s how you can pull the image and set up your MyTonCtrl node:
docker run -d --name ton-node -v <YOUR_LOCAL_FOLDER>:/var/ton-work ghcr.io/ton-blockchain/ton-docker-ctrl:latest
Installing and starting MyTonCtrl from source
If you prefer to install from source, just follow these easy steps:
- Clone the repository with the latest version:
git clone https://github.com/ton-blockchain/ton-docker-ctrl.git
- Change into the project directory:
cd ./ton-docker-ctrl
- Open the
.env
file and make any necessary updates:
vi .env
- Next, build the Docker image, which will set up everything you need—compiling the latest versions of fift, validator-engine, lite-client, and more:
docker compose build ton-node
- Finally, start MyTonCtrl:
docker compose up -d
Migrating a non-Docker full node or validator to a Dockerized MyTonCtrl
If you want to transition your existing TON setup to a Dockerized version, specify the paths for your TON binaries, source files, work directory, and MyTonCtrl settings:
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 /usr/local/bin:/usr/local/bin \
ghcr.io/ton-blockchain/ton-docker-ctrl:latest
Variable settings
In the .env
file, you can configure the following variables:
GLOBAL_CONFIG_URL
: Points to the network configurations for the TON Blockchain (default: Mainnet)MYTONCTRL_VERSION
: Indicates the Git branch used for assembling MyTonCtrlTELEMETRY
: Turn telemetry on or offMODE
: Define the mode for MyTonCtrl (either validator or liteserver)IGNORE_MINIMAL_REQS
: Option to bypass hardware requirements
Stopping and deleting MyTonCtrl
When it’s time to stop or remove your MyTonCtrl setup, here’s how you can do it:
- Stop the container:
docker compose stop
- Delete the container:
docker compose down
- To completely remove the container along with its data:
docker compose down --volumes
Alternatively, with docker run
:
docker stop ton-node
docker rm ton-node
Connecting to MyTonCtrl
You can easily connect to MyTonCtrl using this command:
docker compose exec -it ton-node mytonctrl
Or with docker run
:
docker exec -it ton-node mytonctrl
Once connected, check the status with:
MyTonCtrl> status
And if you would like to see a list of commands you can use, simply enter:
MyTonCtrl> help
Reviewing MyTonCtrl logs
Monitoring the situation is simple, as you can easily view the logs:
docker compose logs
Or with docker run
:
docker logs -f ton-node
Updating MyTonCtrl and TON
Updating your version of TON and MyTonCtrl is easy: just navigate to the directory containing your docker-compose.yml
file and rebuild.
cd ./ton-docker-ctrl
docker compose build ton-node
After that, restart Docker Compose:
docker compose up -d
When you’re connected to MyTonCtrl, it will automatically check for updates. If any are available, you’ll see a message: MyTonCtrl update available; please run the update command. To do the update, use the command below and specify the branch you want:
MyTonCtrl> update mytonctrl2
Changing the data storage path
TON and MyTonCtrl data is stored in /var/lib/docker/volumes/
by default. If you wish to change this storage path, update the required path in the volumes
section of your docker-compose.yml
file to fit your needs.