🌐 Your pocket private network: reach your machines from anywhere
🌐 Français · English · العربية
SSH into your desktop PC, a Raspberry Pi or a home server from your phone, on 4G, without opening a single port on your router. It takes 5 minutes with WireGuard-based mesh private networks. Developers who discover it never go back.
1. The idea in one sentence
Every device (phone, PC, server) joins your encrypted private network and gets a fixed address. They talk directly, as if they were in the same room, wherever they are in the world.
2. The simplest way: Tailscale
Tailscale is built on WireGuard and has a free plan for personal use.
- Install Tailscale on the PC or server (Windows, macOS, Linux:
curl -fsSL https://tailscale.com/install.sh | shthensudo tailscale up). - Install the Tailscale app on the phone and sign in with the same account.
- Each machine gets a
100.x.y.zaddress and a name (the MagicDNS feature). - From Termux or your SSH app: ```bash ssh me@my-pc # the machine's MagicDNS name ```
That's it: no port forwarding, no public IP, and it works through most 4G and public Wi-Fi networks.
Pro tips:
- Tailscale SSH: let Tailscale handle SSH authentication with your accounts (
sudo tailscale up --sshon the server). - Exit node: route all the phone's traffic through your home connection when you're on sketchy public Wi-Fi.
- Open a web app running on your PC in the phone's browser (
http://my-pc:3000): handy to test a site in development on a real phone.
3. The 100% self-hosted way: WireGuard
If you don't want to depend on any service: install WireGuard on a server with a public IP (or your router if it supports it), generate one config per device, and import it into the WireGuard Android app by scanning a QR code:
qrencode -t ansiutf8 < phone.conf # shows the config as a QR code in the terminal
More work up front, but no middleman.
4. Show a local site to the world: tunnels
To show a project to a client without deploying it: Cloudflare Tunnel (cloudflared) and similar tools create a temporary public address to your machine. Remember to shut it down after the demo.
5. Termux, next level
Install the official add-ons from F-Droid:
- Termux:API: your scripts can access the phone:
termux-battery-status,termux-notification,termux-clipboard-set,termux-location… - Termux:Widget: run a script from a home screen widget. Example: a "Restart server" button: ```bash mkdir -p ~/.shortcuts echo 'ssh me@my-server "sudo systemctl restart my-app" && termux-notification -t "Server restarted"' > ~/.shortcuts/restart-server.sh chmod +x ~/.shortcuts/restart-server.sh ```
- Termux:Boot: run scripts when the phone starts.
6. Security
- Disable password authentication on your servers and use keys (see the developers guide).
- In the Tailscale admin console, remove a lost device immediately.
- A private network is only as safe as each device on it: screen lock on, system up to date.
🧪 My apps for developers
SSH, code management, APK tools: I build apps for working from Android. Test them before anyone else, with free Premium.