dgx-spark-playbooks/nvidia/tailscale/README.md

365 lines
11 KiB
Markdown
Raw Normal View History

2025-10-28 14:35:31 +00:00
# Set up Tailscale on Your Spark
2025-10-03 20:46:11 +00:00
> Use Tailscale to connect to your Spark on your home network no matter where you are
2025-11-07 16:31:14 +00:00
2025-10-03 20:46:11 +00:00
## Table of Contents
- [Overview](#overview)
- [Instructions](#instructions)
- [Step 1. Verify system requirements](#step-1-verify-system-requirements)
- [Step 2. Install SSH server (if needed)](#step-2-install-ssh-server-if-needed)
2025-11-25 15:18:51 +00:00
- [Step 3. Install Tailscale on NVIDIA DGX Spark](#step-3-install-tailscale-on-nvidia-dgx-spark)
2025-10-03 20:46:11 +00:00
- [Step 4. Verify Tailscale installation](#step-4-verify-tailscale-installation)
2025-11-25 15:18:51 +00:00
- [Step 5. Connect your DGX Spark to Tailscale network](#step-5-connect-your-dgx-spark-to-tailscale-network)
2025-10-03 20:46:11 +00:00
- [Step 6. Install Tailscale on client devices](#step-6-install-tailscale-on-client-devices)
- [Step 7. Connect client devices to tailnet](#step-7-connect-client-devices-to-tailnet)
- [Step 8. Verify network connectivity](#step-8-verify-network-connectivity)
- [Step 9. Configure SSH authentication](#step-9-configure-ssh-authentication)
- [Step 10. Test SSH connection](#step-10-test-ssh-connection)
- [Step 11. Validate installation](#step-11-validate-installation)
- [Step 13. Cleanup and rollback](#step-13-cleanup-and-rollback)
- [Step 14. Next steps](#step-14-next-steps)
2025-10-10 00:11:49 +00:00
- [Troubleshooting](#troubleshooting)
2025-10-03 20:46:11 +00:00
---
## Overview
2025-10-08 20:25:52 +00:00
## Basic idea
2025-10-03 20:46:11 +00:00
Tailscale creates an encrypted peer-to-peer mesh network that allows secure access
2025-11-25 15:18:51 +00:00
to your NVIDIA DGX Spark device from anywhere without complex firewall configurations
or port forwarding. By installing Tailscale on both your DGX Spark and client devices,
2025-10-03 20:46:11 +00:00
you establish a private "tailnet" where each device gets a stable private IP
address and hostname, enabling seamless SSH access whether you're at home, work,
or a coffee shop.
## What you'll accomplish
2025-11-25 15:18:51 +00:00
You will set up Tailscale on your DGX Spark device and client machines to
2025-10-03 20:46:11 +00:00
create secure remote access. After completion, you'll be able to SSH into your
2025-11-25 15:18:51 +00:00
DGX Spark from anywhere using simple commands like `ssh user@spark-hostname`, with
2025-10-03 20:46:11 +00:00
all traffic automatically encrypted and NAT traversal handled transparently.
## What to know before starting
- Working with terminal/command line interfaces
- Basic SSH concepts and usage
- Installing packages using `apt` on Ubuntu
- Understanding of user accounts and authentication
- Familiarity with systemd service management
## Prerequisites
2025-11-25 15:18:51 +00:00
**Hardware Requirements:**
- NVIDIA Grace Blackwell GB10 Superchip System
**Software Requirements:**
- NVIDIA DGX OS
2025-10-06 13:35:52 +00:00
- Client device (Mac, Windows, or Linux) for remote access
2025-10-08 20:25:52 +00:00
- Client device and DGX Spark not on the same network when testing connectivity
2025-10-06 13:35:52 +00:00
- Internet connectivity on both devices
- Valid email account for Tailscale authentication (Google, GitHub, Microsoft)
- SSH server availability check: `systemctl status ssh`
- Package manager working: `sudo apt update`
2025-11-25 15:18:51 +00:00
- User account with sudo privileges on your DGX Spark device
2025-10-03 20:46:11 +00:00
## Time & risk
2025-10-08 22:00:07 +00:00
* **Duration**: 15-30 minutes for initial setup, 5 minutes per additional device
2025-11-25 15:18:51 +00:00
* **Risks**: Medium
2025-10-08 22:00:07 +00:00
* Potential SSH service configuration conflicts
* Network connectivity issues during initial setup
* Authentication provider service dependencies
* **Rollback**: Tailscale can be completely removed with `sudo apt remove tailscale` and all network routing automatically reverts to default settings.
2025-12-11 20:20:28 +00:00
* **Last Updated:** 11/07/2025
2025-11-25 15:18:51 +00:00
* Minor copyedits
2025-10-03 20:46:11 +00:00
## Instructions
### Step 1. Verify system requirements
2025-11-25 15:18:51 +00:00
Check that your NVIDIA DGX Spark device is running a supported Ubuntu version and
has internet connectivity. This step runs on the DGX Spark device to confirm
2025-10-03 20:46:11 +00:00
prerequisites.
```bash
## Check Ubuntu version (should be 20.04 or newer)
lsb_release -a
## Test internet connectivity
ping -c 3 google.com
## Verify you have sudo access
sudo whoami
```
### Step 2. Install SSH server (if needed)
2025-11-25 15:18:51 +00:00
Ensure SSH server is running on your DGX Spark device since Tailscale provides
2025-10-03 20:46:11 +00:00
network connectivity but requires SSH for remote access. This step runs on
2025-11-25 15:18:51 +00:00
the DGX Spark device.
2025-10-03 20:46:11 +00:00
```bash
## Check if SSH is running
2025-10-08 20:25:52 +00:00
systemctl status ssh --no-pager
2025-10-03 20:46:11 +00:00
```
2025-10-08 20:25:52 +00:00
**If SSH is not installed or running:**
2025-10-03 20:46:11 +00:00
```bash
## Install OpenSSH server
sudo apt update
sudo apt install -y openssh-server
## Enable and start SSH service
2025-10-08 20:25:52 +00:00
sudo systemctl enable ssh --now --no-pager
2025-10-03 20:46:11 +00:00
## Verify SSH is running
2025-10-08 20:25:52 +00:00
systemctl status ssh --no-pager
2025-10-03 20:46:11 +00:00
```
2025-11-25 15:18:51 +00:00
### Step 3. Install Tailscale on NVIDIA DGX Spark
2025-10-03 20:46:11 +00:00
2025-11-25 15:18:51 +00:00
Install Tailscale on your DGX Spark using the official Ubuntu
2025-10-03 20:46:11 +00:00
repository. This step adds the Tailscale package repository and installs
the client.
```bash
## Update package list
sudo apt update
## Install required tools for adding external repositories
sudo apt install -y curl gnupg
## Add Tailscale signing key
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/noble.noarmor.gpg | \
sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg > /dev/null
## Add Tailscale repository
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/noble.tailscale-keyring.list | \
sudo tee /etc/apt/sources.list.d/tailscale.list
## Update package list with new repository
sudo apt update
## Install Tailscale
sudo apt install -y tailscale
```
### Step 4. Verify Tailscale installation
2025-11-25 15:18:51 +00:00
Confirm Tailscale installed correctly on your DGX Spark device before proceeding
2025-10-03 20:46:11 +00:00
with authentication.
```bash
## Check Tailscale version
tailscale version
## Check Tailscale service status
2025-10-08 20:25:52 +00:00
sudo systemctl status tailscaled --no-pager
2025-10-03 20:46:11 +00:00
```
2025-11-25 15:18:51 +00:00
### Step 5. Connect your DGX Spark to Tailscale network
2025-10-03 20:46:11 +00:00
2025-11-25 15:18:51 +00:00
Authenticate your DGX Spark device with Tailscale using your chosen identity
2025-10-03 20:46:11 +00:00
provider. This creates your private tailnet and assigns a stable IP address.
```bash
## Start Tailscale and begin authentication
sudo tailscale up
2025-11-25 15:18:51 +00:00
## Follow the URL displayed to complete login in your browser
2025-10-03 20:46:11 +00:00
## Choose from: Google, GitHub, Microsoft, or other supported providers
```
### Step 6. Install Tailscale on client devices
2025-11-25 15:18:51 +00:00
Install Tailscale on the devices you'll use to connect to your DGX Spark remotely.
2025-10-08 20:25:52 +00:00
2025-11-25 15:18:51 +00:00
Choose the appropriate method for your client operating system:
2025-10-03 20:46:11 +00:00
2025-10-08 20:25:52 +00:00
**On macOS:**
- Option 1: Install from Mac App Store by searching for "Tailscale" and then clicking Get → Install
- Option 2: Download the .pkg installer from the [Tailscale website](https://tailscale.com/download)
2025-10-08 14:52:56 +00:00
2025-10-08 20:25:52 +00:00
**On Windows:**
- Download installer from the [Tailscale website](https://tailscale.com/download)
- Run the .msi file and follow installation prompts
- Launch Tailscale from Start Menu or system tray
2025-10-08 14:52:56 +00:00
2025-10-08 20:25:52 +00:00
**On Linux:**
2025-10-08 14:52:56 +00:00
2025-11-25 15:18:51 +00:00
Follow the same instructions used for the DGX Spark installation.
2025-10-08 14:52:56 +00:00
2025-10-08 20:21:14 +00:00
```bash
2025-10-08 20:25:52 +00:00
## Update package list
sudo apt update
## Install required tools for adding external repositories
sudo apt install -y curl gnupg
## Add Tailscale signing key
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/noble.noarmor.gpg | \
sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg > /dev/null
## Add Tailscale repository
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/noble.tailscale-keyring.list | \
sudo tee /etc/apt/sources.list.d/tailscale.list
## Update package list with new repository
sudo apt update
## Install Tailscale
sudo apt install -y tailscale
2025-10-03 20:46:11 +00:00
```
### Step 7. Connect client devices to tailnet
Log in to Tailscale on each client device using the same identity provider
2025-11-25 15:18:51 +00:00
account you used for your DGX Spark.
2025-10-03 20:46:11 +00:00
2025-10-08 20:25:52 +00:00
**On macOS/Windows (GUI):**
2025-10-03 20:46:11 +00:00
- Launch Tailscale app
- Click "Log in" button
2025-11-25 15:18:51 +00:00
- Sign in with same account used on DGX Spark
2025-10-03 20:46:11 +00:00
2025-10-08 20:25:52 +00:00
**On Linux (CLI):**
2025-10-03 20:46:11 +00:00
```bash
## Start Tailscale on client
sudo tailscale up
## Complete authentication in browser using same account
```
### Step 8. Verify network connectivity
Test that devices can communicate through the Tailscale network before
attempting SSH connections.
```bash
## On any device, check tailnet status
tailscale status
## Test ping to Spark device (use hostname or IP from status output)
tailscale ping <SPARK_HOSTNAME>
## Example output should show successful pings
```
### Step 9. Configure SSH authentication
2025-11-25 15:18:51 +00:00
Set up SSH key authentication for secure access to your DGX Spark. This
step runs on your client device and DGX Spark device.
2025-10-03 20:46:11 +00:00
2025-10-08 20:25:52 +00:00
**Generate SSH key on client (if not already done):**
2025-10-03 20:46:11 +00:00
```bash
## Generate new SSH key pair
ssh-keygen -t ed25519 -f ~/.ssh/tailscale_spark
## Display public key to copy
cat ~/.ssh/tailscale_spark.pub
```
2025-11-25 15:18:51 +00:00
**Add public key to DGX Spark:**
2025-10-03 20:46:11 +00:00
```bash
## On Spark device, add client's public key
echo "<YOUR_PUBLIC_KEY>" >> ~/.ssh/authorized_keys
## Set correct permissions
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
```
### Step 10. Test SSH connection
2025-11-25 15:18:51 +00:00
Connect to your DGX Spark using SSH over the Tailscale network to verify
2025-10-03 20:46:11 +00:00
the complete setup works.
```bash
## Connect using Tailscale hostname (preferred)
ssh -i ~/.ssh/tailscale_spark <USERNAME>@<SPARK_HOSTNAME>
## Or connect using Tailscale IP address
ssh -i ~/.ssh/tailscale_spark <USERNAME>@<TAILSCALE_IP>
## Example:
## ssh -i ~/.ssh/tailscale_spark nvidia@my-spark-device
```
### Step 11. Validate installation
Verify that Tailscale is working correctly and your SSH connection is stable.
```bash
## From client device, check connection status
tailscale status
2025-10-08 20:25:52 +00:00
## Create a test file on the client device
echo "test file for the spark" > test.txt
2025-10-03 20:46:11 +00:00
## Test file transfer over SSH
scp -i ~/.ssh/tailscale_spark test.txt <USERNAME>@<SPARK_HOSTNAME>:~/
## Verify you can run commands remotely
ssh -i ~/.ssh/tailscale_spark <USERNAME>@<SPARK_HOSTNAME> 'nvidia-smi'
```
2025-10-08 20:25:52 +00:00
Expected output:
2025-10-03 20:46:11 +00:00
- Tailscale status displaying both devices as "active"
- Successful file transfers
- Remote command execution working
### Step 13. Cleanup and rollback
Remove Tailscale completely if needed. This will disconnect devices from the
tailnet and remove all network configurations.
2025-10-12 20:13:25 +00:00
> [!WARNING]
2025-11-25 15:18:51 +00:00
> This will permanently remove the device from your Tailscale network and require re-authentication to rejoin.
2025-10-03 20:46:11 +00:00
```bash
## Stop Tailscale service
sudo tailscale down
## Remove Tailscale package
sudo apt remove --purge tailscale
## Remove repository and keys (optional)
sudo rm /etc/apt/sources.list.d/tailscale.list
sudo rm /usr/share/keyrings/tailscale-archive-keyring.gpg
## Update package list
sudo apt update
```
To restore: Re-run installation steps 3-5.
### Step 14. Next steps
Your Tailscale setup is complete. You can now:
2025-11-25 15:18:51 +00:00
- Access your DGX Spark device from any network with: `ssh <USERNAME>@<SPARK_HOSTNAME>`
2025-10-03 20:46:11 +00:00
- Transfer files securely: `scp file.txt <USERNAME>@<SPARK_HOSTNAME>:~/`
2025-10-08 20:25:52 +00:00
- Open the DGX Dashboard and start JupyterLab, then connect with:
`ssh -L 8888:localhost:1102 <USERNAME>@<SPARK_HOSTNAME>`
2025-10-10 00:11:49 +00:00
## Troubleshooting
| Symptom | Cause | Fix |
|---------|-------|-----|
| `tailscale up` auth fails | Network issues | Check internet, try `curl -I login.tailscale.com` |
| SSH connection refused | SSH not running | Run `sudo systemctl start ssh --no-pager` on Spark |
| SSH auth failure | Wrong SSH keys | Check public key in `~/.ssh/authorized_keys` |
| Cannot ping hostname | DNS issues | Use IP from `tailscale status` instead |
| Devices missing | Different accounts | Use same identity provider for all devices |
2025-11-25 15:18:51 +00:00
For latest known issues, please review the [DGX Spark User Guide](https://docs.nvidia.com/dgx/dgx-spark/known-issues.html).