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
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
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

enable

Purpose: Provision or activate bundled components such as the validator console, liteserver, or auxiliary services. Syntax
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 Example

update

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

plsc

Purpose: Print the current liteserver configuration JSON. Syntax
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
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
Purpose: Display the active ls-proxy configuration file. Syntax
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
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
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
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.