Overview
To install and manage your own node, use the MyTonCtrl open-source tool developed by the TON Foundation. MyTonCtrl is reliable and tested on most TON nodes.
MyTonCtrl is a console application that is a convenient wrapper for fift, lite-client, and validator-engine-console. It is specifically designed to streamline wallet, domain, and validator management tasks on Linux.
We are actively seeking feedback about the installation process. If you have any questions or suggestions, please contact us.
Install MyTonCtrl
Download and execute the installation script from a non-root user account with sudo permissions:
- Ubuntu
- Debian
wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
sudo bash install.sh
wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/install.sh
su root -c 'bash install.sh'
Flags:
-d
- MyTonCtrl will download a dump of the latest blockchain state, significantly reducing synchronization time.-c <path>
- Specify a non-public liteserver for synchronization (optional).-i
- Ignore minimum requirements; use this only if you test the compilation process without running a real node.-m
- Set the mode to eithervalidator
orliteserver
.-t
- Disable telemetry.
To use testnet, pass -c https://ton.org/testnet-global.config.json
.
The default value for the -c
flag is https://ton-blockchain.github.io/global.config.json
, which is default configuration for the mainnet.
General Commands
help
No args, prints help text.
exit
No args, exits from the console.
update
Updates MyTonCtrl. Param combinations:
Format name | Format | Example | Description |
---|---|---|---|
No args | update | update | Update from current repo |
URL format | update [https://github.com/author/repo/tree/branch] | update https://github.com/ton-blockchain/mytonctrl/tree/test | Update from specified URL |
Branch Only format | update [BRANCH] | update test | Update from specified branch of current repo |
Branch Override format | update [https://github.com/authorName/repoName/tree/branchName] [BRANCH] | update https://github.com/ton-blockchain/mytonctrl/tree/master test | Update the branch specified by the second argument in the designated repository |
upgrade
Updates the node. Param combinations:
Format name | Format | Example | Description |
---|---|---|---|
No args | upgrade | upgrade | Upgrade from current repo |
URL format | upgrade [https://github.com/author/repo/tree/branch] | upgrade https://github.com/ton-blockchain/ton/tree/master | Upgrade from specified URL |
Branch Only format | upgrade [BRANCH] | upgrade master | Upgrade from specified branch of current repo |
Branch Override format | upgrade [https://github.com/authorName/repoName/tree/branchName] [BRANCH] | upgrade https://github.com/ton-blockchain/ton/tree/master testnet | Upgrade from the branch specified by the second argument of the designated repository |
status
Gets current MyTonCtrl and node status. Param combinations:
Format name | Format | Example | Description |
---|---|---|---|
No args | status | status | Full status report including validator efficiency and online validators. |
Fast | status fast | status fast | This must be used on Testnet. The status report should exclude the efficiency of validators and the count of online validators. |
installer
No args, runs the installer of TON modules (script /usr/src/mytonctrl/mytoninstaller.py
).
status_modes
No args, shows MyTonCtrl modes.
status_settings
No args, shows all available settings with their description and values.
enable_mode
Enables a specific mode.
MyTonCtrl> enable_mode <mode_name>
Example:
MyTonCtrl> enable_mode validator
disable_mode
Disables a specific mode.
MyTonCtrl> disable_mode <mode_name>
Example:
MyTonCtrl> disable_mode validator
about
Provides a description of the specified mode.
MyTonCtrl> about <mode_name>
Example:
MyTonCtrl> about validator
get
Gets the value of a specific setting in JSON format.
MyTonCtrl> get <setting_name>
Example:
MyTonCtrl> get stake
set
Sets the specified value for a given setting. Skip the check for setting existence if --force
is enabled.
MyTonCtrl> set <setting> <value> [--force]
Example:
MyTonCtrl> set stake 9000
rollback
No args, rolls back to MyTonCtrl 1.0. You should avoid using MyTonCtrl 1.0 under any circumstances.
getconfig
Retrieves and displays the JSON representation of the configuration specified by <config-id>
.
MyTonCtrl> getconfig <config_id> # config id can be omitted
Example:
MyTonCtrl> getconfig 0
get_pool_data
Retrieves and displays the JSON representation of the pool data specified by <pool-name>
or <pool-addr>
.
MyTonCtrl> get_pool_data <<pool-name> | <pool-addr>>
Example:
MyTonCtrl> get_pool_data pool_name # you can check possible pool names using ls /home/install_mytonctrl/.local/share/mytoncore/pools
Overlays
Read Custom overlays.
add_custom_overlay
Adds a custom overlay with the given <name>
using the configuration specified by <path_to_config>
.
MyTonCtrl> add_custom_overlay <name> <path_to_config>
Example:
add_custom_overlay custom /config.json
# check link from above to know what config this command requires (/v3/guidelines/nodes/custom-overlays)
list_custom_overlays
No args, prints custom overlays.
delete_custom_overlay
Deletes the custom overlay with the specified <name>
.
MyTonCtrl> delete_custom_overlay <name>
Validator
vo
Votes for the offer specified by <offer-hash>
.
MyTonCtrl> vo <offer-hash> # use `ol` to get offers
ve
No args, votes in the election.