Skip to main content

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
status
Behavior
  • 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
set_node_argument <arg-name> [arg-value] [-d]
Behavior
  • 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.
Examples
set_node_argument --archive-ttl 86400
set_node_argument --add-shard 0:2000000000000000 0:a000000000000000
set_node_argument --archive-ttl -d

enable

Purpose: Provision or activate bundled components such as the validator console, liteserver, or auxiliary services. Syntax
enable <code>
Behavior
  • 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 running clcf automatically.
  • All routines run with elevated privileges because they create system users, service units, configuration files, or keys.
Supported codes
CodeComponentPurposeKey tasks
FNFirst node bootstrapPrepare 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.
VCValidator consoleProvide 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.
LSliteserverEnable 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.
DSDHT serverRun 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.
JRJSON-RPC frontendInstall 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.
THATON HTTP APIExpose 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.
LSPls-proxyProxy 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.
TSTON StorageProvide 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.
Example
enable FN

update

Purpose: Re-run enablement routines for installed components to pull updates or repair their configuration. Syntax
update <code>
Behavior
  • 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.
Example
update JR

plsc

Purpose: Print the current liteserver configuration JSON. Syntax
plsc
Behavior
  • 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 or clcf.

clcf

Purpose: Create or refresh the liteserver local configuration file. Syntax
clcf [-u <user>]
Behavior
  • 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.
Examples
clcf
clcf -u validator
Purpose: Display the active ls-proxy configuration file. Syntax
print_ls_proxy_config
Behavior
  • Reads /var/ls_proxy/ls-proxy-config.json (via get_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
create_ls_proxy_config_file
Behavior
  • 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: Rebuild config.json for the validator engine using existing key material (dangerous recovery). Syntax
drvcf
Behavior
  • 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
setwebpass
Behavior
  • 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.
I