{"slug":"tailscale-cli","title":"Tailscale CLI","tags":["tailscale"],"agent_summary":"Last validated: Jan 26, 2026","trigger_phrases":[],"runnable":false,"markdown":"\r\n# Tailscale CLI\r\n\r\nLast validated: Jan 26, 2026\r\n\r\nThe Tailscale client includes a built-in command-line interface (CLI) you can use to manage and troubleshoot your device within your Tailscale network (known as a tailnet).\r\n\r\nThe Tailscale CLIis available for [all plans](https://tailscale.com/pricing).\r\n\r\n## [Using the Tailscale CLI](https://tailscale.com/docs/reference/tailscale-cli\\#using-the-tailscale-cli)\r\n\r\nThe location of the CLI varies depending on your platform:\r\n\r\n[Linux](https://tailscale.com/docs/reference/tailscale-cli?tab=linux) [macOS](https://tailscale.com/docs/reference/tailscale-cli?tab=macos) [Windows](https://tailscale.com/docs/reference/tailscale-cli?tab=windows)\r\n\r\nOn Linux, the CLI is your primary interface to Tailscale. The `tailscale` binary is likely already in your `$PATH`, so you can run commands with:\r\n\r\n```shell\r\ntailscale <command>\r\n```\r\n\r\nThere is no CLI support for iOS and Android.\r\n\r\n### [Tab completion](https://tailscale.com/docs/reference/tailscale-cli\\#tab-completion)\r\n\r\nThe Tailscale CLI supports tab-completion for commands, flags, and arguments. You can configure tab-completion with the [`completion` command](https://tailscale.com/docs/reference/tailscale-cli#completion).\r\n\r\n```shell\r\ntailscale completion <shell> [--flags] [--descs]\r\n```\r\n\r\nSelect your shell, then follow the instructions to load Tailscale CLI completions.\r\n\r\n[Bash](https://tailscale.com/docs/reference/tailscale-cli?tab=bash) [Zsh](https://tailscale.com/docs/reference/tailscale-cli?tab=zsh) [Fish](https://tailscale.com/docs/reference/tailscale-cli?tab=fish) [PowerShell](https://tailscale.com/docs/reference/tailscale-cli?tab=powershell)\r\n\r\nTo load tab-completions for Bash, run the following command.\r\n\r\n```shell\r\nsource <(tailscale completion bash)\r\n```\r\n\r\nRun the following command to load completions for every new session on Linux, then reload your shell.\r\n\r\n```shell\r\ntailscale completion bash > /etc/bash_completion.d/tailscale\r\n```\r\n\r\nRun the following command to load completions for every new session on macOS, then reload your shell.\r\n\r\n```shell\r\ntailscale completion bash > $(brew --prefix)/etc/bash_completion.d/tailscale\r\n```\r\n\r\n## [Command Reference](https://tailscale.com/docs/reference/tailscale-cli\\#command-reference)\r\n\r\nCommon flags for all commands:\r\n\r\n- `--socket=<path>` Path to the tailscaled socket.\r\n\r\n### [up](https://tailscale.com/docs/reference/tailscale-cli\\#up)\r\n\r\nConnect your device to Tailscale and authenticate if needed.\r\n\r\n```shell\r\ntailscale up [flags]\r\n```\r\n\r\nRunning `tailscale up` without any flags connects to Tailscale.\r\n\r\nCommon flags:\r\n\r\n- `--accept-routes` Accept [subnet routes](https://tailscale.com/docs/features/subnet-routers) that other nodes advertise. The default depends on the host operating system. For certain platforms - Windows, iOS, Android, the macOS App Store variant, and the macOS standalone variant - the default is to accept routes. All other platforms default to not accepting routes.\r\n- `--advertise-exit-node` Offer to be an [exit node](https://tailscale.com/docs/features/exit-nodes) for outbound internet traffic from the Tailscale network. Defaults to not offering to be an exit node.\r\n- `--advertise-routes=<ip>` Expose physical [subnet routes](https://tailscale.com/docs/features/subnet-routers) to your entire Tailscale network.\r\n- `--exit-node=<ip|name>` Provide a [Tailscale IP](https://tailscale.com/docs/concepts/ip-and-dns-addresses) or [machine name](https://tailscale.com/docs/concepts/machine-names) to use as an exit node. To disable the use of an exit node, pass the flag with an empty argument: `--exit-node=`.\r\n- `--exit-node-allow-lan-access` Allow the client node access to its own LAN while connected to an exit node. Defaults to not allowing access while connected to an exit node.\r\n- `--force-reauth` Force re-authentication.\r\n- `--snat-subnet-routes` (Linux only) Disable source NAT. In normal operations, a subnet device sees the traffic originating from the subnet router. This simplifies routing, but does not allow traversing multiple networks. By disabling source NAT, the end machine sees the LAN IP address of the originating machine as the source.\r\n- `--stateful-filtering` Enable stateful filtering for [subnet routers](https://tailscale.com/docs/features/subnet-routers) and [exit nodes](https://tailscale.com/docs/features/exit-nodes). When enabled, inbound packets with another node's destination IP are dropped, unless they are a part of a tracked outbound connection from that node. Defaults to disabled.\r\n- `--shields-up` [Block incoming connections](https://tailscale.com/docs/features/client/manage-preferences) from other devices on your Tailscale network. Useful for personal devices that only make outgoing connections.\r\n- `--ssh` Run a [Tailscale SSH](https://tailscale.com/docs/features/tailscale-ssh) server, permitting access per the tailnet administrator's declared [access policy](https://tailscale.com/docs/features/access-control/acls), or the [default policy](https://tailscale.com/docs/reference/examples/acls#allow-all-default-acl) if none is defined. Defaults to false.\r\n\r\nFor a complete list of available flags, refer to the [`tailscale up`](https://tailscale.com/docs/reference/tailscale-cli/up) topic.\r\n\r\n### [down](https://tailscale.com/docs/reference/tailscale-cli\\#down)\r\n\r\nDisconnect from Tailscale. Running this command is the same as choosing to disconnect from or quit a Tailscale client.\r\n\r\n```shell\r\ntailscale down\r\n```\r\n\r\nWhen disconnected, you cannot reach devices over Tailscale. To reconnect, re-run `tailscale up` without any flags.\r\n\r\nAvailable flags:\r\n\r\n- `--accept-risk=<risk>` Accept risk and skip confirmation for risk type. This can be either `lose-ssh` or `all`, or an empty string to not accept risk.\r\n- `--reason=\"<description>\"` Specify the reason (inside quotes) for disconnecting Tailscale when the [system policies](https://tailscale.com/docs/features/tailscale-system-policies)`AlwaysOn.Enabled` and `AlwaysOn.OverrideWithReason` are enabled. For example, `tailscale down --reason=\"DNS issues\"`.\r\n\r\n### [bugreport](https://tailscale.com/docs/reference/tailscale-cli\\#bugreport)\r\n\r\nThe `bugreport` command is available in Tailscale v1.8 or later. If you don't see this command, consider [updating](https://tailscale.com/docs/features/client/update) your Tailscale client.\r\n\r\nGenerate a bug report with diagnostic information.\r\n\r\nThe `bugreport` command makes it easier to report bugs to the Tailscale team by marking diagnostic logs with indicators to make triage easier.\r\n\r\nIf you encounter a connectivity issue, run `tailscale bugreport` on the device experiencing the issue at the time you encounter it.\r\n\r\n```shell\r\ntailscale bugreport\r\n```\r\n\r\nThis command prints a random identifier into diagnostic logs, which you can share with our team.\r\n\r\nIdentifiers look like this:\r\n\r\n```shell\r\nBUG-1b7641a16971a9cd75822c0ed8043fee70ae88cf05c52981dc220eb96a5c49a8-20210427151443Z-fbcd4fd3a4b7ad94\r\n```\r\n\r\nThis command shares no personally identifiable information and is unused unless you share the bug identifier with our team.\r\n\r\nAvailable flags:\r\n\r\n- `--diagnose` Prints additional verbose information about the system to the Tailscale logs after generating a `bugreport` identifier, which can then be viewed by our support team. Defaults to `false`.\r\n- `--record` Pause and then write another `bugreport`. Use this flag to create an initial `bugreport` identifier. During the pause, perform the action that reproduces your issue. Then, press Enter to create a second `bugreport` identifier. Share both bug identifiers with our team. Defaults to `false`.\r\n\r\n### [cert](https://tailscale.com/docs/reference/tailscale-cli\\#cert)\r\n\r\nGenerate Let's Encrypt certificate and key files on the host for [HTTPS certificates](https://tailscale.com/docs/how-to/set-up-https-certificates) in your tailnet.\r\n\r\nIf you are trying to serve a folder of files or reverse proxy to an HTTP service, use the [`tailscale serve`](https://tailscale.com/docs/reference/tailscale-cli#serve) command instead.\r\n\r\n```shell\r\ntailscale cert hostname.tails-scales.ts.net\r\n```\r\n\r\nAlternatively, if you want to save the certificate and private key to files, you can use the `--cert-file` and `--key-file` arguments:\r\n\r\n```shell\r\ntailscale cert --cert-file=cert.pem --key-file=key.pem hostname.tails-scales.ts.net\r\n```\r\n\r\nThe certificates provided by Let's Encrypt have a 90-day expiry and require periodic renewal. When a certificate is delivered as files on disk which you then move to an install location, such as when using `tailscale cert`, the [`tailscaled` daemon](https://tailscale.com/docs/reference/tailscaled) doesn't know where to place a renewed certificate or how to install it. As a result, you are responsible for renewing any certificates that you create using `tailscale cert`.\r\n\r\nIf a certificate is handled without the user initiating any file-based certificate installation (such as when using the [Caddy integration of Tailscale](https://github.com/tailscale/caddy-tailscale)) then the certificate will automatically renew without the user doing anything.\r\n\r\nAvailable flags:\r\n\r\n- `--cert-file=<cert>` Specify the certificate output path.\r\n- `--key-file=<key>` Specify the private key output path.\r\n- `--min-validity=<duration>` Request a specified minimum remaining validity on the returned certificate. `duration` can be any value parseable by [`time.ParseDuration()`](https://pkg.go.dev/time#ParseDuration). For example, use `120h` to set the duration to five days.\r\n- `--serve-demo` Serve on port `:443` using the cert as a demo, instead of writing out the files to disk.\r\n\r\nThe `--min-validity` flag lets you ensure that the returned certificate is valid for at least the specified duration. If you specify a duration longer than the [certification lifetime set by Let's Encrypt](https://letsencrypt.org/docs/faq#what-is-the-lifetime-for-let-s-encrypt-certificates-for-how-long-are-they-valid), it uses the maximum lifetime set by Let's Encrypt.\r\n\r\n### [dns](https://tailscale.com/docs/reference/tailscale-cli\\#dns)\r\n\r\nThe `dns` command lets you access [Tailscale DNS settings](https://tailscale.com/docs/reference/dns-in-tailscale). It's available in Tailscale v1.74.0 and later.\r\n\r\nSubcommands:\r\n\r\n- `status` Print the configuration of the local DNS forwarder and the tailnet-wide [MagicDNS](https://tailscale.com/docs/features/magicdns) configuration.\r\n- `query` Perform a DNS query using the local DNS forwarder. It's available in Tailscale v1.76.0 and later.\r\n\r\nAvailable flags for `status`:\r\n\r\n- `--all` Outputs advanced debugging information.\r\n\r\nAvailable flags for `status` and `query`:\r\n\r\n- `--json` Output in JSON format.\r\n\r\n### [drive](https://tailscale.com/docs/reference/tailscale-cli\\#drive)\r\n\r\nShare a directory with your tailnet using [Taildrive](https://tailscale.com/docs/features/taildrive).\r\n\r\n```shell\r\ntailscale drive share <name> <path>\r\ntailscale drive rename <oldname> <newname>\r\ntailscale drive unshare <name>\r\ntailscale drive list\r\n```\r\n\r\nSubcommands:\r\n\r\n- `share` Create or modify a share.\r\n- `rename` Rename a share.\r\n- `unshare` Remove a share.\r\n- `list` List current shares.\r\n\r\n### [completion](https://tailscale.com/docs/reference/tailscale-cli\\#completion)\r\n\r\nConfigure tab-completion for the Tailscale CLI.\r\n\r\n```shell\r\ntailscale completion <subcommand> [flags]\r\n```\r\n\r\nSubcommands:\r\n\r\n- `bash` Configure tab-completion for the `bash` shell.\r\n- `zsh` Configure tab-completion for the `zsh` shell.\r\n- `fish` Configure tab-completion for the `fish` shell.\r\n- `powershell` Configure tab-completion for PowerShell.\r\n\r\nAvailable flags:\r\n\r\n- `--flags=<true|false>` Configure whether to suggest flags (in addition to subcommands). Set to `true` by default.\r\n- `--descs=<true|false>` Configure whether to include descriptions of subcommands in the suggestions. Set to `true` by default.\r\n\r\n### [configure](https://tailscale.com/docs/reference/tailscale-cli\\#configure)\r\n\r\nConfigure resources that you want to include in your tailnet.\r\n\r\n```shell\r\ntailscale configure <subcommands>\r\n```\r\n\r\nSubcommands:\r\n\r\n- `kubeconfig` (alpha) Configure `kubectl` to connect to a Kubernetes cluster using Tailscale.\r\n- `mac-vpn` Install or uninstall the VPN configuration on [App Store](https://tailscale.com/docs/concepts/macos-variants#mac-app-store-variant) and [Standalone variant](https://tailscale.com/docs/concepts/macos-variants#standalone-variant) of macOS.\r\n- `synology` Configure Synology to enable outbound connections needed for Tailscale.\r\n- `sysext` Activate, deactivate, or manage the state of the Tailscale [system extension](https://tailscale.com/docs/concepts/macos-sysext) on the [Standalone variant](https://tailscale.com/docs/concepts/macos-variants#standalone-variant) of macOS.\r\n- `systray` Manage the `systray` client for Linux.\r\n\r\nAvailable flags for `kubeconfig`:\r\n\r\n- `--http` Use HTTP instead of HTTPS to connect to the auth proxy. Ignored if you include a scheme in the hostname argument.\r\n\r\nAvailable subcommands for `mac-vpn`:\r\n\r\n- `install` Write the Tailscale VPN configuration to the macOS settings.\r\n- `uninstall` Delete the Tailscale VPN configuration from the macOS settings.\r\n\r\nAvailable subcommands for `sysext`:\r\n\r\n- `activate` Register the Tailscale system extension with macOS.\r\n- `deactivate` Deactivate the Tailscale system extension on macOS.\r\n- `status` Print the enablement status of the Tailscale system extension.\r\n\r\nAvailable flags for `systray`:\r\n\r\n- `--enable-startup=<init-system>` Install the startup script for the init system. The only currently supported value is `systemd`.\r\n\r\nExamples:\r\n\r\n- To configure your local `kubeconfig` file for authentication with a Kubernetes auth proxy:\r\n\r\n```shell\r\ntailscale configure kubeconfig <hostname-or-fqdn>\r\n```\r\n\r\n- To configure Synology to enable outbound connections:\r\n\r\n```shell\r\ntailscale configure synology\r\n```\r\n\r\n### [exit-node](https://tailscale.com/docs/reference/tailscale-cli\\#exit-node)\r\n\r\nGet information about [exit-nodes](https://tailscale.com/docs/features/exit-nodes) in your tailnet.\r\n\r\n```shell\r\ntailscale exit-node <subcommands>\r\n```\r\n\r\nAvailable subcommands:\r\n\r\n- `list` Lists the exit nodes in your tailnet.\r\n- `suggest` Suggests a [recommended exit node](https://tailscale.com/docs/features/exit-nodes/auto-exit-nodes).\r\n\r\nAvailable flags for `list`:\r\n\r\n- `--filter=<country>` Filter exit nodes by country.\r\n\r\n### [file](https://tailscale.com/docs/reference/tailscale-cli\\#file)\r\n\r\nAccess and make files available to [Taildrop](https://tailscale.com/docs/features/taildrop).\r\n\r\n```shell\r\ntailscale file cp <files...> <target>:\r\ntailscale file get <target-directory>\r\n```\r\n\r\nAvailable commands:\r\n\r\n- `cp` Copy files to a host.\r\n- `get` Move files out of the Tailscale file inbox.\r\n\r\nAvailable flags for `cp`:\r\n\r\n- `--name=<name>` Alternate filename to use, especially useful when `<file>` is `-` (`stdin`).\r\n- `--targets` List possible file `cp` targets.\r\n- `--verbose` Verbose output.\r\n\r\nAvailable flags for `get`:\r\n\r\n- `--conflict=<behavior>``behavior`when a conflicting (same-named) file already exists in the target directory.\r\n  - `skip` Skip conflicting files: leave them in the Taildrop inbox and print an error. Get any non-conflicting files.\r\n  - `overwrite` Overwrite existing file.\r\n  - `rename` Write to a new number-suffixed filename.\r\n- `--loop` Run get in a loop, receiving files as they come in.\r\n- `--verbose` Verbose output.\r\n- `--wait` Wait for a file to arrive if inbox is empty.\r\n\r\n### [funnel](https://tailscale.com/docs/reference/tailscale-cli\\#funnel)\r\n\r\nServe content and local servers from your Tailscale node to the internet.\r\n\r\nTo limit local service access to your tailnet, use the [`serve`](https://tailscale.com/docs/reference/tailscale-cli#serve) command.\r\n\r\n```shell\r\ntailscale funnel <target>\r\ntailscale funnel <subcommand> [flags] <args>\r\n```\r\n\r\nSubcommands:\r\n\r\n- [`status`](https://tailscale.com/docs/reference/tailscale-cli/funnel#get-the-status) Gets the status.\r\n- [`reset`](https://tailscale.com/docs/reference/tailscale-cli/funnel#reset-tailscale-funnel) Resets the configuration.\r\n\r\nFor more information, refer to the [`tailscale funnel`](https://tailscale.com/docs/reference/tailscale-cli/funnel) topic.\r\n\r\n### [ip](https://tailscale.com/docs/reference/tailscale-cli\\#ip)\r\n\r\nGet a device's Tailscale IP address.\r\n\r\n```shell\r\ntailscale ip [flags] [<hostname>]\r\n```\r\n\r\nBy default, this command returns both an [`100.x.y.z` IPv4 address](https://tailscale.com/docs/concepts/ip-and-dns-addresses) and an IPv6 address for the current device. You can return only an IPv4 or IPv6 address by passing either the `-4` or `-6` flags.\r\n\r\n```shell\r\ntailscale ip -4\r\n```\r\n\r\nFor example, this command will return information similar to the following:\r\n\r\n```shell\r\n100.121.112.23\r\n```\r\n\r\nYou can also find the Tailscale IP for other devices on your network by adding the device hostname after the command. For example:\r\n\r\n```shell\r\ntailscale ip raspberrypi\r\n```\r\n\r\nThis command will return information similar to the following:\r\n\r\n```shell\r\n100.126.153.111\r\nfd7a:115c:a1e0:ab12:4843:cd96:627e:9975\r\n```\r\n\r\nAvailable flags:\r\n\r\n- `--4` Only return an IPv4 address.\r\n- `--6` Only return an IPv6 address.\r\n- `--1` Only return one address, preferring IPv4.\r\n- `--assert=<specific-ip-address>` Assert that the node's IP (or one of the node's IPs) matches this IP address.\r\n\r\n### [licenses](https://tailscale.com/docs/reference/tailscale-cli\\#licenses)\r\n\r\nGet open source license information.\r\n\r\n```shell\r\ntailscale licenses\r\n```\r\n\r\n### [lock](https://tailscale.com/docs/reference/tailscale-cli\\#lock)\r\n\r\nManage [Tailnet Lock](https://tailscale.com/docs/features/tailnet-lock) for your tailnet.\r\n\r\n```shell\r\ntailscale lock <subcommand> [flags] <args>\r\n```\r\n\r\nCommon subcommands:\r\n\r\n- [`init`](https://tailscale.com/docs/reference/tailscale-cli/lock#lock-init) Initializes Tailnet Lock.\r\n- [`status`](https://tailscale.com/docs/reference/tailscale-cli/lock#lock-status) Outputs the state of Tailnet Lock.\r\n- [`add`](https://tailscale.com/docs/reference/tailscale-cli/lock#lock-add) Adds one or more trusted signing keys to Tailnet Lock.\r\n- [`remove`](https://tailscale.com/docs/reference/tailscale-cli/lock#lock-remove) Removes one or more trusted signing keys from Tailnet Lock.\r\n- [`sign`](https://tailscale.com/docs/reference/tailscale-cli/lock#lock-sign) Signs a node key and transmits the signature to the coordination server.\r\n\r\nRunning `tailscale lock` with no subcommand and no arguments is equivalent to running [`tailscale lock status`](https://tailscale.com/docs/reference/tailscale-cli/lock#lock-status).\r\n\r\nFor a complete list of subcommands and flags, refer to the [`tailscale lock`](https://tailscale.com/docs/reference/tailscale-cli/lock) topic.\r\n\r\n### [login](https://tailscale.com/docs/reference/tailscale-cli\\#login)\r\n\r\nLog into Tailscale (and add this device to your Tailscale network). For more information about logging in, refer to [fast-user-switching](https://tailscale.com/docs/features/client/fast-user-switching).\r\n\r\n```shell\r\ntailscale login [flags]\r\n```\r\n\r\nAvailable flags:\r\n\r\n- `--accept-dns` Accept [DNS configuration](https://tailscale.com/docs/reference/dns-in-tailscale) from the admin console. Defaults to accepting DNS settings.\r\n- `--accept-routes` Accept [subnet routes](https://tailscale.com/docs/features/subnet-routers) that other nodes advertise. The default depends on the host operating system. For certain platforms - Windows, iOS, Android, the macOS App Store variant, and the macOS standalone variant - the default is to accept routes. All other platforms default to not accepting routes.\r\n- `--advertise-connector` Offer to be an [app connector](https://tailscale.com/docs/features/app-connectors) for domain-specific internet traffic for the tailnet.\r\n- `--advertise-exit-node` Offer to be an [exit node](https://tailscale.com/docs/features/exit-nodes) for outbound internet traffic from the Tailscale network. Defaults to not offering to be an exit node.\r\n- `--advertise-routes=<ip>` Expose physical [subnet routes](https://tailscale.com/docs/features/subnet-routers) to your entire Tailscale network.\r\n- `--advertise-tags=<tags>` Give tagged permissions to this device. You must be [listed in `\"TagOwners\"`](https://tailscale.com/docs/reference/syntax/policy-file#tag-owners) to be able to apply tags.\r\n- `--auth-key=<key>` Provide an [auth key](https://tailscale.com/docs/features/access-control/auth-keys) to automatically authenticate the node as your user account. For a best practice when handling the `--auth-key` value, refer to [Securely handle an auth key](https://tailscale.com/docs/features/access-control/auth-keys/how-to/secure-auth-keys).\r\n- `--client-id` Client ID used to generate [auth keys](https://tailscale.com/docs/features/access-control/auth-keys) by using\r\n[workload identity federation](https://tailscale.com/docs/features/workload-identity-federation).\r\n- `--client-secret` [OAuth Client](https://tailscale.com/docs/features/oauth-clients) secret used to generate\r\n[auth keys](https://tailscale.com/docs/features/access-control/auth-keys); if it begins with `file:`, then it's a path to a\r\nfile containing the secret.\r\n- `--exit-node=<ip|name>` Provide a [Tailscale IP](https://tailscale.com/docs/concepts/ip-and-dns-addresses) or [machine name](https://tailscale.com/docs/concepts/machine-names) to use as an exit node. To disable the use of an exit node, pass the flag with an empty argument: `--exit-node=`.\r\n- `--exit-node-allow-lan-access` Allow the client node access to its own LAN while connected to an exit node. Defaults to not allowing access while connected to an exit node.\r\n- `--hostname=<name>` Provide a hostname to use for the device instead of the one provided by the OS. Note that this will change the machine name used in [MagicDNS](https://tailscale.com/docs/features/magicdns).\r\n- `--id-token` ID token from the identity provider to exchange with the control\r\nserver for [workload identity federation](https://tailscale.com/docs/features/workload-identity-federation); if it begins\r\nwith `file:`, then it's a path to a file containing the token.\r\n- `--audience` Audience used when requesting an ID token from an identity provider for auth keys generated by [workload identity federation](https://tailscale.com/docs/features/workload-identity-federation).\r\n- `--login-server=<url>` Provide the base URL of a control server instead of `https://controlplane.tailscale.com`. If you are using [Headscale](https://tailscale.com/blog/opensource#the-open-source-coordination-server) for your control server, use your Headscale instance's URL.\r\n- `--netfilter-mode=<mode>` Netfilter mode (one of `on`, `nodivert`, `off`). Refer to [Tailscale netfilter modes](https://tailscale.com/docs/reference/netfilter-modes) for more information.\r\n- `--nickname=<name>` [Nickname](https://tailscale.com/docs/features/client/fast-user-switching#setting-a-nickname) for the current account.\r\n- `--operator=<user>` Provide a Unix username other than `root` to operate `tailscaled`.\r\n- `--qr` Generate a QR code for the web login URL. Defaults to not showing a QR code.\r\n- `--qr-format=<format>` QR code formatting: `small` or `large`. Defaults to `small`.\r\n- `--stateful-filtering` Enable stateful filtering for [subnet routers](https://tailscale.com/docs/features/subnet-routers) and [exit nodes](https://tailscale.com/docs/features/exit-nodes). When enabled, inbound packets with another node's destination IP are dropped, unless they are a part of a tracked outbound connection from that node. Defaults to disabled.\r\n- `--shields-up` [Block incoming connections](https://tailscale.com/docs/features/client/manage-preferences) from other devices on your Tailscale network. Useful for personal devices that only make outgoing connections.\r\n- `--snat-subnet-routes` Source NAT traffic to local routes advertised with `--advertise-routes`.\r\n- `--ssh` Run a [Tailscale SSH](https://tailscale.com/docs/features/tailscale-ssh) server, permitting access per the tailnet administrator's declared [access policy](https://tailscale.com/docs/features/access-control/acls), or the [default policy](https://tailscale.com/docs/reference/examples/acls#allow-all-default-acl) if none is defined. Defaults to false.\r\n- `--timeout=<duration>` Maximum amount of time to wait for the Tailscale service to initialize. `duration` can be any value parseable by [`time.ParseDuration()`](https://pkg.go.dev/time#ParseDuration). Defaults to `0s`, which blocks forever.\r\n- `--unattended`(Windows only) Run in [unattended mode](https://tailscale.com/docs/how-to/run-unattended) where Tailscale keeps running even after the current user logs out.\r\n\r\n### [logout](https://tailscale.com/docs/reference/tailscale-cli\\#logout)\r\n\r\nDisconnect from Tailscale and expire the current log in. The next time you run `tailscale up`, you'll need to reauthenticate your device.\r\n\r\n```shell\r\ntailscale logout\r\n```\r\n\r\nIf you run `tailscale logout` on an [ephemeral node](https://tailscale.com/docs/features/ephemeral-nodes), the node will be removed from your tailnet immediately.\r\n\r\nAvailable flags:\r\n\r\n- `--reason` Reason for the logout, if required by a [system policy](https://tailscale.com/docs/features/tailscale-system-policies).\r\n\r\n### [metrics](https://tailscale.com/docs/reference/tailscale-cli\\#metrics)\r\n\r\nExpose and collect [Tailscale client metrics](https://tailscale.com/docs/reference/tailscale-client-metrics) for use with third-party monitoring systems.\r\n\r\n```shell\r\ntailscale metrics\r\n```\r\n\r\nSubcommands:\r\n\r\n- `print` Shows client metrics in the current terminal session.\r\n- `write` Writes metric values to a text file.\r\n\r\n### [netcheck](https://tailscale.com/docs/reference/tailscale-cli\\#netcheck)\r\n\r\nGet a report on your current physical network conditions. This command is provided to help debug connection troubles.\r\n\r\n```shell\r\ntailscale netcheck\r\n```\r\n\r\n`netcheck` will output a report like this:\r\n\r\n```shell\r\nReport:\r\n\t* Time: 2025-03-13T16:35:03.336481Z\r\n\t* UDP: true\r\n\t* IPv4: yes, <ipv4-address>\r\n\t* IPv6: yes, <ipv6-address>\r\n\t* MappingVariesByDestIP: false\r\n\t* PortMapping:\r\n\t* Nearest DERP: Seattle\r\n\t* DERP latency:\r\n\t\t- sea: 24.2ms  (Seattle)\r\n\t\t- sfo: 50.5ms  (San Francisco)\r\n\t\t- lax: 57.2ms  (Los Angeles)\r\n\t\t- den: 58.5ms  (Denver)\r\n\t\t- dfw: 63ms    (Dallas)\r\n\t\t- ord: 73.3ms  (Chicago)\r\n```\r\n\r\n(In the example output, the list of [DERP servers](https://tailscale.com/docs/reference/derp-servers) is truncated for brevity.)\r\n\r\n- `UDP` shows whether UDP traffic is enabled on the current network. If this is false, it's unlikely Tailscale will be able to make point-to-point connections, and will instead rely on our [encrypted TCP relays (DERP)](https://tailscale.com/docs/reference/derp-servers)\r\n- `IPv4` and **IPv6** show your network public IP addresses and support for both protocols.\r\n- `MappingVariesByDestIP` describes whether your device is behind a difficult NAT that varies the device's IP address depending on the destination.\r\n- `HairPinning` describes whether your router can route connections from endpoints on your LAN back to your LAN using those endpoints' globally-mapped IPv4 addresses/ports.\r\n- `PortMapping` describes a list of which three port-mapping services exist on your router. Possible values are \"UPnP\", \"NAT-PMP\", and \"PCP\".\r\n- `DERP latency` and `Nearest DERP` describe latency from our [encrypted TCP relays (DERP)](https://tailscale.com/docs/reference/derp-servers). The lowest latency (\"nearest\") server is used for traffic.\r\n\r\nIf any fields are blank, it means Tailscale wasn't able to measure that network property.\r\n\r\nAll the information from `tailscale netcheck` is also available in the [Machines](https://login.tailscale.com/admin/machines) page of the admin console, by selecting a particular machine.\r\n\r\nAvailable flags:\r\n\r\n- `--every=<duration>` If non-zero, do an incremental report with the given frequency.\r\n- `--format=<format>` Output format; empty (for human-readable), `json` or `json-line`.\r\n- `--verbose` Verbose logs.\r\n- `--bind-address` Send and receive connectivity probes using this locally bound IP address.\r\n- `--bind-port` Send and receive connectivity probes using this UDP port.\r\n\r\n### [nc](https://tailscale.com/docs/reference/tailscale-cli\\#nc)\r\n\r\nConnect to a port on a host, connected to stdin/stdout.\r\n\r\n```shell\r\ntailscale nc <hostname-or-IP> <port>\r\n```\r\n\r\n### [ping](https://tailscale.com/docs/reference/tailscale-cli\\#ping)\r\n\r\nAttempt to ping another device exclusively over Tailscale.\r\n\r\nThe regular `ping` command often works fine over Tailscale, but `tailscale ping` provides more details about the connection over Tailscale that can be helpful when troubleshooting connectivity.\r\n\r\n```shell\r\ntailscale ping <hostname-or-ip>\r\n```\r\n\r\nYou can call `tailscale ping` using either a [100.x.y.z address](https://tailscale.com/docs/concepts/ip-and-dns-addresses) or a [machine name](https://tailscale.com/docs/concepts/machine-names).\r\n\r\nAvailable flags:\r\n\r\n- `--c` Maximum number of pings to send. Defaults to 10.\r\n- `--icmp`, `--icmp=false` Perform an ICMP-level ping (through WireGuard, but not the local host OS stack). Defaults to false.\r\n- `--peerapi`, `--peerapi=false` Try hitting the peer's PeerAPI HTTP server. Defaults to false.\r\n- `--size=<size>` Size of the ping message (default pings only). 0 for minimum size.\r\n- `--tsmp`, `--tsmp=false` Perform a TSMP-level ping (through WireGuard, but not either host's OS stack). Defaults to false.\r\n- `--timeout=<duration>` Maximum amount of time to wait before giving up on a ping. `duration` can be any value parseable by [`time.ParseDuration()`](https://pkg.go.dev/time#ParseDuration). Defaults to `5s`.\r\n- `--until-direct`, `--until-direct=false` Stop once a direct path is established. Defaults to true.\r\n- `--verbose`, `--verbose=false` Show verbose output. Defaults to false.\r\n\r\nThere are [four types of ping messages](https://tailscale.com/docs/reference/ping-types) supported by the `tailscale ping` command.\r\n\r\n### [serve](https://tailscale.com/docs/reference/tailscale-cli\\#serve)\r\n\r\nServe content and local servers from your Tailscale node to your tailnet.\r\n\r\nTo publicly share the local service to the internet, use the [`funnel`](https://tailscale.com/docs/reference/tailscale-cli#funnel) command.\r\n\r\n```shell\r\ntailscale serve <target>\r\ntailscale serve <subcommand> [flags] <args>\r\n```\r\n\r\nSubcommands:\r\n\r\n- [`status`](https://tailscale.com/docs/reference/tailscale-cli/serve#get-the-status) Gets the status.\r\n- [`reset`](https://tailscale.com/docs/reference/tailscale-cli/serve#reset-tailscale-serve) Resets the configuration.\r\n\r\nFor more information, refer to the [`tailscale serve`](https://tailscale.com/docs/reference/tailscale-cli/serve) topic.\r\n\r\n### [set](https://tailscale.com/docs/reference/tailscale-cli\\#set)\r\n\r\nChange specified preferences.\r\n\r\nUnlike [`tailscale up`](https://tailscale.com/docs/reference/tailscale-cli#up), this command does not require the complete set of desired settings. It only updates the settings you explicitly set. There are no default values. Note that when using [Fast User Switching](https://tailscale.com/docs/features/client/fast-user-switching), changes made are only for the currently connected tailnet.\r\n\r\n```shell\r\ntailscale set [flags]\r\n```\r\n\r\nAvailable flags:\r\n\r\n- `--accept-dns` Accept [DNS configuration](https://tailscale.com/docs/reference/dns-in-tailscale) from the admin console.\r\n- `--accept-risk=<risk>` Accept risk and skip confirmation for risk type. This can be either `lose-ssh` or `all`, or an empty string to not accept risk.\r\n- `--accept-routes`, `--accept-routes=false` Accept [subnet routes](https://tailscale.com/docs/features/subnet-routers) that other nodes advertise. The default depends on the host operating system. For certain platforms - Windows, iOS, Android, the macOS App Store variant, and the macOS standalone variant - the default is to accept routes. All other platforms default to not accepting routes.\r\n- `--advertise-connector` Offer to be an [app connector](https://tailscale.com/docs/features/app-connectors) for domain-specific internet traffic for the tailnet.\r\n- `--advertise-exit-node`, `--advertise-exit-node=false` Offer to be an exit node for internet traffic for the tailnet.\r\n- `--advertise-routes=<ip>` Expose physical [subnet routes](https://tailscale.com/docs/features/subnet-routers) to your entire Tailscale network. This is a comma-separated string, such as \"10.0.0.0/8,192.168.0.0/24\", or an empty string to not advertise routes.\r\n- `--auto-update`, `--auto-update=false` Enable or disable [auto-updates](https://tailscale.com/docs/features/client/update#auto-updates) for the client.\r\n- `--exit-node=<ip|name>` Provide a [Tailscale IP](https://tailscale.com/docs/concepts/ip-and-dns-addresses) or [machine name](https://tailscale.com/docs/concepts/machine-names) to use as an exit node. You can also use `--exit-node=auto:any` to track the suggested exit node and automatically switch to it when available exit nodes or network conditions change. To disable the use of an exit node, pass the flag with an empty argument using `--exit-node=`.\r\n- `--exit-node-allow-lan-access`, `--exit-node-allow-lan-access=false` Allow the client node access to its own LAN while connected to an exit node.\r\n- `--hostname=<name>` Hostname to use for the device instead of the one provided by the OS. Note that this will change the machine name used in [MagicDNS](https://tailscale.com/docs/features/magicdns).\r\n- `--netfilter-mode=<mode>` Netfilter mode (one of `on`, `nodivert`, `off`). Refer to [Tailscale netfilter modes](https://tailscale.com/docs/reference/netfilter-modes) for more information.\r\n- `--nickname=<name>` [Nickname](https://tailscale.com/docs/features/client/fast-user-switching#setting-a-nickname) for the current account.\r\n- `--operator=<user>` A Unix username other than `root` to operate `tailscaled`.\r\n- `--relay-server-port=<port>` Specify a UDP port to accept peer relay connections on. UDP port number (`0` will pick a random unused port) for the relay server to bind to, on all interfaces, or empty string to disable relay server functionality. Refer to [Tailscale Peer Relays](https://tailscale.com/docs/features/peer-relay) for more information.\r\n- `--relay-server-static-endpoints` Use static endpoints for [Tailscale Peer Relays](https://tailscale.com/docs/features/peer-relay).\r\n- `--report-posture` Allow management plane to gather [device posture](https://tailscale.com/docs/features/device-posture) information.\r\n- `--shields-up`, `--shields-up=false` [Block incoming connections](https://tailscale.com/docs/features/client/manage-preferences) from other devices on your Tailscale network.\r\nUseful for personal devices that only make outgoing connections.\r\n- `--snat-subnet-routes` Source NAT traffic to local routes advertised with `--advertise-routes`.\r\n- `--ssh`, `--ssh=false` Run a [Tailscale SSH](https://tailscale.com/docs/features/tailscale-ssh) server, permitting access per the tailnet administrator's declared [access policy](https://tailscale.com/docs/features/access-control/acls), or the [default policy](https://tailscale.com/docs/reference/examples/acls#allow-all-default-acl) if none is defined.\r\n- `--stateful-filtering` Apply stateful filtering to forwarded packets (subnet routers, exit nodes, and so on).\r\n- `--update-check` Notify about available Tailscale updates.\r\n- `--webclient`, `--webclient=false` Expose the [web interface](https://tailscale.com/docs/features/client/device-web-interface) to your tailnet persistently in the background on port `:5252.`\r\n\r\n### [ssh](https://tailscale.com/docs/reference/tailscale-cli\\#ssh)\r\n\r\nEstablish a [Tailscale SSH](https://tailscale.com/docs/features/tailscale-ssh) session to a Tailscale machine.\r\n\r\nYou can often use the regular `ssh` command or another SSH client to make an SSH session to a Tailscale machine. However, when your local node is in [userspace-networking](https://tailscale.com/docs/reference/kernel-vs-userspace-routers#userspace-netstack-mode) mode and can't make a direct connection, use `tailscale ssh`. This sets up an SSH `ProxyCommand` to connect through the local `tailscaled` daemon. You can also use `tailscale ssh` when your local node is in [kernel](https://tailscale.com/docs/reference/kernel-vs-userspace-routers#kernel-mode) mode.\r\n\r\nThe `tailscale ssh` command automatically checks the destination server's SSH host key against the node's SSH host key as advertised by using the Tailscale coordination server.\r\n\r\n```shell\r\ntailscale ssh <args>\r\n```\r\n\r\n`<args>` is one of the following forms:\r\n\r\n- `host` The destination server. An interactive session will prompt you for the user name to use for the session.\r\n- `user@host` The user name for the session and the destination server.\r\n\r\nFor both forms, `host` can be the destination server's [MagicDNS](https://tailscale.com/docs/features/magicdns) name (even if `--accept-dns=false` was set on the local node) or the destination server's [Tailscale IP address](https://tailscale.com/docs/concepts/ip-and-dns-addresses).\r\n\r\n`tailscale ssh` is not available on sandboxed macOS builds—use the regular `ssh` client instead.\r\n\r\n### [status](https://tailscale.com/docs/reference/tailscale-cli\\#status)\r\n\r\nGet the status of your connections to other Tailscale devices.\r\n\r\n```shell\r\ntailscale status\r\n```\r\n\r\nThis command returns a condensed table of information in human-readable format:\r\n\r\n```markup\r\n1           2         3           4         5\r\n100.1.2.3   device-a  apenwarr@   linux     active; direct <ip-port>, tx 1116 rx 1124\r\n100.4.5.6   device-b  crawshaw@   macOS     active; relay <relay-server>, tx 1351 rx 4262\r\n100.7.8.9   device-c  danderson@  windows   idle; tx 1214 rx 50\r\n100.0.1.2   device-d  ross@       iOS       -\r\n```\r\n\r\nFrom left-to-right, these columns represent:\r\n\r\n- Column 1 is a [**Tailscale IP**](https://tailscale.com/docs/concepts/tailscale-ip-addresses), which you can use to connect to the device.\r\n- Column 2 is the [**machine name**](https://tailscale.com/docs/concepts/machine-names) of the device. If you use [MagicDNS](https://tailscale.com/docs/features/magicdns), you can also use this name to connect.\r\n- Column 3 is the **email address** for the owner of the device.\r\n- Column 4 is the **device OS**.\r\n- Column 5 shows the current **connection status**.\r\n\r\nConnection status (column 5) is shown using three terms:\r\n\r\n- `active` means traffic is currently being sent/received from this device. It also includes the connection type, which can be `direct`, `relay`, or `peer-relay`.\r\n  - If the connection is `direct`, it includes peer device's IP address.\r\n  - If the connection is `relay`, it includes the [DERP server](https://tailscale.com/docs/reference/derp-servers)'s city code (`nyc`, `fra`, `tok`, `syd`) for the respective location.\r\n  - If the connection is [`peer-relay`](https://tailscale.com/docs/features/peer-relay), it includes the Tailscale IP address of the peer relay and the VNI (virtual network interface) used.\r\n- `idle` means traffic is not currently being sent/received from this device.\r\n- `-` means no traffic has ever been sent/received from this device.\r\n\r\n`active` and `idle` connection statuses will also include `tx`/`rx` values indicating the number of bytes sent (`tx`) and received (`rx`) from this device.\r\n\r\nRunning `tailscale status` with the `--json` flag returns a machine-readable JSON response.\r\n\r\n```shell\r\ntailscale status --json\r\n```\r\n\r\nUnlike `tailscale status`, using this flag gives a detailed list of peers and users in your tailnet that makes it well-suited for automation tasks. It also includes additional metadata associated with your device.\r\n\r\nCombine this with [`jq`](https://stedolan.github.io/jq) to automate data collection about your network. For example, the following command counts and sorts the relay servers your Tailscale peers are connected to.\r\n\r\n```shell\r\ntailscale status --json | jq -r '.Peer[].Relay | select(.!=\"\")' | sort | uniq -c | sort -nr\r\n```\r\n\r\nAvailable flags:\r\n\r\n- `--active` Filter output to only peers with active sessions (not applicable to web mode).\r\n- `--browser` Open a browser in web mode (default `true`).\r\n- `--header` Show column headers in table format (default `false`).\r\n- `--json` Output in JSON format (WARNING: format subject to change).\r\n- `--listen=<address>` Listen address for web mode; use port 0 for automatic (default `127.0.0.1:8384`).\r\n- `--peers` Show status of peers (default `true`).\r\n- `--self` Show status of local machine (default `true`).\r\n- `--web` Run webserver with HTML showing status.\r\n\r\n### [switch](https://tailscale.com/docs/reference/tailscale-cli\\#switch)\r\n\r\nSwitch to a different Tailscale account. For more information about switching accounts, refer to [fast-user-switching](https://tailscale.com/docs/features/client/fast-user-switching).\r\n\r\n```shell\r\ntailscale switch <account> [flags]\r\n```\r\n\r\nExamples:\r\n\r\n- To switch to the `alice@example.com` account:\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```shell\r\ntailscale switch alice@example.com\r\n```\r\n\r\n- To switch to the account that has the [nickname](https://tailscale.com/docs/features/client/fast-user-switching#setting-a-nickname) \"work\":\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```shell\r\ntailscale switch work\r\n```\r\n\r\n\r\nAvailable flags:\r\n\r\n- `--list` Lists available accounts.\r\n\r\n\r\n  - `--json` List available accounts in JSON format.\r\n\r\n```shell\r\ntailscale switch --list --json\r\n```\r\n\r\nSubcommands:\r\n\r\n- `remove <id>` removes a Tailscale account from the local machine. This does not delete the account itself, but it will no longer be available for switching to. You can add it back by logging in again. This command is currently in alpha and may change in the future.\r\n\r\n### [syspolicy](https://tailscale.com/docs/reference/tailscale-cli\\#syspolicy)\r\n\r\nList system policies, reload system policies, or inspect errors related to the [system policies](https://tailscale.com/docs/features/tailscale-system-policies) configured in your tailnet.\r\n\r\n```shell\r\ntailscale syspolicy\r\n```\r\n\r\nSubcommands:\r\n\r\n- `list` Shows system policies, reload system policies, or explore errors related to the [system policies](https://tailscale.com/docs/features/tailscale-system-policies) configured on the device.\r\n- `reload` Forces the Tailscale client to reload and reapply system policy settings on the device.\r\n\r\nAvailable flags:\r\n\r\n- `--json` Return a machine-readable JSON response.\r\n\r\n### [systray](https://tailscale.com/docs/reference/tailscale-cli\\#systray)\r\n\r\nThe `systray` command is available on the Linux client, is currently in [beta](https://tailscale.com/docs/reference/tailscale-release-stages#beta), and is available in Tailscale v1.88 or later.\r\n\r\nRun the [system tray (`systray`) application](https://tailscale.com/docs/features/client/linux-systray) for Linux desktop clients to access some common actions like fast user switching and exit node selection.\r\n\r\n```shell\r\ntailscale systray\r\n```\r\n\r\nDo not run `tailscale systray` as superuser (`sudo tailscale systray`), because systray is not designed to run as superuser and the command will fail.\r\n\r\n### [update](https://tailscale.com/docs/reference/tailscale-cli\\#update)\r\n\r\nThe `update` command is available in Tailscale v1.36 or later for Windows and Ubuntu/Debian Linux, in v1.48.0 or later for the Mac Apple Store version and Synology, and in v1.54.0 or later for QNAP and the [Standalone variant of the macOS application](https://tailscale.com/docs/concepts/macos-variants#standalone-variant). If you don't see this command and you are running one of these operating systems, consider [updating your Tailscale client](https://tailscale.com/docs/features/client/update).\r\n\r\nUpdate the Tailscale client version to the latest version, or to a different version.\r\n\r\n```shell\r\ntailscale update [flags]\r\n```\r\n\r\nAvailable flags:\r\n\r\n- `--dry-run` Show what update would do, without performing the update and without prompting to start the update.\r\n- `--track` The track to check for updates, either \"stable\", \"release-candidate\", or unstable. If not specified, the update uses the track currently in effect for the client. For more information, refer to [Tailscale client versions and release tracks](https://tailscale.com/docs/reference/tailscale-client-versions#client-release-tracks).\r\n- `--version` An explicit version to use for the update or downgrade. You cannot specify both `--track` and `--version`. This flag is not available on the macOS client.\r\n- `--yes` Perform the update without interactive prompts. Defaults to false.\r\n\r\nIf you downgrade to a version that does not have the `tailscale update` functionality, you won't be able to run `tailscale update` to return to the prior version. You would need to [perform an update](https://tailscale.com/docs/features/client/update) without using the Tailscale CLI.\r\n\r\nTo determine the current version on a client, run [`tailscale version`](https://tailscale.com/docs/reference/tailscale-cli#version).\r\n\r\nExamples:\r\n\r\nUpdate to the latest version within your current track (stable or unstable, depending on what you're running):\r\n\r\n```shell\r\ntailscale update\r\n```\r\n\r\nUpdate to the latest version within your current track without using interactive prompts:\r\n\r\n```shell\r\ntailscale update --yes\r\n```\r\n\r\nUpdate to Tailscale v1.34:\r\n\r\n```shell\r\ntailscale update --version=1.34.0\r\n```\r\n\r\nUpdate to the latest unstable version:\r\n\r\n```shell\r\ntailscale update --track=unstable\r\n```\r\n\r\n### [version](https://tailscale.com/docs/reference/tailscale-cli\\#version)\r\n\r\nPrint the version of Tailscale.\r\n\r\n```shell\r\ntailscale version [flags]\r\n```\r\n\r\nAvailable flags:\r\n\r\n- `--daemon` Also print local node's daemon version. Defaults to false.\r\n- `--json` Return a machine-readable JSON response.\r\n- `--upstream` Print the latest upstream release version from `pkgs.tailscale.com`. Defaults to false.\r\n- `--track`, `--track=[stable|unstable|release-candidate]` Check a specified track for updates. Empty value is the current track. For more information, refer to [Tailscale client versions and release tracks](https://tailscale.com/docs/reference/tailscale-client-versions#client-release-tracks).\r\n\r\nRunning `tailscale version` also prints other information, including the Go version. Here's an example of the output:\r\n\r\n```shell\r\ntailscale version\r\n1.72.0\r\n  tailscale commit: 9a0f00ea8ed08d1a94b357fb232ac9d44a512664\r\n  other commit: 387e0b40ad87031fb4444372ee80a97156e8deb9\r\n  go version: go1.22.5\r\n```\r\n\r\n### [wait](https://tailscale.com/docs/reference/tailscale-cli\\#wait)\r\n\r\nWait for Tailscale resources to become available for binding within a specified timeout or indefinitely.\r\n\r\nThe command returns exit code `0` on success. It returns a non-zero exit code on failure or timeout.\r\n\r\nAs of Tailscale version 1.96, the only resource available to wait for is the Tailscale interface and its IPs. A future version of this command may support waiting for other types of resources.\r\n\r\nIf running in userspace-networking mode, this command only waits for `tailscaled` and the `Running` state, as no physical network interface exists.\r\n\r\n```shell\r\ntailscale wait [flags]\r\n```\r\n\r\nAvailable flags:\r\n\r\n- `--timeout=<duration>` Set a timeout duration in seconds. Setting the duration to `0` will set the timeout to indefinite.\r\n\r\nExamples:\r\n\r\nTo wait on a specific type of IP address, use `tailscale ip` in combination with the `tailscale wait` command. For example, to wait for an IPv4 address:\r\n\r\n```shell\r\ntailscale wait && tailscale ip --assert=<specific-ip-address>\r\n```\r\n\r\nLinux `systemd` users can wait for the `tailscale-online.target` target, which runs this command.\r\n\r\nA service that wants to bind to (listen on) a Tailscale interface or IP address, can use the following pattern to ensure Tailscale is ready before the program starts:\r\n\r\n```shell\r\ntailscale wait && /path/to/service [...]\r\n```\r\n\r\n### [web](https://tailscale.com/docs/reference/tailscale-cli\\#web)\r\n\r\nStart a web server for controlling the `tailscaled` daemon. Starting a web server is useful when the CLI or a native app is impractical (such as on NAS devices).\r\n\r\n```shell\r\ntailscale web [flags]\r\n```\r\n\r\nAvailable flags:\r\n\r\n- `--cgi=<true|false>` Run the web server as a CGI script. Defaults to false.\r\n- `--listen=<ip|name>` Set the listen address. Use port `0` for automatic. Defaults to `localhost:8088`.\r\n- `--origin=<hostname>` Origin at which the web UI is served (if behind a reverse proxy or used with CGI).\r\n- `--prefix=<string>` Set the URL prefix added to requests (for CGI or reverse proxies).\r\n- `--readonly` Run the web server in read-only mode.\r\n\r\n### [whois](https://tailscale.com/docs/reference/tailscale-cli\\#whois)\r\n\r\nGet the machine and user associated with a Tailscale IP.\r\n\r\n```shell\r\ntailscale whois ip[:port]\r\n```\r\n\r\nFor user devices, this command returns:\r\n\r\n```markup\r\nMachine:\r\n  Name:\r\n  ID:\r\n  Addresses:\r\n  AllowedIPs:\r\nUser:\r\n  Name:\r\n  ID:\r\nCapabilities:\r\n```\r\n\r\nFor devices that are tagged, this command returns:\r\n\r\n```markup\r\nMachine:\r\n  Name:\r\n  ID:\r\n  Addresses:\r\n  AllowedIPs:\r\n  Tags:\r\nCapabilities:\r\n```\r\n\r\nFor each of these fields:\r\n\r\n- `Machine`, `Name` is the [machine name](https://tailscale.com/docs/concepts/machine-names) of the device. If you use [MagicDNS](https://tailscale.com/docs/features/magicdns), you can also use this name to connect.\r\n- `Machine`, `ID` is the [node id](https://tailscale.com/docs/reference/glossary#node) of the device.\r\n- `Machine`, `Addresses` are the [Tailscale IP](https://tailscale.com/docs/concepts/tailscale-ip-addresses), which you can use to connect to the device.\r\n- `Machine`, `AllowedIPs` are the subnet routes available to the device.\r\n- `Machine`, `Tags` are the tags to which the device belongs.\r\n- `User`, `Name` is the email address for the owner of the device.\r\n- `User`, `ID` is the unique ID of the user\r\n- `Capabilities` show the grants for the device.\r\n\r\nRunning `tailscale whois` with the `--json` flag will return a machine-readable JSON response. (Note that the `--json` option must come before the `ip[:port]` argument.)\r\n\r\n```shell\r\ntailscale whois --json ip[:port]\r\n```\r\n\r\nAvailable flags:\r\n\r\n- `--json` Output in JSON format.\r\n- `--proto=<proto>` Protocol for the WhoIs request; one of `tcp` or `udp`; empty mans both.\r\n\r\n### [appc-routes](https://tailscale.com/docs/reference/tailscale-cli\\#appc-routes)\r\n\r\nPrint the current [app connector](https://tailscale.com/docs/features/app-connectors) route status.\r\n\r\nBy default this command prints the domains configured in the app connector\r\nconfiguration and how many routes have been learned for each domain.\r\n\r\n```shell\r\ntailscale appc-routes [flags]\r\n```\r\n\r\nAvailable flags:\r\n\r\n- `--all` Print learned domains and routes and extra policy configured routes.\r\n- `--map` Print the map of learned domains.\r\n- `--n` Print the total number of routes this node advertises.\r\n\r\n![Project Logo](https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed)\r\n\r\nAsk AI\r\n\r\nreCAPTCHA\r\n\r\nRecaptcha requires verification.\r\n\r\nprotected by **reCAPTCHA**\r\n","html":"<h1>Tailscale CLI</h1>\n<p>Last validated: Jan 26, 2026</p>\n<p>The Tailscale client includes a built-in command-line interface (CLI) you can use to manage and troubleshoot your device within your Tailscale network (known as a tailnet).</p>\n<p>The Tailscale CLIis available for <a href=\"https://tailscale.com/pricing\">all plans</a>.</p>\n<h2><a href=\"https://tailscale.com/docs/reference/tailscale-cli#using-the-tailscale-cli\">Using the Tailscale CLI</a></h2>\n<p>The location of the CLI varies depending on your platform:</p>\n<p><a href=\"https://tailscale.com/docs/reference/tailscale-cli?tab=linux\">Linux</a> <a href=\"https://tailscale.com/docs/reference/tailscale-cli?tab=macos\">macOS</a> <a href=\"https://tailscale.com/docs/reference/tailscale-cli?tab=windows\">Windows</a></p>\n<p>On Linux, the CLI is your primary interface to Tailscale. The <code>tailscale</code> binary is likely already in your <code>$PATH</code>, so you can run commands with:</p>\n<pre><code class=\"language-shell\">tailscale &#x3C;command>\n</code></pre>\n<p>There is no CLI support for iOS and Android.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#tab-completion\">Tab completion</a></h3>\n<p>The Tailscale CLI supports tab-completion for commands, flags, and arguments. You can configure tab-completion with the <a href=\"https://tailscale.com/docs/reference/tailscale-cli#completion\"><code>completion</code> command</a>.</p>\n<pre><code class=\"language-shell\">tailscale completion &#x3C;shell> [--flags] [--descs]\n</code></pre>\n<p>Select your shell, then follow the instructions to load Tailscale CLI completions.</p>\n<p><a href=\"https://tailscale.com/docs/reference/tailscale-cli?tab=bash\">Bash</a> <a href=\"https://tailscale.com/docs/reference/tailscale-cli?tab=zsh\">Zsh</a> <a href=\"https://tailscale.com/docs/reference/tailscale-cli?tab=fish\">Fish</a> <a href=\"https://tailscale.com/docs/reference/tailscale-cli?tab=powershell\">PowerShell</a></p>\n<p>To load tab-completions for Bash, run the following command.</p>\n<pre><code class=\"language-shell\">source &#x3C;(tailscale completion bash)\n</code></pre>\n<p>Run the following command to load completions for every new session on Linux, then reload your shell.</p>\n<pre><code class=\"language-shell\">tailscale completion bash > /etc/bash_completion.d/tailscale\n</code></pre>\n<p>Run the following command to load completions for every new session on macOS, then reload your shell.</p>\n<pre><code class=\"language-shell\">tailscale completion bash > $(brew --prefix)/etc/bash_completion.d/tailscale\n</code></pre>\n<h2><a href=\"https://tailscale.com/docs/reference/tailscale-cli#command-reference\">Command Reference</a></h2>\n<p>Common flags for all commands:</p>\n<ul>\n<li><code>--socket=&#x3C;path></code> Path to the tailscaled socket.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#up\">up</a></h3>\n<p>Connect your device to Tailscale and authenticate if needed.</p>\n<pre><code class=\"language-shell\">tailscale up [flags]\n</code></pre>\n<p>Running <code>tailscale up</code> without any flags connects to Tailscale.</p>\n<p>Common flags:</p>\n<ul>\n<li><code>--accept-routes</code> Accept <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet routes</a> that other nodes advertise. The default depends on the host operating system. For certain platforms - Windows, iOS, Android, the macOS App Store variant, and the macOS standalone variant - the default is to accept routes. All other platforms default to not accepting routes.</li>\n<li><code>--advertise-exit-node</code> Offer to be an <a href=\"https://tailscale.com/docs/features/exit-nodes\">exit node</a> for outbound internet traffic from the Tailscale network. Defaults to not offering to be an exit node.</li>\n<li><code>--advertise-routes=&#x3C;ip></code> Expose physical <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet routes</a> to your entire Tailscale network.</li>\n<li><code>--exit-node=&#x3C;ip|name></code> Provide a <a href=\"https://tailscale.com/docs/concepts/ip-and-dns-addresses\">Tailscale IP</a> or <a href=\"https://tailscale.com/docs/concepts/machine-names\">machine name</a> to use as an exit node. To disable the use of an exit node, pass the flag with an empty argument: <code>--exit-node=</code>.</li>\n<li><code>--exit-node-allow-lan-access</code> Allow the client node access to its own LAN while connected to an exit node. Defaults to not allowing access while connected to an exit node.</li>\n<li><code>--force-reauth</code> Force re-authentication.</li>\n<li><code>--snat-subnet-routes</code> (Linux only) Disable source NAT. In normal operations, a subnet device sees the traffic originating from the subnet router. This simplifies routing, but does not allow traversing multiple networks. By disabling source NAT, the end machine sees the LAN IP address of the originating machine as the source.</li>\n<li><code>--stateful-filtering</code> Enable stateful filtering for <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet routers</a> and <a href=\"https://tailscale.com/docs/features/exit-nodes\">exit nodes</a>. When enabled, inbound packets with another node's destination IP are dropped, unless they are a part of a tracked outbound connection from that node. Defaults to disabled.</li>\n<li><code>--shields-up</code> <a href=\"https://tailscale.com/docs/features/client/manage-preferences\">Block incoming connections</a> from other devices on your Tailscale network. Useful for personal devices that only make outgoing connections.</li>\n<li><code>--ssh</code> Run a <a href=\"https://tailscale.com/docs/features/tailscale-ssh\">Tailscale SSH</a> server, permitting access per the tailnet administrator's declared <a href=\"https://tailscale.com/docs/features/access-control/acls\">access policy</a>, or the <a href=\"https://tailscale.com/docs/reference/examples/acls#allow-all-default-acl\">default policy</a> if none is defined. Defaults to false.</li>\n</ul>\n<p>For a complete list of available flags, refer to the <a href=\"https://tailscale.com/docs/reference/tailscale-cli/up\"><code>tailscale up</code></a> topic.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#down\">down</a></h3>\n<p>Disconnect from Tailscale. Running this command is the same as choosing to disconnect from or quit a Tailscale client.</p>\n<pre><code class=\"language-shell\">tailscale down\n</code></pre>\n<p>When disconnected, you cannot reach devices over Tailscale. To reconnect, re-run <code>tailscale up</code> without any flags.</p>\n<p>Available flags:</p>\n<ul>\n<li><code>--accept-risk=&#x3C;risk></code> Accept risk and skip confirmation for risk type. This can be either <code>lose-ssh</code> or <code>all</code>, or an empty string to not accept risk.</li>\n<li><code>--reason=\"&#x3C;description>\"</code> Specify the reason (inside quotes) for disconnecting Tailscale when the <a href=\"https://tailscale.com/docs/features/tailscale-system-policies\">system policies</a><code>AlwaysOn.Enabled</code> and <code>AlwaysOn.OverrideWithReason</code> are enabled. For example, <code>tailscale down --reason=\"DNS issues\"</code>.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#bugreport\">bugreport</a></h3>\n<p>The <code>bugreport</code> command is available in Tailscale v1.8 or later. If you don't see this command, consider <a href=\"https://tailscale.com/docs/features/client/update\">updating</a> your Tailscale client.</p>\n<p>Generate a bug report with diagnostic information.</p>\n<p>The <code>bugreport</code> command makes it easier to report bugs to the Tailscale team by marking diagnostic logs with indicators to make triage easier.</p>\n<p>If you encounter a connectivity issue, run <code>tailscale bugreport</code> on the device experiencing the issue at the time you encounter it.</p>\n<pre><code class=\"language-shell\">tailscale bugreport\n</code></pre>\n<p>This command prints a random identifier into diagnostic logs, which you can share with our team.</p>\n<p>Identifiers look like this:</p>\n<pre><code class=\"language-shell\">BUG-1b7641a16971a9cd75822c0ed8043fee70ae88cf05c52981dc220eb96a5c49a8-20210427151443Z-fbcd4fd3a4b7ad94\n</code></pre>\n<p>This command shares no personally identifiable information and is unused unless you share the bug identifier with our team.</p>\n<p>Available flags:</p>\n<ul>\n<li><code>--diagnose</code> Prints additional verbose information about the system to the Tailscale logs after generating a <code>bugreport</code> identifier, which can then be viewed by our support team. Defaults to <code>false</code>.</li>\n<li><code>--record</code> Pause and then write another <code>bugreport</code>. Use this flag to create an initial <code>bugreport</code> identifier. During the pause, perform the action that reproduces your issue. Then, press Enter to create a second <code>bugreport</code> identifier. Share both bug identifiers with our team. Defaults to <code>false</code>.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#cert\">cert</a></h3>\n<p>Generate Let's Encrypt certificate and key files on the host for <a href=\"https://tailscale.com/docs/how-to/set-up-https-certificates\">HTTPS certificates</a> in your tailnet.</p>\n<p>If you are trying to serve a folder of files or reverse proxy to an HTTP service, use the <a href=\"https://tailscale.com/docs/reference/tailscale-cli#serve\"><code>tailscale serve</code></a> command instead.</p>\n<pre><code class=\"language-shell\">tailscale cert hostname.tails-scales.ts.net\n</code></pre>\n<p>Alternatively, if you want to save the certificate and private key to files, you can use the <code>--cert-file</code> and <code>--key-file</code> arguments:</p>\n<pre><code class=\"language-shell\">tailscale cert --cert-file=cert.pem --key-file=key.pem hostname.tails-scales.ts.net\n</code></pre>\n<p>The certificates provided by Let's Encrypt have a 90-day expiry and require periodic renewal. When a certificate is delivered as files on disk which you then move to an install location, such as when using <code>tailscale cert</code>, the <a href=\"https://tailscale.com/docs/reference/tailscaled\"><code>tailscaled</code> daemon</a> doesn't know where to place a renewed certificate or how to install it. As a result, you are responsible for renewing any certificates that you create using <code>tailscale cert</code>.</p>\n<p>If a certificate is handled without the user initiating any file-based certificate installation (such as when using the <a href=\"https://github.com/tailscale/caddy-tailscale\">Caddy integration of Tailscale</a>) then the certificate will automatically renew without the user doing anything.</p>\n<p>Available flags:</p>\n<ul>\n<li><code>--cert-file=&#x3C;cert></code> Specify the certificate output path.</li>\n<li><code>--key-file=&#x3C;key></code> Specify the private key output path.</li>\n<li><code>--min-validity=&#x3C;duration></code> Request a specified minimum remaining validity on the returned certificate. <code>duration</code> can be any value parseable by <a href=\"https://pkg.go.dev/time#ParseDuration\"><code>time.ParseDuration()</code></a>. For example, use <code>120h</code> to set the duration to five days.</li>\n<li><code>--serve-demo</code> Serve on port <code>:443</code> using the cert as a demo, instead of writing out the files to disk.</li>\n</ul>\n<p>The <code>--min-validity</code> flag lets you ensure that the returned certificate is valid for at least the specified duration. If you specify a duration longer than the <a href=\"https://letsencrypt.org/docs/faq#what-is-the-lifetime-for-let-s-encrypt-certificates-for-how-long-are-they-valid\">certification lifetime set by Let's Encrypt</a>, it uses the maximum lifetime set by Let's Encrypt.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#dns\">dns</a></h3>\n<p>The <code>dns</code> command lets you access <a href=\"https://tailscale.com/docs/reference/dns-in-tailscale\">Tailscale DNS settings</a>. It's available in Tailscale v1.74.0 and later.</p>\n<p>Subcommands:</p>\n<ul>\n<li><code>status</code> Print the configuration of the local DNS forwarder and the tailnet-wide <a href=\"https://tailscale.com/docs/features/magicdns\">MagicDNS</a> configuration.</li>\n<li><code>query</code> Perform a DNS query using the local DNS forwarder. It's available in Tailscale v1.76.0 and later.</li>\n</ul>\n<p>Available flags for <code>status</code>:</p>\n<ul>\n<li><code>--all</code> Outputs advanced debugging information.</li>\n</ul>\n<p>Available flags for <code>status</code> and <code>query</code>:</p>\n<ul>\n<li><code>--json</code> Output in JSON format.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#drive\">drive</a></h3>\n<p>Share a directory with your tailnet using <a href=\"https://tailscale.com/docs/features/taildrive\">Taildrive</a>.</p>\n<pre><code class=\"language-shell\">tailscale drive share &#x3C;name> &#x3C;path>\r\ntailscale drive rename &#x3C;oldname> &#x3C;newname>\r\ntailscale drive unshare &#x3C;name>\r\ntailscale drive list\n</code></pre>\n<p>Subcommands:</p>\n<ul>\n<li><code>share</code> Create or modify a share.</li>\n<li><code>rename</code> Rename a share.</li>\n<li><code>unshare</code> Remove a share.</li>\n<li><code>list</code> List current shares.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#completion\">completion</a></h3>\n<p>Configure tab-completion for the Tailscale CLI.</p>\n<pre><code class=\"language-shell\">tailscale completion &#x3C;subcommand> [flags]\n</code></pre>\n<p>Subcommands:</p>\n<ul>\n<li><code>bash</code> Configure tab-completion for the <code>bash</code> shell.</li>\n<li><code>zsh</code> Configure tab-completion for the <code>zsh</code> shell.</li>\n<li><code>fish</code> Configure tab-completion for the <code>fish</code> shell.</li>\n<li><code>powershell</code> Configure tab-completion for PowerShell.</li>\n</ul>\n<p>Available flags:</p>\n<ul>\n<li><code>--flags=&#x3C;true|false></code> Configure whether to suggest flags (in addition to subcommands). Set to <code>true</code> by default.</li>\n<li><code>--descs=&#x3C;true|false></code> Configure whether to include descriptions of subcommands in the suggestions. Set to <code>true</code> by default.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#configure\">configure</a></h3>\n<p>Configure resources that you want to include in your tailnet.</p>\n<pre><code class=\"language-shell\">tailscale configure &#x3C;subcommands>\n</code></pre>\n<p>Subcommands:</p>\n<ul>\n<li><code>kubeconfig</code> (alpha) Configure <code>kubectl</code> to connect to a Kubernetes cluster using Tailscale.</li>\n<li><code>mac-vpn</code> Install or uninstall the VPN configuration on <a href=\"https://tailscale.com/docs/concepts/macos-variants#mac-app-store-variant\">App Store</a> and <a href=\"https://tailscale.com/docs/concepts/macos-variants#standalone-variant\">Standalone variant</a> of macOS.</li>\n<li><code>synology</code> Configure Synology to enable outbound connections needed for Tailscale.</li>\n<li><code>sysext</code> Activate, deactivate, or manage the state of the Tailscale <a href=\"https://tailscale.com/docs/concepts/macos-sysext\">system extension</a> on the <a href=\"https://tailscale.com/docs/concepts/macos-variants#standalone-variant\">Standalone variant</a> of macOS.</li>\n<li><code>systray</code> Manage the <code>systray</code> client for Linux.</li>\n</ul>\n<p>Available flags for <code>kubeconfig</code>:</p>\n<ul>\n<li><code>--http</code> Use HTTP instead of HTTPS to connect to the auth proxy. Ignored if you include a scheme in the hostname argument.</li>\n</ul>\n<p>Available subcommands for <code>mac-vpn</code>:</p>\n<ul>\n<li><code>install</code> Write the Tailscale VPN configuration to the macOS settings.</li>\n<li><code>uninstall</code> Delete the Tailscale VPN configuration from the macOS settings.</li>\n</ul>\n<p>Available subcommands for <code>sysext</code>:</p>\n<ul>\n<li><code>activate</code> Register the Tailscale system extension with macOS.</li>\n<li><code>deactivate</code> Deactivate the Tailscale system extension on macOS.</li>\n<li><code>status</code> Print the enablement status of the Tailscale system extension.</li>\n</ul>\n<p>Available flags for <code>systray</code>:</p>\n<ul>\n<li><code>--enable-startup=&#x3C;init-system></code> Install the startup script for the init system. The only currently supported value is <code>systemd</code>.</li>\n</ul>\n<p>Examples:</p>\n<ul>\n<li>To configure your local <code>kubeconfig</code> file for authentication with a Kubernetes auth proxy:</li>\n</ul>\n<pre><code class=\"language-shell\">tailscale configure kubeconfig &#x3C;hostname-or-fqdn>\n</code></pre>\n<ul>\n<li>To configure Synology to enable outbound connections:</li>\n</ul>\n<pre><code class=\"language-shell\">tailscale configure synology\n</code></pre>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#exit-node\">exit-node</a></h3>\n<p>Get information about <a href=\"https://tailscale.com/docs/features/exit-nodes\">exit-nodes</a> in your tailnet.</p>\n<pre><code class=\"language-shell\">tailscale exit-node &#x3C;subcommands>\n</code></pre>\n<p>Available subcommands:</p>\n<ul>\n<li><code>list</code> Lists the exit nodes in your tailnet.</li>\n<li><code>suggest</code> Suggests a <a href=\"https://tailscale.com/docs/features/exit-nodes/auto-exit-nodes\">recommended exit node</a>.</li>\n</ul>\n<p>Available flags for <code>list</code>:</p>\n<ul>\n<li><code>--filter=&#x3C;country></code> Filter exit nodes by country.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#file\">file</a></h3>\n<p>Access and make files available to <a href=\"https://tailscale.com/docs/features/taildrop\">Taildrop</a>.</p>\n<pre><code class=\"language-shell\">tailscale file cp &#x3C;files...> &#x3C;target>:\r\ntailscale file get &#x3C;target-directory>\n</code></pre>\n<p>Available commands:</p>\n<ul>\n<li><code>cp</code> Copy files to a host.</li>\n<li><code>get</code> Move files out of the Tailscale file inbox.</li>\n</ul>\n<p>Available flags for <code>cp</code>:</p>\n<ul>\n<li><code>--name=&#x3C;name></code> Alternate filename to use, especially useful when <code>&#x3C;file></code> is <code>-</code> (<code>stdin</code>).</li>\n<li><code>--targets</code> List possible file <code>cp</code> targets.</li>\n<li><code>--verbose</code> Verbose output.</li>\n</ul>\n<p>Available flags for <code>get</code>:</p>\n<ul>\n<li><code>--conflict=&#x3C;behavior>``behavior</code>when a conflicting (same-named) file already exists in the target directory.\n<ul>\n<li><code>skip</code> Skip conflicting files: leave them in the Taildrop inbox and print an error. Get any non-conflicting files.</li>\n<li><code>overwrite</code> Overwrite existing file.</li>\n<li><code>rename</code> Write to a new number-suffixed filename.</li>\n</ul>\n</li>\n<li><code>--loop</code> Run get in a loop, receiving files as they come in.</li>\n<li><code>--verbose</code> Verbose output.</li>\n<li><code>--wait</code> Wait for a file to arrive if inbox is empty.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#funnel\">funnel</a></h3>\n<p>Serve content and local servers from your Tailscale node to the internet.</p>\n<p>To limit local service access to your tailnet, use the <a href=\"https://tailscale.com/docs/reference/tailscale-cli#serve\"><code>serve</code></a> command.</p>\n<pre><code class=\"language-shell\">tailscale funnel &#x3C;target>\r\ntailscale funnel &#x3C;subcommand> [flags] &#x3C;args>\n</code></pre>\n<p>Subcommands:</p>\n<ul>\n<li><a href=\"https://tailscale.com/docs/reference/tailscale-cli/funnel#get-the-status\"><code>status</code></a> Gets the status.</li>\n<li><a href=\"https://tailscale.com/docs/reference/tailscale-cli/funnel#reset-tailscale-funnel\"><code>reset</code></a> Resets the configuration.</li>\n</ul>\n<p>For more information, refer to the <a href=\"https://tailscale.com/docs/reference/tailscale-cli/funnel\"><code>tailscale funnel</code></a> topic.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#ip\">ip</a></h3>\n<p>Get a device's Tailscale IP address.</p>\n<pre><code class=\"language-shell\">tailscale ip [flags] [&#x3C;hostname>]\n</code></pre>\n<p>By default, this command returns both an <a href=\"https://tailscale.com/docs/concepts/ip-and-dns-addresses\"><code>100.x.y.z</code> IPv4 address</a> and an IPv6 address for the current device. You can return only an IPv4 or IPv6 address by passing either the <code>-4</code> or <code>-6</code> flags.</p>\n<pre><code class=\"language-shell\">tailscale ip -4\n</code></pre>\n<p>For example, this command will return information similar to the following:</p>\n<pre><code class=\"language-shell\">100.121.112.23\n</code></pre>\n<p>You can also find the Tailscale IP for other devices on your network by adding the device hostname after the command. For example:</p>\n<pre><code class=\"language-shell\">tailscale ip raspberrypi\n</code></pre>\n<p>This command will return information similar to the following:</p>\n<pre><code class=\"language-shell\">100.126.153.111\r\nfd7a:115c:a1e0:ab12:4843:cd96:627e:9975\n</code></pre>\n<p>Available flags:</p>\n<ul>\n<li><code>--4</code> Only return an IPv4 address.</li>\n<li><code>--6</code> Only return an IPv6 address.</li>\n<li><code>--1</code> Only return one address, preferring IPv4.</li>\n<li><code>--assert=&#x3C;specific-ip-address></code> Assert that the node's IP (or one of the node's IPs) matches this IP address.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#licenses\">licenses</a></h3>\n<p>Get open source license information.</p>\n<pre><code class=\"language-shell\">tailscale licenses\n</code></pre>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#lock\">lock</a></h3>\n<p>Manage <a href=\"https://tailscale.com/docs/features/tailnet-lock\">Tailnet Lock</a> for your tailnet.</p>\n<pre><code class=\"language-shell\">tailscale lock &#x3C;subcommand> [flags] &#x3C;args>\n</code></pre>\n<p>Common subcommands:</p>\n<ul>\n<li><a href=\"https://tailscale.com/docs/reference/tailscale-cli/lock#lock-init\"><code>init</code></a> Initializes Tailnet Lock.</li>\n<li><a href=\"https://tailscale.com/docs/reference/tailscale-cli/lock#lock-status\"><code>status</code></a> Outputs the state of Tailnet Lock.</li>\n<li><a href=\"https://tailscale.com/docs/reference/tailscale-cli/lock#lock-add\"><code>add</code></a> Adds one or more trusted signing keys to Tailnet Lock.</li>\n<li><a href=\"https://tailscale.com/docs/reference/tailscale-cli/lock#lock-remove\"><code>remove</code></a> Removes one or more trusted signing keys from Tailnet Lock.</li>\n<li><a href=\"https://tailscale.com/docs/reference/tailscale-cli/lock#lock-sign\"><code>sign</code></a> Signs a node key and transmits the signature to the coordination server.</li>\n</ul>\n<p>Running <code>tailscale lock</code> with no subcommand and no arguments is equivalent to running <a href=\"https://tailscale.com/docs/reference/tailscale-cli/lock#lock-status\"><code>tailscale lock status</code></a>.</p>\n<p>For a complete list of subcommands and flags, refer to the <a href=\"https://tailscale.com/docs/reference/tailscale-cli/lock\"><code>tailscale lock</code></a> topic.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#login\">login</a></h3>\n<p>Log into Tailscale (and add this device to your Tailscale network). For more information about logging in, refer to <a href=\"https://tailscale.com/docs/features/client/fast-user-switching\">fast-user-switching</a>.</p>\n<pre><code class=\"language-shell\">tailscale login [flags]\n</code></pre>\n<p>Available flags:</p>\n<ul>\n<li><code>--accept-dns</code> Accept <a href=\"https://tailscale.com/docs/reference/dns-in-tailscale\">DNS configuration</a> from the admin console. Defaults to accepting DNS settings.</li>\n<li><code>--accept-routes</code> Accept <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet routes</a> that other nodes advertise. The default depends on the host operating system. For certain platforms - Windows, iOS, Android, the macOS App Store variant, and the macOS standalone variant - the default is to accept routes. All other platforms default to not accepting routes.</li>\n<li><code>--advertise-connector</code> Offer to be an <a href=\"https://tailscale.com/docs/features/app-connectors\">app connector</a> for domain-specific internet traffic for the tailnet.</li>\n<li><code>--advertise-exit-node</code> Offer to be an <a href=\"https://tailscale.com/docs/features/exit-nodes\">exit node</a> for outbound internet traffic from the Tailscale network. Defaults to not offering to be an exit node.</li>\n<li><code>--advertise-routes=&#x3C;ip></code> Expose physical <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet routes</a> to your entire Tailscale network.</li>\n<li><code>--advertise-tags=&#x3C;tags></code> Give tagged permissions to this device. You must be <a href=\"https://tailscale.com/docs/reference/syntax/policy-file#tag-owners\">listed in <code>\"TagOwners\"</code></a> to be able to apply tags.</li>\n<li><code>--auth-key=&#x3C;key></code> Provide an <a href=\"https://tailscale.com/docs/features/access-control/auth-keys\">auth key</a> to automatically authenticate the node as your user account. For a best practice when handling the <code>--auth-key</code> value, refer to <a href=\"https://tailscale.com/docs/features/access-control/auth-keys/how-to/secure-auth-keys\">Securely handle an auth key</a>.</li>\n<li><code>--client-id</code> Client ID used to generate <a href=\"https://tailscale.com/docs/features/access-control/auth-keys\">auth keys</a> by using\r\n<a href=\"https://tailscale.com/docs/features/workload-identity-federation\">workload identity federation</a>.</li>\n<li><code>--client-secret</code> <a href=\"https://tailscale.com/docs/features/oauth-clients\">OAuth Client</a> secret used to generate\r\n<a href=\"https://tailscale.com/docs/features/access-control/auth-keys\">auth keys</a>; if it begins with <code>file:</code>, then it's a path to a\r\nfile containing the secret.</li>\n<li><code>--exit-node=&#x3C;ip|name></code> Provide a <a href=\"https://tailscale.com/docs/concepts/ip-and-dns-addresses\">Tailscale IP</a> or <a href=\"https://tailscale.com/docs/concepts/machine-names\">machine name</a> to use as an exit node. To disable the use of an exit node, pass the flag with an empty argument: <code>--exit-node=</code>.</li>\n<li><code>--exit-node-allow-lan-access</code> Allow the client node access to its own LAN while connected to an exit node. Defaults to not allowing access while connected to an exit node.</li>\n<li><code>--hostname=&#x3C;name></code> Provide a hostname to use for the device instead of the one provided by the OS. Note that this will change the machine name used in <a href=\"https://tailscale.com/docs/features/magicdns\">MagicDNS</a>.</li>\n<li><code>--id-token</code> ID token from the identity provider to exchange with the control\r\nserver for <a href=\"https://tailscale.com/docs/features/workload-identity-federation\">workload identity federation</a>; if it begins\r\nwith <code>file:</code>, then it's a path to a file containing the token.</li>\n<li><code>--audience</code> Audience used when requesting an ID token from an identity provider for auth keys generated by <a href=\"https://tailscale.com/docs/features/workload-identity-federation\">workload identity federation</a>.</li>\n<li><code>--login-server=&#x3C;url></code> Provide the base URL of a control server instead of <code>https://controlplane.tailscale.com</code>. If you are using <a href=\"https://tailscale.com/blog/opensource#the-open-source-coordination-server\">Headscale</a> for your control server, use your Headscale instance's URL.</li>\n<li><code>--netfilter-mode=&#x3C;mode></code> Netfilter mode (one of <code>on</code>, <code>nodivert</code>, <code>off</code>). Refer to <a href=\"https://tailscale.com/docs/reference/netfilter-modes\">Tailscale netfilter modes</a> for more information.</li>\n<li><code>--nickname=&#x3C;name></code> <a href=\"https://tailscale.com/docs/features/client/fast-user-switching#setting-a-nickname\">Nickname</a> for the current account.</li>\n<li><code>--operator=&#x3C;user></code> Provide a Unix username other than <code>root</code> to operate <code>tailscaled</code>.</li>\n<li><code>--qr</code> Generate a QR code for the web login URL. Defaults to not showing a QR code.</li>\n<li><code>--qr-format=&#x3C;format></code> QR code formatting: <code>small</code> or <code>large</code>. Defaults to <code>small</code>.</li>\n<li><code>--stateful-filtering</code> Enable stateful filtering for <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet routers</a> and <a href=\"https://tailscale.com/docs/features/exit-nodes\">exit nodes</a>. When enabled, inbound packets with another node's destination IP are dropped, unless they are a part of a tracked outbound connection from that node. Defaults to disabled.</li>\n<li><code>--shields-up</code> <a href=\"https://tailscale.com/docs/features/client/manage-preferences\">Block incoming connections</a> from other devices on your Tailscale network. Useful for personal devices that only make outgoing connections.</li>\n<li><code>--snat-subnet-routes</code> Source NAT traffic to local routes advertised with <code>--advertise-routes</code>.</li>\n<li><code>--ssh</code> Run a <a href=\"https://tailscale.com/docs/features/tailscale-ssh\">Tailscale SSH</a> server, permitting access per the tailnet administrator's declared <a href=\"https://tailscale.com/docs/features/access-control/acls\">access policy</a>, or the <a href=\"https://tailscale.com/docs/reference/examples/acls#allow-all-default-acl\">default policy</a> if none is defined. Defaults to false.</li>\n<li><code>--timeout=&#x3C;duration></code> Maximum amount of time to wait for the Tailscale service to initialize. <code>duration</code> can be any value parseable by <a href=\"https://pkg.go.dev/time#ParseDuration\"><code>time.ParseDuration()</code></a>. Defaults to <code>0s</code>, which blocks forever.</li>\n<li><code>--unattended</code>(Windows only) Run in <a href=\"https://tailscale.com/docs/how-to/run-unattended\">unattended mode</a> where Tailscale keeps running even after the current user logs out.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#logout\">logout</a></h3>\n<p>Disconnect from Tailscale and expire the current log in. The next time you run <code>tailscale up</code>, you'll need to reauthenticate your device.</p>\n<pre><code class=\"language-shell\">tailscale logout\n</code></pre>\n<p>If you run <code>tailscale logout</code> on an <a href=\"https://tailscale.com/docs/features/ephemeral-nodes\">ephemeral node</a>, the node will be removed from your tailnet immediately.</p>\n<p>Available flags:</p>\n<ul>\n<li><code>--reason</code> Reason for the logout, if required by a <a href=\"https://tailscale.com/docs/features/tailscale-system-policies\">system policy</a>.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#metrics\">metrics</a></h3>\n<p>Expose and collect <a href=\"https://tailscale.com/docs/reference/tailscale-client-metrics\">Tailscale client metrics</a> for use with third-party monitoring systems.</p>\n<pre><code class=\"language-shell\">tailscale metrics\n</code></pre>\n<p>Subcommands:</p>\n<ul>\n<li><code>print</code> Shows client metrics in the current terminal session.</li>\n<li><code>write</code> Writes metric values to a text file.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#netcheck\">netcheck</a></h3>\n<p>Get a report on your current physical network conditions. This command is provided to help debug connection troubles.</p>\n<pre><code class=\"language-shell\">tailscale netcheck\n</code></pre>\n<p><code>netcheck</code> will output a report like this:</p>\n<pre><code class=\"language-shell\">Report:\r\n\t* Time: 2025-03-13T16:35:03.336481Z\r\n\t* UDP: true\r\n\t* IPv4: yes, &#x3C;ipv4-address>\r\n\t* IPv6: yes, &#x3C;ipv6-address>\r\n\t* MappingVariesByDestIP: false\r\n\t* PortMapping:\r\n\t* Nearest DERP: Seattle\r\n\t* DERP latency:\r\n\t\t- sea: 24.2ms  (Seattle)\r\n\t\t- sfo: 50.5ms  (San Francisco)\r\n\t\t- lax: 57.2ms  (Los Angeles)\r\n\t\t- den: 58.5ms  (Denver)\r\n\t\t- dfw: 63ms    (Dallas)\r\n\t\t- ord: 73.3ms  (Chicago)\n</code></pre>\n<p>(In the example output, the list of <a href=\"https://tailscale.com/docs/reference/derp-servers\">DERP servers</a> is truncated for brevity.)</p>\n<ul>\n<li><code>UDP</code> shows whether UDP traffic is enabled on the current network. If this is false, it's unlikely Tailscale will be able to make point-to-point connections, and will instead rely on our <a href=\"https://tailscale.com/docs/reference/derp-servers\">encrypted TCP relays (DERP)</a></li>\n<li><code>IPv4</code> and <strong>IPv6</strong> show your network public IP addresses and support for both protocols.</li>\n<li><code>MappingVariesByDestIP</code> describes whether your device is behind a difficult NAT that varies the device's IP address depending on the destination.</li>\n<li><code>HairPinning</code> describes whether your router can route connections from endpoints on your LAN back to your LAN using those endpoints' globally-mapped IPv4 addresses/ports.</li>\n<li><code>PortMapping</code> describes a list of which three port-mapping services exist on your router. Possible values are \"UPnP\", \"NAT-PMP\", and \"PCP\".</li>\n<li><code>DERP latency</code> and <code>Nearest DERP</code> describe latency from our <a href=\"https://tailscale.com/docs/reference/derp-servers\">encrypted TCP relays (DERP)</a>. The lowest latency (\"nearest\") server is used for traffic.</li>\n</ul>\n<p>If any fields are blank, it means Tailscale wasn't able to measure that network property.</p>\n<p>All the information from <code>tailscale netcheck</code> is also available in the <a href=\"https://login.tailscale.com/admin/machines\">Machines</a> page of the admin console, by selecting a particular machine.</p>\n<p>Available flags:</p>\n<ul>\n<li><code>--every=&#x3C;duration></code> If non-zero, do an incremental report with the given frequency.</li>\n<li><code>--format=&#x3C;format></code> Output format; empty (for human-readable), <code>json</code> or <code>json-line</code>.</li>\n<li><code>--verbose</code> Verbose logs.</li>\n<li><code>--bind-address</code> Send and receive connectivity probes using this locally bound IP address.</li>\n<li><code>--bind-port</code> Send and receive connectivity probes using this UDP port.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#nc\">nc</a></h3>\n<p>Connect to a port on a host, connected to stdin/stdout.</p>\n<pre><code class=\"language-shell\">tailscale nc &#x3C;hostname-or-IP> &#x3C;port>\n</code></pre>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#ping\">ping</a></h3>\n<p>Attempt to ping another device exclusively over Tailscale.</p>\n<p>The regular <code>ping</code> command often works fine over Tailscale, but <code>tailscale ping</code> provides more details about the connection over Tailscale that can be helpful when troubleshooting connectivity.</p>\n<pre><code class=\"language-shell\">tailscale ping &#x3C;hostname-or-ip>\n</code></pre>\n<p>You can call <code>tailscale ping</code> using either a <a href=\"https://tailscale.com/docs/concepts/ip-and-dns-addresses\">100.x.y.z address</a> or a <a href=\"https://tailscale.com/docs/concepts/machine-names\">machine name</a>.</p>\n<p>Available flags:</p>\n<ul>\n<li><code>--c</code> Maximum number of pings to send. Defaults to 10.</li>\n<li><code>--icmp</code>, <code>--icmp=false</code> Perform an ICMP-level ping (through WireGuard, but not the local host OS stack). Defaults to false.</li>\n<li><code>--peerapi</code>, <code>--peerapi=false</code> Try hitting the peer's PeerAPI HTTP server. Defaults to false.</li>\n<li><code>--size=&#x3C;size></code> Size of the ping message (default pings only). 0 for minimum size.</li>\n<li><code>--tsmp</code>, <code>--tsmp=false</code> Perform a TSMP-level ping (through WireGuard, but not either host's OS stack). Defaults to false.</li>\n<li><code>--timeout=&#x3C;duration></code> Maximum amount of time to wait before giving up on a ping. <code>duration</code> can be any value parseable by <a href=\"https://pkg.go.dev/time#ParseDuration\"><code>time.ParseDuration()</code></a>. Defaults to <code>5s</code>.</li>\n<li><code>--until-direct</code>, <code>--until-direct=false</code> Stop once a direct path is established. Defaults to true.</li>\n<li><code>--verbose</code>, <code>--verbose=false</code> Show verbose output. Defaults to false.</li>\n</ul>\n<p>There are <a href=\"https://tailscale.com/docs/reference/ping-types\">four types of ping messages</a> supported by the <code>tailscale ping</code> command.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#serve\">serve</a></h3>\n<p>Serve content and local servers from your Tailscale node to your tailnet.</p>\n<p>To publicly share the local service to the internet, use the <a href=\"https://tailscale.com/docs/reference/tailscale-cli#funnel\"><code>funnel</code></a> command.</p>\n<pre><code class=\"language-shell\">tailscale serve &#x3C;target>\r\ntailscale serve &#x3C;subcommand> [flags] &#x3C;args>\n</code></pre>\n<p>Subcommands:</p>\n<ul>\n<li><a href=\"https://tailscale.com/docs/reference/tailscale-cli/serve#get-the-status\"><code>status</code></a> Gets the status.</li>\n<li><a href=\"https://tailscale.com/docs/reference/tailscale-cli/serve#reset-tailscale-serve\"><code>reset</code></a> Resets the configuration.</li>\n</ul>\n<p>For more information, refer to the <a href=\"https://tailscale.com/docs/reference/tailscale-cli/serve\"><code>tailscale serve</code></a> topic.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#set\">set</a></h3>\n<p>Change specified preferences.</p>\n<p>Unlike <a href=\"https://tailscale.com/docs/reference/tailscale-cli#up\"><code>tailscale up</code></a>, this command does not require the complete set of desired settings. It only updates the settings you explicitly set. There are no default values. Note that when using <a href=\"https://tailscale.com/docs/features/client/fast-user-switching\">Fast User Switching</a>, changes made are only for the currently connected tailnet.</p>\n<pre><code class=\"language-shell\">tailscale set [flags]\n</code></pre>\n<p>Available flags:</p>\n<ul>\n<li><code>--accept-dns</code> Accept <a href=\"https://tailscale.com/docs/reference/dns-in-tailscale\">DNS configuration</a> from the admin console.</li>\n<li><code>--accept-risk=&#x3C;risk></code> Accept risk and skip confirmation for risk type. This can be either <code>lose-ssh</code> or <code>all</code>, or an empty string to not accept risk.</li>\n<li><code>--accept-routes</code>, <code>--accept-routes=false</code> Accept <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet routes</a> that other nodes advertise. The default depends on the host operating system. For certain platforms - Windows, iOS, Android, the macOS App Store variant, and the macOS standalone variant - the default is to accept routes. All other platforms default to not accepting routes.</li>\n<li><code>--advertise-connector</code> Offer to be an <a href=\"https://tailscale.com/docs/features/app-connectors\">app connector</a> for domain-specific internet traffic for the tailnet.</li>\n<li><code>--advertise-exit-node</code>, <code>--advertise-exit-node=false</code> Offer to be an exit node for internet traffic for the tailnet.</li>\n<li><code>--advertise-routes=&#x3C;ip></code> Expose physical <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet routes</a> to your entire Tailscale network. This is a comma-separated string, such as \"10.0.0.0/8,192.168.0.0/24\", or an empty string to not advertise routes.</li>\n<li><code>--auto-update</code>, <code>--auto-update=false</code> Enable or disable <a href=\"https://tailscale.com/docs/features/client/update#auto-updates\">auto-updates</a> for the client.</li>\n<li><code>--exit-node=&#x3C;ip|name></code> Provide a <a href=\"https://tailscale.com/docs/concepts/ip-and-dns-addresses\">Tailscale IP</a> or <a href=\"https://tailscale.com/docs/concepts/machine-names\">machine name</a> to use as an exit node. You can also use <code>--exit-node=auto:any</code> to track the suggested exit node and automatically switch to it when available exit nodes or network conditions change. To disable the use of an exit node, pass the flag with an empty argument using <code>--exit-node=</code>.</li>\n<li><code>--exit-node-allow-lan-access</code>, <code>--exit-node-allow-lan-access=false</code> Allow the client node access to its own LAN while connected to an exit node.</li>\n<li><code>--hostname=&#x3C;name></code> Hostname to use for the device instead of the one provided by the OS. Note that this will change the machine name used in <a href=\"https://tailscale.com/docs/features/magicdns\">MagicDNS</a>.</li>\n<li><code>--netfilter-mode=&#x3C;mode></code> Netfilter mode (one of <code>on</code>, <code>nodivert</code>, <code>off</code>). Refer to <a href=\"https://tailscale.com/docs/reference/netfilter-modes\">Tailscale netfilter modes</a> for more information.</li>\n<li><code>--nickname=&#x3C;name></code> <a href=\"https://tailscale.com/docs/features/client/fast-user-switching#setting-a-nickname\">Nickname</a> for the current account.</li>\n<li><code>--operator=&#x3C;user></code> A Unix username other than <code>root</code> to operate <code>tailscaled</code>.</li>\n<li><code>--relay-server-port=&#x3C;port></code> Specify a UDP port to accept peer relay connections on. UDP port number (<code>0</code> will pick a random unused port) for the relay server to bind to, on all interfaces, or empty string to disable relay server functionality. Refer to <a href=\"https://tailscale.com/docs/features/peer-relay\">Tailscale Peer Relays</a> for more information.</li>\n<li><code>--relay-server-static-endpoints</code> Use static endpoints for <a href=\"https://tailscale.com/docs/features/peer-relay\">Tailscale Peer Relays</a>.</li>\n<li><code>--report-posture</code> Allow management plane to gather <a href=\"https://tailscale.com/docs/features/device-posture\">device posture</a> information.</li>\n<li><code>--shields-up</code>, <code>--shields-up=false</code> <a href=\"https://tailscale.com/docs/features/client/manage-preferences\">Block incoming connections</a> from other devices on your Tailscale network.\r\nUseful for personal devices that only make outgoing connections.</li>\n<li><code>--snat-subnet-routes</code> Source NAT traffic to local routes advertised with <code>--advertise-routes</code>.</li>\n<li><code>--ssh</code>, <code>--ssh=false</code> Run a <a href=\"https://tailscale.com/docs/features/tailscale-ssh\">Tailscale SSH</a> server, permitting access per the tailnet administrator's declared <a href=\"https://tailscale.com/docs/features/access-control/acls\">access policy</a>, or the <a href=\"https://tailscale.com/docs/reference/examples/acls#allow-all-default-acl\">default policy</a> if none is defined.</li>\n<li><code>--stateful-filtering</code> Apply stateful filtering to forwarded packets (subnet routers, exit nodes, and so on).</li>\n<li><code>--update-check</code> Notify about available Tailscale updates.</li>\n<li><code>--webclient</code>, <code>--webclient=false</code> Expose the <a href=\"https://tailscale.com/docs/features/client/device-web-interface\">web interface</a> to your tailnet persistently in the background on port <code>:5252.</code></li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#ssh\">ssh</a></h3>\n<p>Establish a <a href=\"https://tailscale.com/docs/features/tailscale-ssh\">Tailscale SSH</a> session to a Tailscale machine.</p>\n<p>You can often use the regular <code>ssh</code> command or another SSH client to make an SSH session to a Tailscale machine. However, when your local node is in <a href=\"https://tailscale.com/docs/reference/kernel-vs-userspace-routers#userspace-netstack-mode\">userspace-networking</a> mode and can't make a direct connection, use <code>tailscale ssh</code>. This sets up an SSH <code>ProxyCommand</code> to connect through the local <code>tailscaled</code> daemon. You can also use <code>tailscale ssh</code> when your local node is in <a href=\"https://tailscale.com/docs/reference/kernel-vs-userspace-routers#kernel-mode\">kernel</a> mode.</p>\n<p>The <code>tailscale ssh</code> command automatically checks the destination server's SSH host key against the node's SSH host key as advertised by using the Tailscale coordination server.</p>\n<pre><code class=\"language-shell\">tailscale ssh &#x3C;args>\n</code></pre>\n<p><code>&#x3C;args></code> is one of the following forms:</p>\n<ul>\n<li><code>host</code> The destination server. An interactive session will prompt you for the user name to use for the session.</li>\n<li><code>user@host</code> The user name for the session and the destination server.</li>\n</ul>\n<p>For both forms, <code>host</code> can be the destination server's <a href=\"https://tailscale.com/docs/features/magicdns\">MagicDNS</a> name (even if <code>--accept-dns=false</code> was set on the local node) or the destination server's <a href=\"https://tailscale.com/docs/concepts/ip-and-dns-addresses\">Tailscale IP address</a>.</p>\n<p><code>tailscale ssh</code> is not available on sandboxed macOS builds—use the regular <code>ssh</code> client instead.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#status\">status</a></h3>\n<p>Get the status of your connections to other Tailscale devices.</p>\n<pre><code class=\"language-shell\">tailscale status\n</code></pre>\n<p>This command returns a condensed table of information in human-readable format:</p>\n<pre><code class=\"language-markup\">1           2         3           4         5\r\n100.1.2.3   device-a  apenwarr@   linux     active; direct &#x3C;ip-port>, tx 1116 rx 1124\r\n100.4.5.6   device-b  crawshaw@   macOS     active; relay &#x3C;relay-server>, tx 1351 rx 4262\r\n100.7.8.9   device-c  danderson@  windows   idle; tx 1214 rx 50\r\n100.0.1.2   device-d  ross@       iOS       -\n</code></pre>\n<p>From left-to-right, these columns represent:</p>\n<ul>\n<li>Column 1 is a <a href=\"https://tailscale.com/docs/concepts/tailscale-ip-addresses\"><strong>Tailscale IP</strong></a>, which you can use to connect to the device.</li>\n<li>Column 2 is the <a href=\"https://tailscale.com/docs/concepts/machine-names\"><strong>machine name</strong></a> of the device. If you use <a href=\"https://tailscale.com/docs/features/magicdns\">MagicDNS</a>, you can also use this name to connect.</li>\n<li>Column 3 is the <strong>email address</strong> for the owner of the device.</li>\n<li>Column 4 is the <strong>device OS</strong>.</li>\n<li>Column 5 shows the current <strong>connection status</strong>.</li>\n</ul>\n<p>Connection status (column 5) is shown using three terms:</p>\n<ul>\n<li><code>active</code> means traffic is currently being sent/received from this device. It also includes the connection type, which can be <code>direct</code>, <code>relay</code>, or <code>peer-relay</code>.\n<ul>\n<li>If the connection is <code>direct</code>, it includes peer device's IP address.</li>\n<li>If the connection is <code>relay</code>, it includes the <a href=\"https://tailscale.com/docs/reference/derp-servers\">DERP server</a>'s city code (<code>nyc</code>, <code>fra</code>, <code>tok</code>, <code>syd</code>) for the respective location.</li>\n<li>If the connection is <a href=\"https://tailscale.com/docs/features/peer-relay\"><code>peer-relay</code></a>, it includes the Tailscale IP address of the peer relay and the VNI (virtual network interface) used.</li>\n</ul>\n</li>\n<li><code>idle</code> means traffic is not currently being sent/received from this device.</li>\n<li><code>-</code> means no traffic has ever been sent/received from this device.</li>\n</ul>\n<p><code>active</code> and <code>idle</code> connection statuses will also include <code>tx</code>/<code>rx</code> values indicating the number of bytes sent (<code>tx</code>) and received (<code>rx</code>) from this device.</p>\n<p>Running <code>tailscale status</code> with the <code>--json</code> flag returns a machine-readable JSON response.</p>\n<pre><code class=\"language-shell\">tailscale status --json\n</code></pre>\n<p>Unlike <code>tailscale status</code>, using this flag gives a detailed list of peers and users in your tailnet that makes it well-suited for automation tasks. It also includes additional metadata associated with your device.</p>\n<p>Combine this with <a href=\"https://stedolan.github.io/jq\"><code>jq</code></a> to automate data collection about your network. For example, the following command counts and sorts the relay servers your Tailscale peers are connected to.</p>\n<pre><code class=\"language-shell\">tailscale status --json | jq -r '.Peer[].Relay | select(.!=\"\")' | sort | uniq -c | sort -nr\n</code></pre>\n<p>Available flags:</p>\n<ul>\n<li><code>--active</code> Filter output to only peers with active sessions (not applicable to web mode).</li>\n<li><code>--browser</code> Open a browser in web mode (default <code>true</code>).</li>\n<li><code>--header</code> Show column headers in table format (default <code>false</code>).</li>\n<li><code>--json</code> Output in JSON format (WARNING: format subject to change).</li>\n<li><code>--listen=&#x3C;address></code> Listen address for web mode; use port 0 for automatic (default <code>127.0.0.1:8384</code>).</li>\n<li><code>--peers</code> Show status of peers (default <code>true</code>).</li>\n<li><code>--self</code> Show status of local machine (default <code>true</code>).</li>\n<li><code>--web</code> Run webserver with HTML showing status.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#switch\">switch</a></h3>\n<p>Switch to a different Tailscale account. For more information about switching accounts, refer to <a href=\"https://tailscale.com/docs/features/client/fast-user-switching\">fast-user-switching</a>.</p>\n<pre><code class=\"language-shell\">tailscale switch &#x3C;account> [flags]\n</code></pre>\n<p>Examples:</p>\n<ul>\n<li>To switch to the <code>alice@example.com</code> account:</li>\n</ul>\n<pre><code class=\"language-shell\">tailscale switch alice@example.com\n</code></pre>\n<ul>\n<li>To switch to the account that has the <a href=\"https://tailscale.com/docs/features/client/fast-user-switching#setting-a-nickname\">nickname</a> \"work\":</li>\n</ul>\n<pre><code class=\"language-shell\">tailscale switch work\n</code></pre>\n<p>Available flags:</p>\n<ul>\n<li>\n<p><code>--list</code> Lists available accounts.</p>\n<ul>\n<li><code>--json</code> List available accounts in JSON format.</li>\n</ul>\n</li>\n</ul>\n<pre><code class=\"language-shell\">tailscale switch --list --json\n</code></pre>\n<p>Subcommands:</p>\n<ul>\n<li><code>remove &#x3C;id></code> removes a Tailscale account from the local machine. This does not delete the account itself, but it will no longer be available for switching to. You can add it back by logging in again. This command is currently in alpha and may change in the future.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#syspolicy\">syspolicy</a></h3>\n<p>List system policies, reload system policies, or inspect errors related to the <a href=\"https://tailscale.com/docs/features/tailscale-system-policies\">system policies</a> configured in your tailnet.</p>\n<pre><code class=\"language-shell\">tailscale syspolicy\n</code></pre>\n<p>Subcommands:</p>\n<ul>\n<li><code>list</code> Shows system policies, reload system policies, or explore errors related to the <a href=\"https://tailscale.com/docs/features/tailscale-system-policies\">system policies</a> configured on the device.</li>\n<li><code>reload</code> Forces the Tailscale client to reload and reapply system policy settings on the device.</li>\n</ul>\n<p>Available flags:</p>\n<ul>\n<li><code>--json</code> Return a machine-readable JSON response.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#systray\">systray</a></h3>\n<p>The <code>systray</code> command is available on the Linux client, is currently in <a href=\"https://tailscale.com/docs/reference/tailscale-release-stages#beta\">beta</a>, and is available in Tailscale v1.88 or later.</p>\n<p>Run the <a href=\"https://tailscale.com/docs/features/client/linux-systray\">system tray (<code>systray</code>) application</a> for Linux desktop clients to access some common actions like fast user switching and exit node selection.</p>\n<pre><code class=\"language-shell\">tailscale systray\n</code></pre>\n<p>Do not run <code>tailscale systray</code> as superuser (<code>sudo tailscale systray</code>), because systray is not designed to run as superuser and the command will fail.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#update\">update</a></h3>\n<p>The <code>update</code> command is available in Tailscale v1.36 or later for Windows and Ubuntu/Debian Linux, in v1.48.0 or later for the Mac Apple Store version and Synology, and in v1.54.0 or later for QNAP and the <a href=\"https://tailscale.com/docs/concepts/macos-variants#standalone-variant\">Standalone variant of the macOS application</a>. If you don't see this command and you are running one of these operating systems, consider <a href=\"https://tailscale.com/docs/features/client/update\">updating your Tailscale client</a>.</p>\n<p>Update the Tailscale client version to the latest version, or to a different version.</p>\n<pre><code class=\"language-shell\">tailscale update [flags]\n</code></pre>\n<p>Available flags:</p>\n<ul>\n<li><code>--dry-run</code> Show what update would do, without performing the update and without prompting to start the update.</li>\n<li><code>--track</code> The track to check for updates, either \"stable\", \"release-candidate\", or unstable. If not specified, the update uses the track currently in effect for the client. For more information, refer to <a href=\"https://tailscale.com/docs/reference/tailscale-client-versions#client-release-tracks\">Tailscale client versions and release tracks</a>.</li>\n<li><code>--version</code> An explicit version to use for the update or downgrade. You cannot specify both <code>--track</code> and <code>--version</code>. This flag is not available on the macOS client.</li>\n<li><code>--yes</code> Perform the update without interactive prompts. Defaults to false.</li>\n</ul>\n<p>If you downgrade to a version that does not have the <code>tailscale update</code> functionality, you won't be able to run <code>tailscale update</code> to return to the prior version. You would need to <a href=\"https://tailscale.com/docs/features/client/update\">perform an update</a> without using the Tailscale CLI.</p>\n<p>To determine the current version on a client, run <a href=\"https://tailscale.com/docs/reference/tailscale-cli#version\"><code>tailscale version</code></a>.</p>\n<p>Examples:</p>\n<p>Update to the latest version within your current track (stable or unstable, depending on what you're running):</p>\n<pre><code class=\"language-shell\">tailscale update\n</code></pre>\n<p>Update to the latest version within your current track without using interactive prompts:</p>\n<pre><code class=\"language-shell\">tailscale update --yes\n</code></pre>\n<p>Update to Tailscale v1.34:</p>\n<pre><code class=\"language-shell\">tailscale update --version=1.34.0\n</code></pre>\n<p>Update to the latest unstable version:</p>\n<pre><code class=\"language-shell\">tailscale update --track=unstable\n</code></pre>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#version\">version</a></h3>\n<p>Print the version of Tailscale.</p>\n<pre><code class=\"language-shell\">tailscale version [flags]\n</code></pre>\n<p>Available flags:</p>\n<ul>\n<li><code>--daemon</code> Also print local node's daemon version. Defaults to false.</li>\n<li><code>--json</code> Return a machine-readable JSON response.</li>\n<li><code>--upstream</code> Print the latest upstream release version from <code>pkgs.tailscale.com</code>. Defaults to false.</li>\n<li><code>--track</code>, <code>--track=[stable|unstable|release-candidate]</code> Check a specified track for updates. Empty value is the current track. For more information, refer to <a href=\"https://tailscale.com/docs/reference/tailscale-client-versions#client-release-tracks\">Tailscale client versions and release tracks</a>.</li>\n</ul>\n<p>Running <code>tailscale version</code> also prints other information, including the Go version. Here's an example of the output:</p>\n<pre><code class=\"language-shell\">tailscale version\r\n1.72.0\r\n  tailscale commit: 9a0f00ea8ed08d1a94b357fb232ac9d44a512664\r\n  other commit: 387e0b40ad87031fb4444372ee80a97156e8deb9\r\n  go version: go1.22.5\n</code></pre>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#wait\">wait</a></h3>\n<p>Wait for Tailscale resources to become available for binding within a specified timeout or indefinitely.</p>\n<p>The command returns exit code <code>0</code> on success. It returns a non-zero exit code on failure or timeout.</p>\n<p>As of Tailscale version 1.96, the only resource available to wait for is the Tailscale interface and its IPs. A future version of this command may support waiting for other types of resources.</p>\n<p>If running in userspace-networking mode, this command only waits for <code>tailscaled</code> and the <code>Running</code> state, as no physical network interface exists.</p>\n<pre><code class=\"language-shell\">tailscale wait [flags]\n</code></pre>\n<p>Available flags:</p>\n<ul>\n<li><code>--timeout=&#x3C;duration></code> Set a timeout duration in seconds. Setting the duration to <code>0</code> will set the timeout to indefinite.</li>\n</ul>\n<p>Examples:</p>\n<p>To wait on a specific type of IP address, use <code>tailscale ip</code> in combination with the <code>tailscale wait</code> command. For example, to wait for an IPv4 address:</p>\n<pre><code class=\"language-shell\">tailscale wait &#x26;&#x26; tailscale ip --assert=&#x3C;specific-ip-address>\n</code></pre>\n<p>Linux <code>systemd</code> users can wait for the <code>tailscale-online.target</code> target, which runs this command.</p>\n<p>A service that wants to bind to (listen on) a Tailscale interface or IP address, can use the following pattern to ensure Tailscale is ready before the program starts:</p>\n<pre><code class=\"language-shell\">tailscale wait &#x26;&#x26; /path/to/service [...]\n</code></pre>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#web\">web</a></h3>\n<p>Start a web server for controlling the <code>tailscaled</code> daemon. Starting a web server is useful when the CLI or a native app is impractical (such as on NAS devices).</p>\n<pre><code class=\"language-shell\">tailscale web [flags]\n</code></pre>\n<p>Available flags:</p>\n<ul>\n<li><code>--cgi=&#x3C;true|false></code> Run the web server as a CGI script. Defaults to false.</li>\n<li><code>--listen=&#x3C;ip|name></code> Set the listen address. Use port <code>0</code> for automatic. Defaults to <code>localhost:8088</code>.</li>\n<li><code>--origin=&#x3C;hostname></code> Origin at which the web UI is served (if behind a reverse proxy or used with CGI).</li>\n<li><code>--prefix=&#x3C;string></code> Set the URL prefix added to requests (for CGI or reverse proxies).</li>\n<li><code>--readonly</code> Run the web server in read-only mode.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#whois\">whois</a></h3>\n<p>Get the machine and user associated with a Tailscale IP.</p>\n<pre><code class=\"language-shell\">tailscale whois ip[:port]\n</code></pre>\n<p>For user devices, this command returns:</p>\n<pre><code class=\"language-markup\">Machine:\r\n  Name:\r\n  ID:\r\n  Addresses:\r\n  AllowedIPs:\r\nUser:\r\n  Name:\r\n  ID:\r\nCapabilities:\n</code></pre>\n<p>For devices that are tagged, this command returns:</p>\n<pre><code class=\"language-markup\">Machine:\r\n  Name:\r\n  ID:\r\n  Addresses:\r\n  AllowedIPs:\r\n  Tags:\r\nCapabilities:\n</code></pre>\n<p>For each of these fields:</p>\n<ul>\n<li><code>Machine</code>, <code>Name</code> is the <a href=\"https://tailscale.com/docs/concepts/machine-names\">machine name</a> of the device. If you use <a href=\"https://tailscale.com/docs/features/magicdns\">MagicDNS</a>, you can also use this name to connect.</li>\n<li><code>Machine</code>, <code>ID</code> is the <a href=\"https://tailscale.com/docs/reference/glossary#node\">node id</a> of the device.</li>\n<li><code>Machine</code>, <code>Addresses</code> are the <a href=\"https://tailscale.com/docs/concepts/tailscale-ip-addresses\">Tailscale IP</a>, which you can use to connect to the device.</li>\n<li><code>Machine</code>, <code>AllowedIPs</code> are the subnet routes available to the device.</li>\n<li><code>Machine</code>, <code>Tags</code> are the tags to which the device belongs.</li>\n<li><code>User</code>, <code>Name</code> is the email address for the owner of the device.</li>\n<li><code>User</code>, <code>ID</code> is the unique ID of the user</li>\n<li><code>Capabilities</code> show the grants for the device.</li>\n</ul>\n<p>Running <code>tailscale whois</code> with the <code>--json</code> flag will return a machine-readable JSON response. (Note that the <code>--json</code> option must come before the <code>ip[:port]</code> argument.)</p>\n<pre><code class=\"language-shell\">tailscale whois --json ip[:port]\n</code></pre>\n<p>Available flags:</p>\n<ul>\n<li><code>--json</code> Output in JSON format.</li>\n<li><code>--proto=&#x3C;proto></code> Protocol for the WhoIs request; one of <code>tcp</code> or <code>udp</code>; empty mans both.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/tailscale-cli#appc-routes\">appc-routes</a></h3>\n<p>Print the current <a href=\"https://tailscale.com/docs/features/app-connectors\">app connector</a> route status.</p>\n<p>By default this command prints the domains configured in the app connector\r\nconfiguration and how many routes have been learned for each domain.</p>\n<pre><code class=\"language-shell\">tailscale appc-routes [flags]\n</code></pre>\n<p>Available flags:</p>\n<ul>\n<li><code>--all</code> Print learned domains and routes and extra policy configured routes.</li>\n<li><code>--map</code> Print the map of learned domains.</li>\n<li><code>--n</code> Print the total number of routes this node advertises.</li>\n</ul>\n<p><img src=\"https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed\" alt=\"Project Logo\"></p>\n<p>Ask AI</p>\n<p>reCAPTCHA</p>\n<p>Recaptcha requires verification.</p>\n<p>protected by <strong>reCAPTCHA</strong></p>\n"}