Cloud agnostic cloudSwXtch Install¶
WHAT TO EXPECT
In this article, users will learn how to install a cloudSwXtch instance on an existing Linux Ubuntu 24.04 virtual machine. This installation procedure can be used on any cloud. As with any BYOL deployment, it requires a license file from swXtch.io.
Pre-Installation Step: Create the environment¶
What is needed:
- For prerequisites, see cloudSwXtch System Requirements.
- This page will use Ubuntu 24.04 (it can also be Red Hat 9, but some of the commands will be different).
- The VM needs an internet connection.
- The user must be able to log into the VM using SSH.
All the prerequisites are described in more detail in the cloudSwXtch System Requirements page.
Cloud Specifics for OCI
When creating the VM you MUST select “Hardware-assisted (SR-IOV) networking” in the “Advanced” section in the “Networking” tab. Note that sometimes when this is selected it still sets it to Paravirtualized networking. If this happens, then stop the Instance in OCI, select Edit, go to Advanced Options and select “Hardware-assisted (SR-IOV) networking”. Save and restart the Instance and validate it set properly.
For the data NIC, the netplan needs to be added to set the IP and MAC address; refer to the steps in Install cloudSwXtch via OCI Marketplace.
Do not flush or disable OCI's host firewall (iptables): the installer opens the ports the cloudSwXtch needs in it (see Host firewall below). The OCI security list must still allow them.
Cloud Specifics for GCP
A cloudSwXtch instance can’t have both NICs on the same VPC due to a GCP limitation. Two subnets, each on a different VPC network, are needed. The subnets can be peered (single-subnet operation; 1 NIC on each agent) or not (higher performance; 2 NICs on each agent).
Cloud Specifics for Azure
The data NIC should be hardware accelerated.
Docker dependency¶
cloudSwXtch needs Docker 23.0 or newer (or rootful Podman 3.4 or newer, with --container-runtime podman) installed and enabled on the VM to run. Please see "How to Install Docker on RHEL and Ubuntu" or use auto dependency resolver --auto_deps. See STEP TWO.
STEP ONE: Prepare the installation by updating the OS¶
-
Update all of the currently installed OS packages.
-
Reboot the VM.
PLEASE NOTE
On a Red Hat based OS, the equivalent command to update the OS is sudo dnf upgrade -y.
STEP TWO: Install cloudSwXtch¶
In this step, users will execute commands in their VMs to manually install a cloudSwXtch instance.
Important Arguments
The script can install one or two swXtch.io applications combined, selected with the --components argument: swxtch,omni (the default), swxtch, or omni. A cloudSwXtch installed without a co-located OMNI (--components swxtch) starts uncaptured and must be captured afterwards from the OMNI side, with the join code its installer prints — see STEP THREE.
It is recommended to have the OMNI component on a separate VM. See OMNI Server Cloud Agnostic Install.
- Connect to the VM instance that will be used as a cloudSwXtch, as a regular user with sudo rights. The installer refuses to run as root or with
sudo. -
Enter the following commands to download and install the cloudSwXtch installer script:
- The recommended method installs the
swxtchcomponent with dependencies, but without persisting configuration data:
token="si=RDONLY&spr=https&sv=2021-06-08&sr=c&sig=xyPF7SyI1cagUAEIZViqCHz7RroFTy2Fkltn2wwvMzc%3D" ver="v5.0.0" curl -X GET -H "x-ms-date: $(date -u)" "https://sdmcdevstorage.blob.core.windows.net/imagebuilder/swx-swxtch-${ver}.tar.gz?$token" -o /tmp/swx-swxtch-${ver}.tar.gz tar -xvf /tmp/swx-swxtch-${ver}.tar.gz -C /tmp; /tmp/swx-swxtch-${ver}/swx-install.sh --auto_deps --components swxtch- Optional: to check that the package is genuine before installing it, see Verify a cloudSwXtch Install Package.
-
If the dependencies are already in place, the
--auto_depscan be omitted.PLEASE NOTE
In order to use the cloudSwXtch, it must be captured by OMNI, in wXcked Eye (which runs on the OMNI/wXcked Eye server) or with swx-cli. Refer to Step Three: Capture the cloudSwXtch with OMNI, or to wXcked Eye: swXtches: Add Swxtch, on how to do this.
-
When reinstalling or upgrading, add
--persistto the last line to keep users, API keys, clusters, approvals, the capture and settings; without it, a reinstall wipes the OMNI state and the cloudSwXtch must be captured again. See What a reinstall keeps and Upgrading and Updating cloudSwXtch.
- The recommended method installs the
-
The end of the install will show the machine fingerprint needed for licensing. Copy it, then continue to Step Four: License the cloudSwXtch
-
The end of the install also shows:
- the join code, when no OMNI captured the cloudSwXtch during the install (a
--components swxtchinstall). Keep it for Step Three;swx-cli swxtch join-codeon this host shows it again. - the cloudSwXtch's key pin and the client install commands that carry it. Use these commands to install the xNICs and swXtchBridges (see Installing xNIC);
swx-cli swxtch pinon this host prints them again.
Join code (an OMNI captures this swXtch with it; 'swx-cli swxtch join-code' shows it again): swxj_<node id>.<secret> swXtch key pin: sha256//<pin> Install clients of this swXtch with: xNIC (Linux): curl -fsS -k --pinnedpubkey sha256//<pin> https://<ctrl-ip>:9443/swx/services/install/swx-xnic-install.sh | bash -s -- -t 3 ...The join code lets one OMNI take over this cloudSwXtch: keep it like a password until the capture is done.
The host reboots at the end of a new install
On a new host, the install ends with an automatic reboot that applies hugepages and CPU isolation, about 10 s after the
swx-hostd: rebootingmessage: the SSH session closes. Reconnect;swx-cli swxtch join-codeandswx-cli swxtch pinprint the join code and the client install commands again. With--host_changes confirm, the reboot waits forsudo swx-hostd apply --all. - the join code, when no OMNI captured the cloudSwXtch during the install (a
-
To apply the license, see Step Four: License the cloudSwXtch.
Where to find configuration and log files for a cloudSwXtch
Configuration files, certificates, and the license file can be found in /var/opt/swx/swxtch (for example, the license is placed at /var/opt/swx/swxtch/license.json). The cloudSwXtch's own key is
/var/opt/swx/swxtch/certs/server.key; it never leaves the host.Log files can be found at /var/log/swx/swxtch; the container logs are also available with
docker logs swx-swxtch. For more information on logging, see How to View cloudSwXtch and swXtchBridge Logs. -
Run swx-top after the cloudSwXtch is captured by the OMNI server (Step Three) and is licensed (Step Four).
-
Enter in password “changeme” when prompted. Note the password should be changed in wXcked Eye. Refer to Manage Users.

-
Note that any xNICs or swXtchBridges installed against a cloudSwXtch will not display until the cloudSwXtch is captured by the OMNI server and then the xNICs and swXtchBridges installed against the cloudSwXtch and are authorized, see Authorizations.
Secure Boot
On a host with Secure Boot, the igb_uio driver is signed through the host's DKMS, and the installer explains how to enroll the key. igb_uio is not offered on a host that cannot load or rebuild it (for example, under Secure Boot without a signed module).
Host firewall
In a host firewall that rejects unsolicited traffic (iptables, as on OCI's images, or firewalld), the swXtch control port (TCP 9443 by default) and, when OMNI is installed, the OMNI port (TCP 8443 by default) are opened at install and at every boot, with the ports the installer set. Change a port with the installer's --swxtch_port or --omni_port, as documented; the host firewall does not follow an httpPort edited in a configuration file. They are removed on uninstall; the rest of the host's rules is left as it was. With ufw nothing is changed, and the ufw commands to run are logged. Use --host_owns firewall to manage the host firewall yourself.
--swxtch_port and --omni_port cannot be one of the ports the swXtch itself uses (443, 7150, 9002–9005 and 10002–10004): the installer refuses them before changing anything.
Listener ports you choose for your own adaptors (SRT, RIST, UDP) are not opened: allow them in your host firewall, as in the cloud security rules. wXcked Eye's Network / Firewall tab shows each one with its state. See Network and Firewall Requirements.
Help Arguments¶
To get a list of arguments that can be used during the installation, use the help command.
A list of installation arguments will display as shown below:
Usage: ./swx-install.sh [OPTIONS]
-c, --ctrl_interface <interface name> manually select control interface
-d, --data_interface <interface name> manually select data interface
--auto_deps automatically install dependencies and setup environment
--container-runtime <docker|podman> container runtime to install and use (default: the one holding an existing install, else docker)
--dpdk_driver <mode> DPDK driver mode (hardware|igb_uio|vfio-pci|af_packet|af_xdp|pcap)
--install_igb_uio <true|false> install igb_uio driver and its required dependencies (default: true; false when every NIC is Mellanox or Azure MANA)
false with --dpdk_driver igb_uio: use the host's own igb_uio build (any order)
--persist keep persistence folder (default: do not keep it); -c, -d, --dpdk_driver,
--install_igb_uio, --host_owns firewall and --syslog_passthrough left out keep the installed values
--components <list> components to install/uninstall: swxtch,omni (default), omni, swxtch
--force-install install even if another swx data-plane component is present
--no-bootstrap skip post-install onboarding: OMNI admin-user creation AND swxtch capture/registration with OMNI
--capture-token <token> swXtch: let the OMNI that created this token (swx-cli swxtches capture-token) capture it
by address, with no join code (also SWX_CAPTURE_TOKEN)
--absolute_session_expiry OMNI: sessions end 60 min and refresh tokens 24 h after login, however active
(default: off, only inactivity ends them; also switchable in the UI).
Seeds a new OMNI only: once OMNI has stored it (--persist), the UI value wins
--swxtch_port <port> swXtch control (HTTPS) port (default: the installed one, else 9443)
--omni_port <port> OMNI HTTPS port (default: the installed one, else 8443)
--data_port <port> swXtch data (UDP) port (default: the installed one, else 9999)
--host_owns firewall (see --host_owns) do not open the cloudSwXtch's TCP ports (swXtch and OMNI)
in an active host firewall, and remove the openings an earlier install made
ports you choose for your own adaptor listeners are not opened;
allow them in your host firewall
--syslog_passthrough [true|false] also send the swXtch's and OMNI's messages through rsyslog (default: journal only), for an
rsyslog forwarder in a file read after /etc/rsyslog.d/30-swx.conf;
false stops them again on a --persist reinstall that would keep it
--host_changes <auto|confirm> host changes swx-hostd makes for the swXtch (boot configuration, reboots,
irqbalance): auto applies them, confirm waits for 'sudo swx-hostd apply'
or the UI (default: the policy in place, else auto)
--skip-tcp-tune swXtch: no TCP tuning (/etc/sysctl.d/81-swxtch-tcp-swxtch.conf), and remove
the one an earlier install wrote (its values stay until the next boot)
--skip-socket-tune swXtch: do not raise the adaptor socket caps (/etc/sysctl.d/999-swxtch-swxtch.conf),
and remove the drop-in an earlier install wrote
--host_owns <list|none> host resources you manage yourself, comma separated: boot (kernel
command line and hugepages), isolation, reboot, driver (igb_uio),
nic_tuning, irqs, sysctl, firewall, routes. swXtch changes nothing there and
reports what it needs; none gives them all to swXtch (default: what
this host has, else none)
-u, --uninstall uninstall the selected --components (default: both); also removes the legacy layout
-h | --help shows this help
Requires Ubuntu 22.04/24.04/26.04 or RHEL/Rocky/AlmaLinux 9/10 on the distribution's own kernel (cloud variants included).
Unless every NIC is Mellanox or Azure MANA, igb_uio is built on the host: dkms, gcc, make and the kernel
headers for the running kernel must be installable (--auto_deps installs them; stage them when air-gapped).
An unknown flag is refused, and the error names it.
host_changes argument
The cloudSwXtch runs without privileges. Its host changes (hugepages and CPU isolation in the boot configuration, the reboot that applies them, the data NIC's driver, kernel modules, IRQ placement) are made by the host service swx-hostd. With --host_changes confirm, each change waits until you approve it with sudo swx-hostd apply; the default, auto, applies them as before. See Host Changes and swx-hostd.
The installer checks first that the container runtime can run the cloudSwXtch unprivileged: Docker 23.0 or Podman 3.4 or newer, and, for an igb_uio data NIC (the default on AWS ENA and GCP gVNIC, for example), AppArmor or SELinux confining the containers. Otherwise it stops before changing anything. See Component Privileges.
dpdk_driver argument
--dpdk_driver af_xdp is available. On AWS (ENA) it sets the data NIC's MTU to 1774; datagrams of 9001 B still pass. To go back, reinstall with --persist --dpdk_driver hardware: the MTU returns to 9001. An unknown or empty value is refused before anything changes.
components argument
Without adding the --components argument, both the cloudSwXtch and the OMNI/wXcked Eye are installed, and the installer captures the co-located cloudSwXtch into its OMNI with the cloudSwXtch's join code. Only one OMNI/wXcked Eye is needed per installation set — it displays and manages all of your cloudSwXtches.
Additional cloudSwXtches are installed with --components swxtch and start uncaptured: an administrator must capture them from the OMNI with the join code their installer printed, either in the wXcked Eye user interface (see wXcked Eye swXtches) or with swx-cli swxtches add. The capture hands OMNI's keys and a certificate from OMNI's CA to the new cloudSwXtch; until it happens, the cloudSwXtch refuses every signed request and cannot be used.
capture-token argument
To install many cloudSwXtches without copying a join code from each one, create a capture token on OMNI (swx-cli swxtches capture-token, or Capture tokens in the Fleet panel) and pass the same token to each installer with --capture-token <token> (or SWX_CAPTURE_TOKEN in the environment, which keeps it off the command line). OMNI then captures each of them by address: Fleet → + Add a swXtch with the token, or swx-cli swxtches add --addresses <ctrl-ip>:9443 --capture-token <token>. A cloudSwXtch installed with a token still prints its join code, which works too.
no-bootstrap argument
After installing, the installer finishes onboarding by itself: it creates the OMNI admin user and, when the cloudSwXtch is installed together with its OMNI, captures it into that OMNI with its join code. --no-bootstrap skips both steps, for example when automation creates the admin user and captures the cloudSwXtch itself. The first user can only be created from the OMNI host itself (swx-cli auth init -h localhost:8443 -u admin, or curl on a host that runs only OMNI; see swx-cli auth). An additional cloudSwXtch installed with --components swxtch does not need it: with no OMNI on that host, the installer only prints its join code and the swx-cli swxtches add command to run against the OMNI.
STEP THREE: Capture the cloudSwXtch with OMNI¶
Every cloudSwXtch must be captured by an OMNI before it can be used. A cloudSwXtch installed together with its OMNI (the default install) is captured by the installer: skip this step.
- OMNI install refer to Installing OMNI/wXcked Eye.
-
Capture the cloudSwXtch with the join code its installer printed. On the cloudSwXtch host,
swx-cli swxtch join-codeshows it again.- In wXcked Eye: Fleet → + Add a swXtch, enter the control IP and port and the join code. See wXcked Eye swXtches.
-
With swx-cli, signed in to the OMNI:
-
A cloudSwXtch installed with
--capture-tokenis captured with the same token instead of its join code: in the same wXcked Eye field, orswx-cli swxtches add --addresses <ctrl-ip>:9443 --capture-token <token>.
WHY THIS STEP MATTERS
Capturing the cloudSwXtch is a security operation, not just a visibility setting. The join code names the cloudSwXtch's own key, so OMNI checks it is talking to that machine before it sends anything. The capture then hands it OMNI's keys and a certificate from OMNI's CA. A cloudSwXtch that has not been captured has no user interface and cannot pass traffic, and it refuses to be captured by anyone without its join code. Capture is always driven from the OMNI side; when OMNI cannot reach the new cloudSwXtch directly, it captures it through a cloudSwXtch it already manages. See How identity and trust work.
STEP FOUR: License the cloudSwXtch¶
Using the machine fingerprint shown in the installation, swXtch.io can generate a valid license. For more information, see Licensing a cloudSwXtch. The license file goes to /var/opt/swx/swxtch/license.json on each cloudSwXtch; it is polled automatically, so no restart is needed.
NEXT STEPS
The cloudSwXtch is ready to use. The next step is to install the xNIC on each client expected to get traffic from the cloudSwXtch and swXtchBridge, if needed. See Installing xNIC for more information on preparing clients. Install them with the client install commands the installer printed (also in wXcked Eye: Install command… in the Fleet Summary tab opens Add a client). Each xNIC must also be authorized before it can be used (from System Management → Authorizations or with swx-cli clients authorize), unless it was installed with an enrol token.