Playbook · DGX Spark

DGX Spark cluster setup: connect two, test, choose.

How to join two DGX Sparks, prove the fast link works, and pick the right way to use both: two copies, one split model, Ray, PyTorch or Kubernetes.

Before you start: back up files you cannot replace. These steps change network settings. Cluster software must stay on a network only you can reach.

How to set up a cluster of two DGX Sparks

  1. Join the two Sparks with one approved QSFP cable, using the same port on each.
  2. Set up the link with NVIDIA Sync's Cluster Assistant, or by hand with Netplan and SSH keys.
  3. Test it: both link interfaces up, ping across, then NVIDIA's NCCL test.
  4. Choose a method. For a model that fits on one Spark, start with a copy on each. Split only when you need to.

Checked on 26 November 2026 against: NVIDIA's DGX Spark clustering page, NVIDIA Sync Cluster Assistant guide and DGX Spark playbooks (connect, NCCL v2.31.2-1), and the current vLLM, Ray, PyTorch, Kubernetes and K3s documentation. We have not yet run this playbook start to finish on our own hardware.

Watch, then follow

Connect two DGX Sparks and choose a method, in two parts.

Part 1 of 2: Connect and test the link

Video, part 1: Connect and test the link. It covers: One cable; Two ways to set it up; Set the addresses; Add SSH keys; Prove it's fast; Run the NCCL test. Chapters and transcript
Read the words of this video

Connect two DGX Sparks. Let's connect two DGX Sparks, and prove the fast link works.

The AI stack. We're at the bottom of the stack: the machines, and the cable between them.

One cable. Join them with one approved cable, using the same port on each Spark. Hold the pull tab upward, and push gently. Never force it.

Two ways to set it up. The easy way is Cluster Assistant, in NVIDIA Sync. It sets the addresses and the keys. Or do it by hand, with a network file and SSH keys. Either way, this changes network settings. Keep your normal connection working.

Set the addresses. By hand, first see which interfaces are up. One port shows up as two. Give each its own address, in a network file. Then try it. This can interrupt the network, and goes back if you don't confirm.

Add SSH keys. Copy your key to the other Spark. Check its fingerprint before you say yes. Then run a command there, with no password asked. Do the same from the other side.

Prove it's fast. Check that both link interfaces are up. Ping the other Spark, on both addresses. Ask which way the traffic goes. It should be the cable, not your home network. Then check the speed the link reports.

Run the NCCL test. Last, follow NVIDIA's NCCL playbook. It builds the test on both Sparks. Run it when both are idle, because it loads the GPUs. Keep the result, as your own baseline.

The link is tested. Keep cluster ports private. Part two helps you choose how to use both Sparks.

Slides for this part, at your own pace:

14 steps

  1. Diagram for step 1, Plug in one cable: One cable
    Diagram: One cable, for step 1

    Connect

    1. Plug in one cable

    Use one approved QSFP cable, port 0 to port 0 or port 1 to port 1.

    NVIDIA's cable list and pictures

  2. Diagram for step 2, Push gently: One cable
    Diagram: One cable, for step 2

    Connect

    2. Push gently

    Do not force the plug: it can damage the port.

    Pull tab upward. If it does not slide in, stop and check.

  3. Diagram for step 3, Easiest: NVIDIA Sync: Two ways to set it up
    Diagram: Two ways to set it up, for step 3

    Connect

    3. Easiest: NVIDIA Sync

    It rewrites network settings on both Sparks. Read the plan before you confirm.

    Open Settings, Cluster Assistant, Add New Cluster and pick both Sparks. If it succeeds, skip to the tests.

    NVIDIA's Cluster Assistant guide

  4. Diagram for step 4, Stop and check before manual changes: Two ways to set it up
    Diagram: Two ways to set it up, for step 4

    Connect

    4. Stop and check before manual changes

    The next steps change the Spark's network settings.

    Doing it by hand instead? Use one method only. Do not work through the link you are changing.

  5. Diagram for step 5, Find the interfaces: Set the addresses
    Diagram: Set the addresses, for step 5

    Connect Only if setting up by hand

    5. Find the interfaces

    One physical port shows as two interfaces. Note the two marked (Up).

    ibdev2netdev
    ip -br -4 addr
  6. Diagram for step 6, Write the network file: Set the addresses
    Diagram: Set the addresses, for step 6

    Connect Only if setting up by hand

    6. Write the network file

    Put one address on each of the two interfaces, each in its own private network. The page shows the whole file.

    sudo nano /etc/netplan/40-cx7.yaml

    The file, on this page

  7. Diagram for step 7, Try the settings: Set the addresses
    Diagram: Set the addresses, for step 7

    Connect Only if setting up by hand

    7. Try the settings

    This changes the Spark's network and can briefly interrupt it. Keep another way in.

    Confirm only if all is well. Otherwise netplan goes back.

    sudo chmod 600 /etc/netplan/40-cx7.yaml
    sudo netplan try
  8. Diagram for step 8, Copy your SSH key: Add SSH keys
    Diagram: Add SSH keys, for step 8

    Connect Only if setting up by hand

    8. Copy your SSH key

    Check the other Spark's fingerprint before you type yes. Make a key first if you have none.

    ssh-copy-id -i ~/.ssh/id_ed25519.pub USER@SPARK-TWO-LINK-ADDRESS
  9. Diagram for step 9, Sign in without a password: Add SSH keys
    Diagram: Add SSH keys, for step 9

    Connect

    9. Sign in without a password

    It should print the other Spark's name. Repeat in the other direction.

    ssh USER@SPARK-TWO-LINK-ADDRESS hostname
  10. Diagram for step 10, Are both interfaces up?: Prove it's fast
    Diagram: Prove it's fast, for step 10

    Test

    10. Are both interfaces up?

    Look for (Up) and LOWER_UP.

    ibdev2netdev
    ip -br link
  11. Diagram for step 11, Ping both paths: Prove it's fast
    Diagram: Prove it's fast, for step 11

    Test

    11. Ping both paths

    Three replies on each address, from both Sparks.

    ping -c 3 OTHER-SPARK-LINK-A-ADDRESS
    ping -c 3 OTHER-SPARK-LINK-B-ADDRESS
  12. Diagram for step 12, Check the route: Prove it's fast
    Diagram: Prove it's fast, for step 12

    Test

    12. Check the route

    The reply should name a ConnectX interface after dev.

    ip route get OTHER-SPARK-LINK-A-ADDRESS
  13. Diagram for step 13, Check the speed: Prove it's fast
    Diagram: Prove it's fast, for step 13

    Test

    13. Check the speed

    A 200 Gbit/s link reads 200000. Use your own interface name.

    cat /sys/class/net/enp1s0f1np1/speed
  14. Diagram for step 14, Run NVIDIA's NCCL test: Run the NCCL test
    Diagram: Run the NCCL test, for step 14

    Test

    14. Run NVIDIA's NCCL test

    It installs software and puts load on both GPUs. Run it only when neither Spark is doing work that matters.

    Follow NVIDIA's playbook, then save the bandwidth table.

    NVIDIA's NCCL playbook

Part 2 of 2: Choose a method

Video, part 2: Choose a method. It covers: Two Sparks, two memories; Copies, or a split; No extra cluster software; Ray, PyTorch, Kubernetes; Keep it private. Chapters and transcript
Read the words of this video

Choose how to use both. Two DGX Sparks are linked. Here's how to choose what to run on them.

Two Sparks, two memories. A cable doesn't make one big memory. Each Spark must hold its own share. And splitting doesn't promise double speed. The two keep exchanging data.

Copies, or a split. With copies, each Spark runs the whole model. It's good for several users at once. With a split, both hold parts of one model, so a bigger one can fit.

No extra cluster software. Both vLLM and SGLang have their own multi-machine options. If either Spark or the cable stops, the split model stops.

Ray, PyTorch, Kubernetes. Ray spreads Python work, and vLLM can use it to reach the second Spark. PyTorch distributed is for training, and your own code. Kubernetes restarts and organises many services. It has the most to learn.

Keep it private. Cluster traffic mostly trusts whoever can reach it. Ray, for one, can run any code sent to it. So keep cluster ports off other networks, and use SSH to get in.

Pick one and test it. The written pages show setup, checks, stopping and undo for each method.

Slides for this part, at your own pace:

8 steps

  1. Diagram for step 1, Two memories, not one: Two Sparks, two memories
    Diagram: Two Sparks, two memories, for step 1

    Choose

    1. Two memories, not one

    Each Spark must hold its own share. Only software made to split work uses both.

  2. Diagram for step 2, No promise of double speed: Two Sparks, two memories
    Diagram: Two Sparks, two memories, for step 2

    Choose

    2. No promise of double speed

    A split adds traffic between the Sparks. Measure your own model and requests.

  3. Diagram for step 3, Fits on one? Copies: Copies, or a split
    Diagram: Copies, or a split, for step 3

    Choose

    3. Fits on one? Copies

    A whole model on each Spark, behind one address.

    Two copies, one address

  4. Diagram for step 4, Too big? Split it: Copies, or a split
    Diagram: Copies, or a split, for step 4

    Choose

    4. Too big? Split it

    vLLM or SGLang put part of the model on each. If either Spark stops, the model stops.

    Split one model

  5. Diagram for step 5, Ray: Ray, PyTorch, Kubernetes
    Diagram: Ray, PyTorch, Kubernetes, for step 5

    Choose

    5. Ray

    Anyone who can reach a Ray cluster's dashboard, jobs or client ports can run code on it.

    For Python work on both machines, or a guide that asks for Ray.

    Ray cluster

  6. Diagram for step 6, PyTorch distributed: Ray, PyTorch, Kubernetes
    Diagram: Ray, PyTorch, Kubernetes, for step 6

    Choose

    6. PyTorch distributed

    For training and your own multi-machine code. It is not a model server.

    PyTorch distributed

  7. Diagram for step 7, Kubernetes: Ray, PyTorch, Kubernetes
    Diagram: Ray, PyTorch, Kubernetes, for step 7

    Choose

    7. Kubernetes

    To manage many services. It does not split a model by itself.

    Kubernetes

  8. Diagram for step 8, Keep it private: Keep it private
    Diagram: Keep it private, for step 8

    Choose

    8. Keep it private

    Isolate cluster traffic, never forward or publish its ports, and get in through SSH.

    Why, in the makers' words

Written from the makers' own documents, read on 26 November 2026 and linked below. We have not run these steps start to finish for this guide.

Choose

Which DGX Spark cluster method should you use?

One addressSpark onewhole modelSpark twowhole modelOne addressSpark onepart of the modelSpark twopart of the modelTwo copies: two separate answers at onceSplit: one answer, made together
Two copies against one split model. With copies, each request is handled by one Spark. With a split, both Sparks work on every request and talk over the cable. Our own drawing.
MethodBest forStrengthsDrawbacks
A copy on each SparkA model that fits on one Spark, with several people or jobs asking at onceSimple. Each server runs and restarts on its own. The cable is not in the path of the model's own work.No bigger model. One request gets no faster. Whatever holds the single address is still a single point of failure.
One model split in twoA model, or a context length, that does not fit on one SparkUses memory on both. No extra cluster software: vLLM and SGLang have their own multi-machine options.Both machines and the link must work or the model is down. Not promised to be faster.
RayPython work spread as many tasks, or a tool that expects Ray, including NVIDIA's two-Spark vLLM playbookOne pool of CPUs and GPUs for Python code; vLLM can use it to reach the second Spark.Another layer to run. Anyone who can reach it can run code, so it must be locked down.
PyTorch distributedTraining or fine-tuning, or your own multi-machine codeBuilt into PyTorch; one launcher, torchrun, on each machine.Not a model server. Your code must be written for it. Its network traffic is not protected.
KubernetesMany services you want described in files and restarted for you, or Kubernetes skills you already haveRestarts failed containers, gives services stable names, schedules GPU use.The most parts to learn and keep updated. With two machines, losing the control machine loses management.

Two memories, not one big one.

Cabling two Sparks does not make one Spark with twice the memory. NVIDIA's vLLM cluster playbook says each node has to hold its own share of the weights, the caches and the working memory, and that the pair does not behave as one flat pool. Only software written to split the work can use both.

Splitting does not promise twice the speed.

A split model makes the two Sparks exchange data while they work. NVIDIA's playbook puts it as more capacity plus more communication, and tells you to measure your own model and request mix. PyTorch's multi-machine tutorial makes the same point for training: four GPUs in one machine beat four machines with one GPU each.

A quick way to decide.

  1. Does your model, at the context length you need, fit on one Spark? If yes, run it on one. For more people at once, add a copy on the second.
  2. It does not fit? Split it with vLLM or SGLang itself.
  3. Your tool or guide asks for Ray? Use Ray, with its security settings.
  4. Training your own models? Use PyTorch distributed, or a library built on it.
  5. Already living in Kubernetes, or running many services? Add it on top. It does not replace any of the above; a split model inside Kubernetes still needs one of them.

A short page shows how one two-Spark pair is wired and which services sit where. This guide is the general version, from the makers' own documents.

Step 1 · Connect

How to connect two DGX Sparks: cable, addresses, SSH.

Network changes can cut you off. Keep your normal wired or Wi-Fi connection to each Spark working, and do not make these changes through the link you are changing. Choose a time when nothing important is running.

  1. Cable the two Sparks.

    Use one cable between them, plugged into the same QSFP port on each: port 0 to port 0, or port 1 to port 1. Seen from the back, port 0 is the one nearest the ordinary network socket. NVIDIA lists the approved cables; on 26 November they were Amphenol NJAAKK-N911, its 0.5 m version NJAAKK0006, and Luxshare LMTQF022-SD-R. Hold the pull tab upward and push gently.

    Do not force the plug. NVIDIA warns that forcing an upside-down or crooked connector can damage the port.

    NVIDIA's current connect and Cluster Assistant guides say a second cable between two Sparks does not add speed. More about the cable.

  2. Update both Sparks first.

    Bring both to the current DGX OS and firmware with the DGX Dashboard. NVIDIA's Cluster Assistant needs the April 2026 system release or later.

    Updates can restart the Spark. Finish or stop your own work first, and do not cut the power during an update.

  3. Easiest: let NVIDIA Sync set up the link.

    On your computer, add both Sparks to NVIDIA Sync (headless setup guide covers adding one). Then open Settings, Cluster Assistant, Add New Cluster, name it and pick both Sparks. NVIDIA’s guide says it checks the devices and cabling, sets the link addresses, sets up SSH between the Sparks and tests the speed. Each Spark needs a user with sudo. It sets up the network and SSH only, not vLLM, Ray or anything that runs on top.

    This rewrites network settings on both Sparks. Read the plan it shows before you confirm.

    A speed-test warning does not necessarily mean the cluster cannot work, NVIDIA says: fix the cause and run the test again. Save the cluster details it shows at the end. If this worked, skip the next step.

  4. Or set the addresses by hand.

    Use one method only, Sync or manual, not both. On each Spark, see which interfaces are up:

    ibdev2netdev
    ip -br -4 addr

    One physical port appears as two Linux network interfaces, one for each path into the processor. For port 1 they are enp1s0f1np1 and enP2p1s0f1np1; for port 0, enp1s0f0np0 and enP2p1s0f0np0. The names that start roce are the same paths seen by the fast RDMA side. Use the ones your own Spark shows as up.

    NVIDIA's two-Spark playbook puts one address on each of the two interfaces, in two different private networks. Pick two private ranges that nothing else of yours uses. Create /etc/netplan/40-cx7.yaml with sudo nano. Replace the capitals with your addresses; the second Spark gets a different address in each of the same two networks:

    network:
      version: 2
      ethernets:
        enp1s0f1np1:
          addresses:
            - LINK-A-ADDRESS/24
          dhcp4: no
        enP2p1s0f1np1:
          addresses:
            - LINK-B-ADDRESS/24
          dhcp4: no

    Applying this changes the Spark's network and can briefly interrupt it. Check the interface names and addresses twice.

    sudo chmod 600 /etc/netplan/40-cx7.yaml
    sudo netplan try

    Our advice: we show netplan try where NVIDIA's playbook uses netplan apply. try asks you to confirm and goes back if you do not. NVIDIA uses it too when removing a Sync network.

    NVIDIA's newer connect playbook offers a helper script from a community project instead, with a --dry-run preview and a --restore command. It also changes SSH settings and Docker group membership, so read it first.

  5. Set up SSH keys between the Sparks.

    Sync does this for you. By hand: on the first Spark, make a key if it has none, then copy it to the second Spark's link address. Then do the same in the other direction. USER is your user name; NVIDIA's manual playbook expects the same one on both.

    mkdir -p ~/.ssh && chmod 700 ~/.ssh
    test -f ~/.ssh/id_ed25519 || ssh-keygen -t ed25519
    ssh-copy-id -i ~/.ssh/id_ed25519.pub USER@SPARK-TWO-LINK-ADDRESS
    ssh USER@SPARK-TWO-LINK-ADDRESS hostname

    The last line should print the other Spark's name, such as spark-two, with no password asked (a key passphrase may be).

    Our advice: the first time, SSH shows the other machine's fingerprint. Check it on that machine with ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub before you type yes.

Step 2 · Test

How to test the DGX Spark cluster link.

Do these in order, on both Sparks. Stop at the first one that fails.

  1. Is the cable link up?

    ibdev2netdev
    ip -br link

    The two interfaces for your port should show (Up) in the first and LOWER_UP in the second. NO-CARRIER means no physical link: check the cable and ports. NVIDIA's older connect playbook suggests rebooting if none is up.

    A reboot stops whatever the Spark is running. Check before you restart.

  2. Do both interfaces have the right address?

    ip -br -4 addr

    Each of the two should show its own address, in a different network from the other and from your home network.

  3. Can each Spark reach the other on both paths?

    ping -c 3 OTHER-SPARK-LINK-A-ADDRESS
    ping -c 3 OTHER-SPARK-LINK-B-ADDRESS

    Expect three replies from each, with no loss. Then run the same from the other Spark.

  4. Is traffic really using the fast cable?

    A cluster can appear to work while it talks over your ordinary network. Ask Linux which way it would go, and what speed the interface reports:

    ip route get OTHER-SPARK-LINK-A-ADDRESS
    cat /sys/class/net/enp1s0f1np1/speed
    cat /sys/class/net/enp1s0f1np1/mtu

    The first line should name a ConnectX interface after dev. The speed is in Mb/s, so a 200 Gbit/s link reads 200000. NVIDIA expects a 200 Gbit/s link.

    MTU is the largest packet. NVIDIA says Cluster Assistant and its helper use 9000 for two directly cabled Sparks and 1500 for other layouts. If yours reads 9000 on both, test that full-size packets cross without being split:

    ping -M do -s 8972 -c 3 OTHER-SPARK-LINK-A-ADDRESS

    Our checks: these four commands are standard Linux ones, not steps from NVIDIA's playbooks. Change the interface name to yours.

  5. Measure it with NVIDIA's NCCL test.

    NCCL is NVIDIA's library for moving data between GPUs, and the tools below rely on it. NVIDIA's NCCL playbook installs a package, builds NCCL and its tests on both Sparks, and runs all_gather_perf across them with mpirun. Follow it there; its version numbers change.

    This installs software and puts load on both GPUs. Run it only when neither Spark has work that matters.

    It passes if it finishes on both nodes and prints a bandwidth table. Keep that table: it is your own baseline to compare with after an update or a cable change. We give no target figure. To see which path NCCL picked, add -x NCCL_DEBUG=INFO to the mpirun line. The vLLM documentation explains that NET/Socket in this log means plain TCP, while NET/IB means the RDMA path.

    Our caution: on 26 November the playbook's mpirun line turned SSH host-key checking off. Once your keys work and you have checked each fingerprint, we would leave out that --mca plm_rsh_agent option. We have not run the test either way.

Step 3 · Set up

Set up your method: one page each.

Each page has the same shape: best for, strengths, drawbacks, setup, check, stop and undo. For more than two Sparks, use NVIDIA's own playbooks.

Security

Keep cluster ports private.

Cluster software mostly assumes that anything able to reach it is trusted. This is what the makers say:

vLLM

Traffic between nodes is insecure by default and unencrypted. Put the nodes on an isolated network.

PyTorch

Distributed features have no authorisation or encryption. Anyone with network access to them can run code as your user.

Ray

Anyone who can reach its dashboard, jobs or client ports can run code on the cluster.

What to do on two Sparks.

Use the direct cable for traffic between the Sparks, and tell each tool to use that address and interface. That alone is not enough: some programs listen on every network interface, so a port may also be reachable from your home or office network. With the software running, list what is listening and check each address:

sudo ss -ltnp

Allow only what you need through a firewall, never forward these ports on your router, and never put them on the public internet. To use a web page or an API from your laptop, use an SSH tunnel. For access away from home, use a private network such as the one in our Tailscale guide.

Firewall rules can lock you out of a Spark you only reach over the network. Allow SSH first, and have a screen and keyboard to hand. We give no rules here, because the right ones depend on your network and we have not tested any.

Undo

How to take the cluster link apart.

Stop anything running across both Sparks first, using the stop steps on its own page.

This removes the link between the Sparks. Anything still using it will fail.

You usedTo undo
NVIDIA SyncSettings, Clusters, open the cluster's menu, Delete. NVIDIA says moving the network file alone does not necessarily remove the SSH aliases and keys; Delete Cluster does.
The manual fileOn each Spark: sudo rm /etc/netplan/40-cx7.yaml, then sudo netplan apply. This briefly changes networking. To remove the SSH access too, delete the line for that key from ~/.ssh/authorized_keys on the other Spark.
The helper script./setup-cluster.sh --restore, on the same Spark and as the same user that ran it.

Problems

Quick checks when the link fails.

What you seeWhere to look
No interface shows UpThe cable: approved type, fully seated, tab upward. Try the same port on both. Run ibdev2netdev again.
Ping fails on one path onlyThat interface's name or address. Each of the two needs its own network.
SSH still asks for a passwordThe key was not copied, or the user names differ.
The NCCL test hangsNVIDIA's playbook says to check password-free SSH first, then try mpirun with just hostname.
It works until a restartAddresses set with ip addr add do not survive a reboot. Use Netplan or NVIDIA Sync.

For more, go to DGX Spark cluster problems, by symptom.

Next

Keep going.

About Server AI Hub

Server AI Hub is our app for looking after a DGX Spark. You do not need it to follow this playbook. It is coming soon to the App Store and the Microsoft Store.

See what Server AI Hub does

Sources

Check the makers’ own pages.

Read on 26 November 2026. These projects change often; if their pages differ from this one, follow them.

General guidance only, in our own words. Back up before you start; you use these steps at your own risk. NVIDIA, DGX, DGX Spark, ConnectX and CUDA are trademarks of NVIDIA Corporation; Kubernetes, K3s, Ray, PyTorch, vLLM, SGLang, NGINX, Docker and other names belong to their owners. 6ixLabs is not affiliated with or endorsed by NVIDIA or any of these projects.