🖥️ Ubuntu Laptop Home Server + Personal VPN (Tailscale Exit Node)
This guide walks you through converting a laptop with Ubuntu Linux installed into a reliable home server and a personal VPN using Tailscale.
You’ll configure the laptop to stay awake with the lid closed, then set it up as a secure VPN exit node accessible from anywhere.
🔧 Phase 1: Prepare the Hardware
Keep the Laptop Awake With the Lid Closed
Ubuntu suspends when the lid is closed — not ideal for a server.
Disable this behavior:
- Open your terminal.
- Edit the logind configuration file:
sudo nano /etc/systemd/logind.conf
- Find this line:
#HandleLidSwitch=suspend
- Remove the
#and change it to:
HandleLidSwitch=ignore
- Save and exit (
Ctrl+O, Enter,Ctrl+X). - Apply the changes:
sudo systemctl restart systemd-logind
Your laptop will now stay awake with the lid closed.
🌐 Turn the Laptop Into a Personal VPN Server
Using Tailscale, you can turn your laptop into a secure VPN server that routes your internet traffic through your home network.
This uses a feature called an Exit Node.
🚀 Step 1: Install Tailscale on Ubuntu
- Install Tailscale:
open TERMINAL:
curl -fsSL https://tailscale.com/install.sh | sh
- Start and authenticate:
sudo tailscale up
Follow the URL provided to log in with Google, Microsoft, or GitHub.
🔁 Step 2: Enable Exit Node Mode
1. Enable IP Forwarding
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
2. Advertise as an Exit Node
sudo tailscale up --advertise-exit-node
🛡️ Step 3: Approve the Exit Node in the Admin Console
- Open the Tailscale Admin Console: https://login.tailscale.com/admin/machines
- Find your Ubuntu laptop.
- Click the three dots (…) → Edit route settings.
- Enable Use as exit node.
- Save.
Your laptop is now a fully functional VPN server.
📱 Step 4: Connect From iOS or Android
iPhone / iPad (iOS)
- Install Tailscale from the App Store.
- Log in with the same account.
- Tap Exit Node.
- Select your Ubuntu laptop.
- Toggle the VPN switch to Active.
Android
- Install Tailscale from the Play Store.
- Log in and accept the VPN permission.
- Tap Exit Node.
- Select your laptop.
- Toggle the connection on.
Your mobile device now routes all traffic through your home server.
🔒 Why This Beats a Commercial VPN
- Privacy: You own the server — no third‑party logging.
- Local Access: Reach home files, printers, or cameras from anywhere.
- Zero‑Config: Tailscale handles NAT, dynamic IPs, and firewall rules automatically.
✔️ Summary
You now have:
- A laptop that stays awake with the lid closed
- A secure, self‑hosted VPN server
- Global access to your home network
- A privacy‑focused alternative to commercial VPNs
Top comments (0)