Skip to main content

When you need port forwarding

If your app says something like:
…it means the web interface is only accessible inside the Compute instance. You’ll need to forward the port to use it in your local browser. This is common with:
  • Fooocus
  • Stable Diffusion UIs
  • Jupyter Notebook
  • Gradio / Streamlit apps

Step 1 – Set up local port forwarding

In your Windows Terminal, run:
Replace:
  • 7865 with the actual port your app uses
  • <your-instance-id> with your Compute instance ID
Now open http://localhost:7865 in your browser. Tip: Keep the terminal open! If the SSH session closes, the connection breaks.

Step 2 – Get your port and IP details

If you’re not sure which port your app uses: Run this from inside your instance:
Then test your app inside the VM:
If that works, you can forward the port.

Step 3 – Trying the public Hivenet URL

You can try visiting:
Replace <location> with the region shown for your instance.
This is a public-facing URL Hivenet creates automatically for instances. However, it only works if:
  • Your app listens on port 8888
  • It’s bound to 0.0.0.0 (not just localhost)
  • It’s currently running
If it doesn’t work or shows “Bad Gateway,” fall back to SSH port forwarding.

Bonus: Forward multiple ports

You can add more -L flags to forward several ports at once:
Great for debugging or running multiple services.