LightNode CLI
    en
    • cn
    • en
    • lnctl CLI Usage Guide
    • lnctl Installation Guide (Production)

    lnctl Installation Guide (Production)

    1. Default install commands#

    1.1 Linux/macOS/WSL#

    1.2 Windows PowerShell#

    irm https://s3-download.lightnode.com/lnctl/install.ps1 | iex

    2. Post-install PATH commands#

    If the script prints ✅ Installation complete!, installation is successful.
    The commands below apply only to the default install directory.
    If the script also prints Setup notes, your default install directory is not in PATH yet. Use the platform-specific command below.

    2.1 Linux/macOS/WSL#

    For the default install dir, use the command for your current shell:
    zsh:
    bash:
    other shells:

    2.2 Windows PowerShell#

    For the default install dir, you can run the following commands:
    $dir = "$HOME\.lnctl\bin"
    $userPath = [Environment]::GetEnvironmentVariable("Path", "User")
    if ([string]::IsNullOrEmpty($userPath)) {
      [Environment]::SetEnvironmentVariable("Path", $dir, "User")
    } elseif (($userPath -split ';' ) -notcontains $dir) {
      [Environment]::SetEnvironmentVariable("Path", "$userPath;$dir", "User")
    }
    $env:Path = [Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [Environment]::GetEnvironmentVariable("Path", "User")

    3. Upgrade an installed lnctl#

    After installing a production build, you can run:
    Notes:
    The upgrade continues to use the prod download source https://s3-download.lightnode.com
    lnctl upgrade does not require a LightNode API key
    On Windows, upgrade starts a helper cmd process in the current terminal for the final replacement. Keep the terminal open until the final success/failure result is printed. If you want an extra confirmation step, run lnctl --version.

    4. Windows Troubleshooting#

    If install or upgrade fails because lnctl.exe is still in use, first check whether a lingering lnctl process is still running in PowerShell:
    Get-Process lnctl -ErrorAction SilentlyContinue
    If a lingering process is found, run:
    Get-Process lnctl -ErrorAction SilentlyContinue | Stop-Process -Force
    After cleanup, retry the install or upgrade command.

    5. macOS Gatekeeper notes#

    Files downloaded by browsers and extracted in Finder may carry com.apple.quarantine and trigger Gatekeeper.
    curl download + command-line extraction (tar / unzip) usually avoids that marker.
    Current recommended install flow uses curl, so this issue is usually avoided.
    If Gatekeeper still blocks execution, run:
    Modified at 2026-06-25 07:11:40
    Previous
    lnctl CLI Usage Guide
    Built with