Sessionright

NetScaler® Firmware Upgrade via CLI: The Commands That Actually Work

By Jay H.Published Updated 10 min read

Jay H. · Founder, Sessionright
Founder of Sessionright. Twenty years running Citrix, NetScaler, Citrix Cloud, NetScaler Console, Azure and Azure Virtual Desktop estates; writes the guides and reviews the platform's rules.

Facing this upgrade this week? Walk through it with a Sessionright engineer: 15 minutes, free.

On 12 November 2026, Citrix® published CTX697305, a NetScaler ADC and Gateway bulletin whose fixed builds are 14.1-73.57 and 13.1-64.39 (the bulletin was last updated on 20 November 2026). Those builds supersede 14.1-73.46 and 13.1-64.29, the fixes for CVE-2026-107406 in CTX697191 of 8 October 2026. The examples below use 14.1-73.57; substitute your own target build in the file names. The CLI path to a fixed build is short, but easy to get wrong if you copy commands from old posts. For example, there is no install ns <build>.tgz: the install command takes a URL (NITRO install reference).

This guide is the standalone command reference. It covers what to check, where to stage the build, what installns prints, how to verify the result and what the common failures mean. Every command is taken from docs.netscaler.com or the NetScaler CLI reference. For an HA pair, the order of nodes and failovers matters more than the commands, so follow the HA pair upgrade runbook and use this page for the per-node steps.

Before you start: version, space, backup

NetScaler's guidance is to "allocate twice as much time" as you expect the upgrade to take (Before you begin). Have console or LOM access ready in case SSH does not come back.

1. Record the running build

show ns version

The ns-version reference lists two outputs: the version string and the kernel mode. Paste it into your change record; you compare against it after the reboot. It also tells you whether the jump is allowed. NetScaler recommends one major release at a time (12.1 to 13.1 to 14.1), and a direct upgrade from 13.0 to 14.1-66.x or later is blocked by the pre-checks (pre-upgrade validation). The planned 13.1 to 14.1 upgrade path guide covers that move.

2. Check disk space

shell
df -h
du -hs /var/*

The free space on /var page names the usual culprits. Traces left running in /var/nstrace are "the most common reason" for a full disk; stop them with stop nstrace. Old support bundles in /var/tmp/support, core dumps in /var/core, crash files in /var/crash and old firmware in /var/nsinstall (keep the build you are running) are the other candidates. Back up anything before you delete it.

For /flash, CTX133587 says to remove only older kernel versions and never the files used by the current build or kernel.gz.

3. Save and back up

save config
shell
cd /nsconfig
cp ns.conf ns.conf.NS<currentreleasenumber><currentbuildnumber>

Return to the CLI (Ctrl+D, as in the shell reference example), then:

create system backup -level full -comment "pre-upgrade"
show system backup

The save config and cp lines are the first steps of the documented CLI procedure. The backup syntax is from the system-backup reference. A full backup adds /nsconfig/ssl*, license* and fips* to the basic set. It lands in /var/ns_sys_backup/, which holds up to 50 backup files (backup and restore). Copy the .tgz and ns.conf copy to another machine. Before you begin, also back up /nsconfig/monitors/*.pl, /nsconfig/rc.netscaler and /var/customizations, and delete the customizations folder from the appliance. The backup and restore guide goes deeper.

If you have customised files in /etc that are symlinked from /nsconfig (for example httpd.conf or sshd_config), follow the pre-upgrade steps in customized configuration files. Otherwise, the new release's copy is not laid down.

4. Check for removed commands

check_invalid_config /nsconfig/ns.conf -buildVersion 13.1

The preconfiguration check tool runs from the shell. It writes files prefixed issues_ and deprecated_ that list classic policy expressions and removed commands. installns runs it too. However, the Before you begin page warns: "If you select option Y in the installns script for upgrading the build, the preconfiguration check is not performed."

Staging the build in /var/nsinstall

Download the firmware from the NetScaler Downloads site. The download page publishes a checksum for each package. Compare it on your workstation before you upload. Then create a directory per build:

shell
cd /var/nsinstall
mkdir 14.1
cd 14.1
mkdir build_73.57
cd build_73.57

Create the 14.1 directory only if it does not already exist. Copy the .tgz into build_73.57 "by using any file transferring method such as WinSCP". The docs' file name pattern is build-<release>-<build>_nc_64.tgz (standalone upgrade). Then extract it in place:

tar -xvzf build-14.1-73.57_nc_64.tgz

installns from the shell: pre-check, then install

Run the pre-checks on their own

./installns --pre_check

This runs the validation checks without installing anything. According to the pre-upgrade validation page, the built-in checks arrived in 14.1 build 66.x. The page lists 15 of them, each reporting SUCCESS, WARNING, FAILED or ADVISORY. The checks with documented installns overrides, plus the hard failures:

Check Default on failure Documented override
Unsaved configuration Abort --ignore_unsaved_config
HA sync (config not in sync) Abort --ignore_unsynced_config
SSL certificate file integrity (digest) Abort -C
nsapi_mgr symbols in startup files Cancel -p
License server connectivity (pooled) Continue -E
File-based licensing in use Blocked --skip_lic_exp_chk (not recommended)
Disk space, platform, step upgrade, VPX memory, SA expiry Failed Not applicable

Treat every override as a decision for the change record, not a shortcut. The page warns that bypassing the licensing check "might result in an unlicensed state after the upgrade and cause a loss of configuration."

Install

./installns

The output follows the documented example:

installns version (14.1-41.1) kernel (ns-14.1-41.1_nc.gz)
...
Copying ns-14.1-41.1_nc.gz to /flash/ns-14.1-41.1_nc.gz ...
...
Installation has completed.
Do you wish to delete old signature files and kernel images? [Y/N] N
Reboot NOW? [Y/N] Y

What each line means:

  • installns version (...) kernel (...) confirms which package you extracted. If the build is not the one you meant, stop here.
  • Copying ... to /flash/... writes the new kernel to /flash. If /flash lacks space, the appliance "aborts the installation" (downgrade page). Clean up per CTX133587 and rerun.
  • Installation has completed. The new build is installed but not running yet.
  • Delete old signature files and kernel images? The docs say "in most cases, select No". Answer Yes only if /flash lacks space.
  • Reboot NOW? Answer Y to boot the new build. If you answer N, the old build keeps running until you reboot.

The install CLI command and URL sources

You can skip the shell entirely. The NITRO install reference gives install <url> with these URL forms: http://, https://, sftp://, scp:// and ftp:// (each with optional [user]:[password]@host/path/to/file), and file://path/to/file. To run the checks first, then install from the staged file:

install file:///var/nsinstall/14.1/build_73.57/build-14.1-73.57_nc_64.tgz -preCheck
install file:///var/nsinstall/14.1/build_73.57/build-14.1-73.57_nc_64.tgz

The flags worth knowing:

  • -preCheck runs all installation pre-checks in a single step.
  • -y skips the reboot prompt.
  • -answerYesToAll, together with -dontReboot, answers every prompt but holds the reboot.
  • -deleteSigFiles deletes old signature files and kernel images.
  • -ignoreUnsavedConfig, -ignoreUnsyncedConfig, -ignorecertcheckerrors and -ignoreNsapimgrErrors bypass the matching pre-checks.
  • -exitOnLicServerConnError exits on license server connectivity errors.
  • -fipsInstall performs a FIPS installation.
  • -async returns a job ID that you track with show ns job (ns-job).

Avoid embedding passwords in scp:// or sftp:// URLs on a shared jump box, because they end up in shell history. Staging the file and using file:// keeps credentials out of the command.

Rebooting and verifying

If you answered N at the prompt or used -dontReboot, reboot from the CLI:

reboot

The reboot reference warns that unsaved configuration is lost on a standalone appliance, which is another reason to save config first. reboot -warm restarts the software "without rebooting the underlying operating system", so use a plain reboot after an upgrade.

After the appliance comes back, log on again and check:

show ns version
show ns license
show lb vserver

The version must match the build you staged. Then work through the docs' post-upgrade list: virtual servers UP, monitors UP, GSLB sites synchronising, all certificates present and all licences present. Close every browser and clear your cache before you use the GUI. If you moved customised /etc files aside, apply the post-upgrade steps from the customized files page now. Then run your own Gateway logon and app launch tests; the post-patch checklist has the full list.

Common errors and what they mean

The NetScaler upgrade errors guide goes message by message. These are the ones you are most likely to meet:

Message or symptom Cause Fix
"NetScaler Upgrade Blocked: File based licensing in use" 14.1-66.x+ target, file-based licence after 15 April 2026 Move to LAS-based licensing; take a backup first (pre-checks)
SSL certificate integrity "Verification failed" One known cause: spaces in certificate or key file names (CTX697064) Rename the files without spaces, update the certKey, rerun the pre-check
"Installation failed. [No space on file system. Please check the log file /var/tmp/install]" /var full Free space as above; read /var/tmp/install
"Installation failed. [Extraction failed, invalid tar archive?]" Truncated or wrong download Re-download and check the checksum
"Installation failed. [File does not exist]" or "[File transfer failed]" Wrong URL or path in install Check the path with ls in the build directory
"One or more commands in ns.conf failed" on reboot A command over the 255-byte limit Shorten it, for example with pattern sets (troubleshooting)
SSH fails after the upgrade Old host keys or a custom sshd_config Remove /nsconfig/ssh/ssh_host_*, review /nsconfig/sshd_config, cold reboot

The Installation failed strings come from the NITRO install use case, which lists them as the API's possible errors. If the upgrade fails outright, the troubleshooting page says to restore from the backup you took. On 14.1 build 17.x or later, a downgrade fails if the target build's config file is missing, and you need ./installns -a to pick one (downgrade standalone).

Scripting it safely

The NITRO install API is the same operation over HTTPS:

POST /nitro/v1/config/install
Cookie: NITRO_AUTH_TOKEN=<token>
Content-Type: application/json

{"install": {"url": "file:///var/nsinstall/14.1/build_73.57/build-14.1-73.57_nc_64.tgz"}}

Send it to the NSIP. The use-case page lists 201 Created for success, or 209 with a NetScaler warning; the API reference lists 200 OK, so treat any 2xx as accepted and read the body. When "y": "true" is not set and warnings are enabled, X-NITRO-WARNING carries "1120 - The configuration must be saved and the system rebooted for these settings to take effect". Failure returns 599 with one of the Installation failed messages above.

Scripting this is easy, which is the risk. A script that passes y, answerYesToAll or any ignore* flag removes every point at which a person would have read a warning. So build the script in two stages. The first stage is read-only: version, df -h, licence state and -preCheck output, written to the change record. The second stage installs and reboots, and it runs only after a named person approves that output. Keep override flags out of the default path entirely. That includes two properties the API reference lists beyond the CLI switches above: dontchecknsconf, which skips the ns.conf version equivalence check during a downgrade, and advancedoptions, a string that passes "extra flags which are not yet supported".

FAQ

How do I check the NetScaler version from the CLI?

Run show ns version. It returns the version string and kernel mode, per the CLI reference. Run it before and after the upgrade and keep both outputs.

How much free space does a NetScaler upgrade need?

7 GB in /var and at least 250 MB in /flash, according to the Before you begin page. The GUI upgrade page states a minimum of 200 MB for /flash, so plan for the higher figure.

Does a NetScaler firmware upgrade require a reboot?

Yes. installns ends with "Reboot NOW? [Y/N]" and the new build runs only after the reboot. Plan the outage, or use the HA pair procedure linked above to keep traffic flowing.

Can I upgrade a NetScaler VPX from the CLI?

Yes. The procedure is the same. The pre-checks add a VPX minimum memory check, and the Before you begin page says a VPX needs a valid CSS membership before upgrading.

Can I downgrade NetScaler from the CLI?

Yes. The downgrade page documents a CLI procedure: restore ns.conf.NS<releasenumber>, stage the older build and run installns. Then compare the configuration, because some settings can be lost.

Want a second pair of eyes?

Before you pick a target build, paste your show ns version output into the free NetScaler build and CVE checker. It maps your build to the bulletins and fixed builds in your browser and scans nothing. If you would rather not script the install yourself, Sessionright's Nightpatch runs this sequence as plan, approve, execute, including the HA ordering. It is read-only by default, and every change is approved and logged. If you would rather talk it through, book a 15-minute call: no install, no sales deck.

Sources

Check your build before the next bulletin

Paste a NetScaler build or your show ns version output into the free checker to see the CVEs that affect it, their CISA KEV status and the fixed build for your release. It runs in your browser and never touches the appliance.

Not ready for that? Talk to a Sessionright engineer: 15 minutes, free, and you leave with a next step.

Or get the next guide by email. One email per new guide, no marketing list.

New Sessionright guides by email. No marketing drip; unsubscribe in one click.

Related guides

Citrix and NetScaler are trademarks of Citrix Systems, Inc. and/or its affiliates. Azure is a trademark of the Microsoft group of companies. Sessionright is not affiliated with or endorsed by Cloud Software Group, Citrix or Microsoft.