MyTonInstaller commands
MyTonInstaller complements MyTonCtrl by bootstrapping and maintaining TON node components. The commands below are always available from the installer console and can also be triggered in batch mode (mytoninstaller -c "<command> ..."
). Each section documents the command’s purpose, syntax, behavior, and the supported options.
status
Purpose: Inspect whether required TON services and credentials are in place, and review the current node arguments. Syntax- Checks for the presence of validator, mytoncore, console, and liteserver artifacts under
/var/ton-work
and reports each as enabled/disabled. - Loads the active node argument list (from
set_node_argument
) and prints every flag with its stored values. - Does not modify any files, making it safe to rerun as a health check.
set_node_argument
Purpose: Add, update, or remove TON validator/validator-engine command-line arguments. Syntax- Requires at least the argument name (for example
--archive-ttl
,-M
,--add-shard
). - When additional values are provided they are concatenated and passed to the helper script
set_node_argument.py
, which edits/etc/ton/validator-engine.conf
-style settings. - Use
-d
as the final flag to delete the argument instead of setting a value. - Runs with root privileges to ensure the validator configuration is writable.
enable
Purpose: Provision or activate bundled components such as the validator console, liteserver, or auxiliary services. Syntax- Accepts one of the codes listed below and invokes the corresponding setup routine through
mytoninstaller -e enable<code>
. - If you enable the TON HTTP API (
THA
), the installer first generates a local liteserver config by runningclcf
automatically. - All routines run with elevated privileges because they create system users, service units, configuration files, or keys.
Code | Component | Purpose | Key tasks |
---|---|---|---|
FN | First node bootstrap | Prepare a fresh validator environment so MyTonCtrl can manage a node end to end. | Creates the validator system user, installs the validator engine as a systemd service, generates the initial config.json , downloads blockchain dumps, and performs the first validator start. |
VC | Validator console | Provide secure CLI access to the validator engine for MyTonCtrl and operators. | Generates server/client key pairs, wires them into validator.config.json , updates MyTonCore with console credentials, and restarts validator + MyTonCore to apply. |
LS | liteserver | Enable the local liteserver endpoint used by tooling and APIs. | Creates liteserver keys, registers them in validator.config.json , updates MyTonCore’s lite-client section, and restarts services to expose the port locally. |
DS | DHT server | Run a standalone DHT node so the validator can advertise itself through the ADNL network. | Installs and enables the TON DHT service, provisions keys, selects public ports, generates/prints the ADNL address list, and starts the daemon under systemd. |
JR | JSON-RPC frontend | Install MyTonCtrl’s JSON-RPC bridge for programmatic control. | Executes jsonrpcinstaller.sh with root privileges to deploy the service, wiring it for the current node user. |
THA | TON HTTP API | Expose the TON HTTP API backed by the local liteserver for REST-like access. | Generates a fresh liteserver config when needed and runs ton_http_api_installer.sh to install and configure the HTTP API service. |
LSP | ls-proxy | Proxy the liteserver connection for safer remote access and load balancing. | Installs the ls-proxy binary, creates a systemd unit, bootstraps the config with local liteserver credentials, and starts the proxy service. |
TS | TON Storage | Provide local TON Storage capabilities for block archives and state downloads. | Deploys tonutils-storage , configures public UDP/API ports and external IP, persists the config, registers connectivity details in MyTonCore, and starts the storage daemon. |
update
Purpose: Re-run enablement routines for installed components to pull updates or repair their configuration. Syntax- Shares the same code list and internal handler as
enable
, but intended for repeat executions when you need to refresh binaries or regenerate configs (for example after package updates). update JR
is the common shorthand for reinstalling or updating the JSON-RPC service.- Requires the same elevated privileges as
enable
because it delegates to the same installer events.
plsc
Purpose: Print the current liteserver configuration JSON. Syntax- Reads the configuration produced by
GetLiteServerConfig
(typically/usr/bin/ton/local.config.json
) and prints it as pretty JSON. - Useful for verifying that liteserver keys, ports, and peers match expectations after running
enable LS
orclcf
.
clcf
Purpose: Create or refresh the liteserver local configuration file. Syntax- Fetches the latest init block via TON API; if unavailable, falls back to the bundled
global.config.json
. - Base64-encodes the init block and invokes
mytoninstaller -e clc -i <base64>
under the specified user (defaults to the installer’s current user). - Writes
/usr/bin/ton/local.config.json
and related liteserver files so that services like TON HTTP API can start.
print_ls_proxy_config
Purpose: Display the active ls-proxy configuration file. Syntax- Reads
/var/ls_proxy/ls-proxy-config.json
(viaget_ls_proxy_config
) and prints it in formatted JSON. - Allows quick inspection of proxy targets after running
enable LSP
.
create_ls_proxy_config_file
Purpose: Placeholder for generating an ls-proxy config file. Syntax- Outputs
TODO
because the implementation is not yet implemented. - Use
print_ls_proxy_config
or edit/var/ls_proxy/ls-proxy-config.json
manually until this command is implemented.
drvcf
Purpose: Rebuildconfig.json
for the validator engine using existing key material (dangerous recovery).
Syntax
- Calls
DangerousRecoveryValidatorConfigFile
, which scans/var/ton-work/db/keyring
, recent election dumps, and mytoncore settings to reconstruct validator, liteserver, control, DHT, and ADNL entries. - Prints the reconstructed configuration and any unused keys so you can review the output before applying it manually.
- Intended for disaster recovery scenarios; it does not overwrite files automatically.
setwebpass
Purpose: Set or change the password for the MyTonCtrl web administration (JSON-RPC) interface. Syntax- Runs
/usr/src/mtc-jsonrpc/mtc-jsonrpc.py -p
, prompting for the new password and updating the credential store. - No arguments are accepted; rerun whenever you need to rotate web admin credentials.