Basic Setup¶
First-Time Setup¶
Starting Tailscale¶
This outputs a URL:
Open the URL in a browser to authenticate with your identity provider.
Post-Authentication¶
# Verify connection
tailscale status
# Example output:
# 100.100.100.1 my-laptop linux -
# 100.100.100.2 my-server linux active; direct 203.0.113.1:41641
Check Your IP¶
# IPv4 address
tailscale ip -4
# 100.100.100.1
# IPv6 address
tailscale ip -6
# fd7a:115c:a1e0::1
# Both
tailscale ip
Common Setup Options¶
Enable SSH¶
Tailscale SSH allows passwordless SSH through the Tailscale network:
Then SSH using the Tailscale hostname:
Accept DNS¶
Enable MagicDNS to resolve Tailscale hostnames:
Accept Routes¶
Accept subnet routes advertised by other nodes:
Hostname Override¶
Set a custom hostname:
Combined Options¶
Tailscale Up Options¶
Full Reference¶
Common Options¶
| Option | Description | Default |
|---|---|---|
--ssh | Enable Tailscale SSH server | Off |
--accept-dns | Accept MagicDNS configuration | On |
--accept-routes | Accept subnet routes | Off |
--advertise-routes | Advertise subnet routes | None |
--advertise-exit-node | Act as exit node | Off |
--exit-node | Use specified exit node | None |
--hostname | Set device hostname | System hostname |
--shields-up | Block incoming connections | Off |
--auth-key | Use auth key instead of browser | None |
--reset | Reset to default settings | N/A |
--force-reauth | Force reauthentication | N/A |
--operator | Allow non-root user to manage | None |
Examples¶
# Server setup with SSH and subnet routing
sudo tailscale up \
--ssh \
--advertise-routes=192.168.1.0/24 \
--hostname=home-server
# Exit node
sudo tailscale up \
--advertise-exit-node \
--ssh
# Client using exit node
sudo tailscale up \
--exit-node=home-server \
--exit-node-allow-lan-access
# Locked down client
sudo tailscale up \
--shields-up \
--accept-dns
Tailscale Set (Persistent)¶
Use tailscale set for persistent configuration changes:
# Enable auto-updates
sudo tailscale set --auto-update
# Set operator user
sudo tailscale set --operator=$USER
# Configure SSH
sudo tailscale set --ssh
# Set hostname
sudo tailscale set --hostname=my-server
set vs up
tailscale set changes persist across restarts. tailscale up options may need to be repeated.
Network Check¶
Verify network connectivity:
Output shows:
Report:
* UDP: true
* IPv4: yes, 203.0.113.1:41641
* IPv6: yes, 2001:db8::1
* MappingVariesByDestIP: false
* HairPinning: false
* PortMapping: UPnP
* Nearest DERP: New York City
* DERP latency:
- nyc: 15.2ms
- sfo: 62.1ms
- ...
Understanding Results¶
| Field | Good Value | Issue If |
|---|---|---|
| UDP | true | false = firewall blocking |
| IPv4/IPv6 | yes | no = NAT issues |
| MappingVariesByDestIP | false | true = symmetric NAT |
| PortMapping | UPnP/NAT-PMP | none = may relay |
| Nearest DERP | < 100ms | high = relay latency |
Ping and Connectivity¶
Test Connection to Peer¶
Output:
Connection Types¶
| Output | Meaning |
|---|---|
via <IP:port> | Direct connection |
via DERP(region) | Relayed connection |
Verbose Ping¶
Status and Diagnostics¶
Full Status¶
JSON Output¶
Specific Information¶
# Just peers
tailscale status --peers
# Self info
tailscale status --self
# Active connections
tailscale status --active
DNS Configuration¶
Check Current DNS¶
Override System DNS¶
If MagicDNS isn't working:
Split DNS¶
Configure in admin console for domain-specific resolution.
Logout and Disconnect¶
Disconnect (Keep Auth)¶
Device stays authenticated but disconnects.
Reconnect¶
Logout (Remove Auth)¶
Requires re-authentication to reconnect.
Operator Mode¶
Allow non-root users to manage Tailscale:
# Set operator
sudo tailscale set --operator=$USER
# Now user can run without sudo
tailscale status
tailscale ping server
Security
Operator can modify Tailscale configuration. Only grant to trusted users.
Re-authentication¶
Key Expiry¶
By default, keys expire periodically. Re-authenticate:
Disable Key Expiry¶
In admin console, disable key expiry for specific devices (servers):
- Go to Machines
- Click on the machine
- Click Disable key expiry
Machine Settings¶
From CLI¶
# View current settings
tailscale status --json | jq '.Self'
# Modify settings
sudo tailscale set --hostname=new-name
From Admin Console¶
- Go to login.tailscale.com/admin/machines
- Click on the machine
- Modify settings:
- Disable key expiry
- Apply tags
- Modify routes
Quick Setup Examples¶
Home Server¶
# Install
curl -fsSL https://tailscale.com/install.sh | sh
# Configure
sudo tailscale up \
--ssh \
--advertise-routes=192.168.1.0/24 \
--advertise-exit-node \
--hostname=home-server
# Enable IP forwarding
echo 'net.ipv4.ip_forward = 1' | sudo tee /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
Laptop¶
# Install
curl -fsSL https://tailscale.com/install.sh | sh
# Configure
sudo tailscale up --accept-routes --accept-dns
# Set operator for convenience
sudo tailscale set --operator=$USER