Skip to content

Put Your Localhost on the Internet

Running something on 127.0.0.1 that you want other people to access? This guide will give your local machine a real public IP address so anything running locally is reachable from the internet.

Before: only you can access 127.0.0.1:4321
After: anyone can access 134.49.x.x:4321 (your dedicated public IP)

No cloud deployment, no Nginx, no Docker, no DNS — just a public IP pointed at your machine.


  • A computer running your app (Linux, macOS, or Windows)
  • About 5 minutes
  • A Get Real IP account (sign up here)

  1. Go to account.getrealip.net and create an account
  2. Start your free trial (7 days free, cancel anytime)
  3. Download your WireGuard config file (.conf file)

Your config contains everything needed to connect — no manual setup required.


macOS: Install WireGuard from the Mac App Store.

Windows: Download WireGuard for Windows.

Linux (Ubuntu/Debian):

Terminal window
sudo apt install wireguard

Linux (Fedora):

Terminal window
sudo dnf install wireguard-tools

macOS / Windows:

  1. Open the WireGuard app
  2. Click “Import Tunnel(s) from File” (or drag the .conf file in)
  3. Click “Activate”

Linux:

Terminal window
sudo cp ~/Downloads/getrealip.conf /etc/wireguard/wg0.conf
sudo wg-quick up wg0

That’s it. Your machine now has a public IP.


Whatever you’re running locally is now accessible at your public IP on the same port:

You see locally The world sees
127.0.0.1:3000 134.49.x.x:3000
127.0.0.1:4321 134.49.x.x:4321
127.0.0.1:8080 134.49.x.x:8080
127.0.0.1:11434 134.49.x.x:11434

Your public IP is shown in your dashboard. Share it with anyone — they can access your app directly.


Sharing a dev server (Vite, Next.js, Astro, Flask):

Most dev servers bind to localhost by default. You may need to tell them to listen on all interfaces:

Terminal window
# Vite / Astro
npm run dev -- --host 0.0.0.0
# Next.js
next dev -H 0.0.0.0
# Flask
flask run --host=0.0.0.0
# Python http.server
python3 -m http.server 8000 --bind 0.0.0.0

Then it’s accessible at 134.49.x.x:<port>.


If your app only listens on 127.0.0.1 (localhost), it will reject connections from the tunnel even though you have a public IP. You need to tell it to listen on 0.0.0.0 (all interfaces) so it accepts connections arriving via the WireGuard tunnel.

Most frameworks have a --host 0.0.0.0 flag. Check your framework’s docs if the ones above don’t apply.


Once connected, your public IP is reachable by anyone on the internet — not just the people you share it with. Make sure you’re comfortable with whatever is running being publicly accessible, or add authentication to your app.

If you only want specific ports exposed, use your OS firewall to block everything else:

Linux (ufw):

Terminal window
sudo ufw allow 4321/tcp
sudo ufw enable

macOS: System Settings → Network → Firewall


Your local project now has a real public IP. Share 134.49.x.x:<port> with anyone and they can access it directly — no deploy, no cloud, no configuration beyond what you just did.

When you’re done sharing, just deactivate the tunnel in the WireGuard app (or sudo wg-quick down wg0 on Linux).