|
| 1 | +# Run MyTonCtrl in Docker |
| 2 | + |
| 3 | +## Hardware requirements: |
| 4 | + |
| 5 | +* 16 cores CPU |
| 6 | +* 128 GB RAM |
| 7 | +* 1TB NVME SSD OR Provisioned 64+k IOPS storage |
| 8 | +* 1 Gbit/s network connectivity |
| 9 | +* Public IP address (fixed IP address) |
| 10 | +* 16 TB/month traffic on peak load |
| 11 | + |
| 12 | +**_Not recommended!_** **_For testing purposes only!_** |
| 13 | + |
| 14 | +Variable **IGNORE_MINIMAL_REQS=true** turns off requirements verification of CPU/RAM. |
| 15 | + |
| 16 | +## Software requirements: |
| 17 | + |
| 18 | +* docker-ce |
| 19 | +* docker-ce-cli |
| 20 | +* containerd.io |
| 21 | +* docker-buildx-plugin |
| 22 | +* docker-compose-plugin |
| 23 | + |
| 24 | + _Installation guide in official [Docker](https://docs.docker.com/engine/install/)_ |
| 25 | + |
| 26 | +## Tested operational systems: |
| 27 | + |
| 28 | +* Ubuntu 20.04 |
| 29 | +* Ubuntu 22.04 |
| 30 | +* Ubuntu 24.04 |
| 31 | +* Debian 11 |
| 32 | +* Debian 12 |
| 33 | + |
| 34 | +## Installation and start MyTonCtrl: |
| 35 | + |
| 36 | +1. Clone the last version of the repository |
| 37 | +```bash |
| 38 | +git clone https://github.com/ton-community/ton-docker-ctrl.git |
| 39 | +``` |
| 40 | +2. Go to directory |
| 41 | +```bash |
| 42 | +cd ./ton-docker-ctrl |
| 43 | +``` |
| 44 | +3. Indicate the necessary values in the .env file |
| 45 | +```bash |
| 46 | +vi .env |
| 47 | +``` |
| 48 | +4. 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. |
| 49 | +```bash |
| 50 | +docker compose build ton-node |
| 51 | +``` |
| 52 | +5. Start of MyTonCtrl |
| 53 | +```bash |
| 54 | +docker compose up -d |
| 55 | +``` |
| 56 | +## Variables setting: |
| 57 | + |
| 58 | +Variables indicated in the file .env |
| 59 | +* **GLOBAL_CONFIG_URL** - Network configs of TON Blockchain (default: [Testnet](https://ton.org/testnet-global.config.json)) |
| 60 | +* **MYTONCTRL_VERSION** - Git branch from which MyTonCtrl assembled |
| 61 | +* **TELEMETRY** - Enabling/Disabling telemetry |
| 62 | +* **MODE** - Set MyTonCtrl in the indicated mode (validator or liteserver) |
| 63 | +* **IGNORE_MINIMAL_REQS** - Ignore hardware requirements |
| 64 | + |
| 65 | +## Stop and delete MyTonCtrl: |
| 66 | + |
| 67 | +1. Stop container |
| 68 | +```bash |
| 69 | +docker compose stop |
| 70 | +``` |
| 71 | +2. Delete container |
| 72 | +```bash |
| 73 | +docker compose down |
| 74 | +``` |
| 75 | +3. Delete container with data |
| 76 | +```bash |
| 77 | +docker compose down --volumes |
| 78 | +``` |
| 79 | +## Connection to MyTonCtrl: |
| 80 | +```bash |
| 81 | +docker compose exec -it ton-node bash -c "mytonctrl" |
| 82 | +``` |
| 83 | +As soon as get connected it is possible to check the status by using the command `status` |
| 84 | +```bash |
| 85 | +MyTonCtrl> status |
| 86 | +``` |
| 87 | + |
| 88 | + |
| 89 | +Reflects the list of accessible commands `help` |
| 90 | +```bash |
| 91 | +MyTonCtrl> help |
| 92 | +``` |
| 93 | +## Review of MyTonCtrl logs: |
| 94 | +```bash |
| 95 | +docker compose logs |
| 96 | +``` |
| 97 | +## Updates of MyTonCtrl and TON: |
| 98 | + |
| 99 | +To get the last versions of TON validator and MyTonCtrl, it is necessary to go to catalogue with docker-compose.yml and make assembling |
| 100 | +```bash |
| 101 | +cd ./ton-docker-ctrl |
| 102 | +docker compose build ton-node |
| 103 | +``` |
| 104 | +Once finished, start Docker Compose again |
| 105 | +```bash |
| 106 | +docker compose up -d |
| 107 | +``` |
| 108 | +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._" |
| 109 | + |
| 110 | +Update is done using the update command by specifying the necessary branch |
| 111 | +```bash |
| 112 | +MyTonCtrl> update mytonctrl2 |
| 113 | +``` |
| 114 | +## Change of data storage path: |
| 115 | + |
| 116 | +By default TON and Mytoncore works are stored in **/var/lib/docker/volumes/** |
| 117 | + |
| 118 | +You can change it in the file docker-compose.yml, by indicating the required route in **volumes** section |
0 commit comments