This project provides a patched version of the official Tailscale CLI (tailscale and tailscaled) designed specifically to run inside Termux on Android 11 and above without requiring Root or /dev/net/tun.
Run this single command in Termux to download and install the latest package:
curl -fsSL https://raw.githubusercontent.com/bropines/tailscale-termux-cli/main/remote-install.sh | bashOnce installed, the tailscaled background service is automatically enabled and started. You can immediately connect:
tailscale up(or tailscale-cli up)
- Netmon Bypass (Android 11+): Intercepts interface discovery using an
ifconfigparser to bypass Android netlink restrictions. - Userspace Networking: Runs without Root or
/dev/net/tunout of the box. - Automatic Socket Resolution: Both
tailscaleandtailscale-cliautomatically route requests to~/.tailscale/tailscaled.sockwithout requiring manual--socketflags. - Auto-Start Daemon: Invoking
tailscaleortailscale-cliautomatically starts thetailscaleddaemon if it is not currently running. - Runit (
termux-services) Integration: Native background service management with auto-start on boot support.
You can use standard tailscale commands or the tailscale-cli wrapper interchangeably.
Tip
Subcommands like tailscale funnel, tailscale serve, tailscale status, and tailscale ping work natively out of the box!
- Connect / Log in:
tailscale up
- Check connection status:
tailscale status
- Expose a local service (Funnel / Serve):
tailscale funnel 8096
- Run functional test (SOCKS5 & DNS):
tailscale-test
The background daemon is managed via termux-services (runit) or helper commands:
- Check daemon status:
tailscaled-start --service=status
- Enable auto-start on boot & start daemon:
tailscaled-start --service=on
- Disable auto-start & stop daemon:
tailscaled-start --service=off
- View daemon logs:
tailscaled-log
Configure daemon settings by creating/editing ~/.tailscale/.env. Variables are automatically loaded on start:
| Variable | Tailscaled Flag | Description |
|---|---|---|
TS_SOCKS5_PORT |
--socks5-server |
Set a specific SOCKS5 port (e.g. 1055) |
TS_SOCKS5_SERVER |
--socks5-server |
Full address (e.g. 127.0.0.1:1055) |
TS_HTTP_PROXY |
--outbound-http-proxy-listen |
HTTP Proxy address |
TS_PORT |
--port |
UDP port for WireGuard |
TS_VERBOSE |
--verbose |
Log verbosity level (1, 2...) |
TS_EXTRA_ARGS |
(raw flags) | Additional raw flags to pass |
Example ~/.tailscale/.env:
TS_SOCKS5_PORT=1055
TS_VERBOSE=1
TS_EXTRA_ARGS="--hostname=termux-node"If you have Go installed in Termux, you can build from source:
./build.sh
./install.sh1. "failed to connect to local tailscaled process"
If the daemon was stopped manually, start it using:
tailscaled-startOr ensure termux-services is running:
sv up tailscaled2. Shell Autocompletions not working
Autocompletions for **Bash**, **Zsh**, and **Fish** are installed automatically. Restart your shell session or reload your shell profile to apply them.
- Core Logic: Tailscale Team.
- Patch Inspiration: asutorufa/tailscale.
Note: This project is not affiliated with Tailscale Inc.