Your Private Network · Code companion

Every command, ready to copy

The commands and configuration files from Your Private Network, chapter by chapter, in the order the book prints them, followed by its command cheat sheet. Each block says where to run it or which file it belongs in. The text is generated from the ebook, so it matches your copy character for character.

Before you paste

  • Placeholders are the book's: 192.168.1.0/24, home-pc, you@example.com, tskey-auth-your-key-here. Swap in your own after pasting.
  • On Linux most commands need sudo; on a Mac, turn on the standalone app's command-line tool first, as the book's Chapter 3 explains.
  • Access rules are saved in the admin console, which checks them before saving. Keep the tests section: it stops a change that would lock someone out.
    • Start Here

      Your Privacy Baseline

      No code in this chapter

  1. Part 1 — What Tailscale Is

    • Chapter 1

      A Private Network for Your Own Devices

      No code in this chapter

    • Chapter 2

      Signing In and Choosing a Plan

      No code in this chapter

  2. Part 2 — Getting Started

  3. Part 3 — Reaching Your Whole Home Network

  4. Part 4 — Devices Around the Home

  5. Part 5 — Family and Friends

  6. Part 6 — Going Further

  7. Part 7 — Living With Tailscale

  8. Appendices

    • Appendix A

      Settings Checklist

      No code in this chapter

    • Appendix B

      Home Network Worksheet

      No code in this chapter

    • Appendix C

      Command Cheat Sheet

      No code in this chapter

Appendix C: Command Cheat Sheet

The commands used in this book, for the command line on Linux, Mac and Windows. On Linux, most need sudo in front. On a Mac, install the standalone app's command-line tool first, from its Settings, under CLI integration.

CommandWhat it doesChapter
tailscale up Connect, and sign in if needed 3
tailscale down Disconnect, staying signed in 4
tailscale logout Disconnect and sign out 4
tailscale status List your devices, and whether each connection is direct or relayed 17
tailscale ping home-pc Test a connection over Tailscale 3, 17
tailscale ip -4 Show this device's 100.x address 4
tailscale netcheck Report on the network you're on 17
tailscale set --accept-routes Use subnet routes (Linux) 6
tailscale set --advertise-routes=192.168.1.0/24 Offer your home network as a subnet router 6
tailscale set --advertise-exit-node Offer this device as an exit node 7
tailscale set --exit-node=home-tv Use an exit node (empty after = to stop) 7
tailscale set --accept-dns=false Don't use the tailnet's DNS settings (for your DNS server itself) 8
tailscale set --ssh Turn on Tailscale SSH on this server 15
tailscale file cp photo.jpg my-phone: Send a file with Taildrop 5
tailscale file get ~/Downloads Collect received Taildrop files (Linux) 5
tailscale serve --bg 8096 Share a web service with your tailnet over HTTPS 14
tailscale serve status Show what Serve is sharing 14
tailscale serve reset Stop everything Serve is doing 14
tailscale funnel status Show what Funnel is sharing 14
tailscale funnel reset Stop everything Funnel is doing 14
tailscale funnel --bg 8096 Share a web service with the whole internet 14
tailscale cert <full name> Get an HTTPS certificate for this device 14
tailscale lock status Show tailnet lock status 16
tailscale lock sign … Sign a new device into a locked tailnet 16
tailscale switch <account> Switch to a different tailnet or account 2
tailscale update Update Tailscale to the latest version 9
tailscale bugreport Make a bug report code for Tailscale's support team 17