Skip to main content

Host a Website

ZeroTier enables private networking between devices, allowing you to host a website locally and serve it securely to peers on the same ZeroTier network.

Prerequisites

Step 1: Run a Local Web Server

Choose your platform and follow the steps to start a simple web server:

Python

This step requires Python. Some organizations rightfully restrict Python usage for security reasons. ZeroTier supports sharing any locally hosted server over a ZeroTier network, regardless of how it is being hosted (Python or not).

Open PowerShell in your website folder and start the built-in server (Python required):

python -m http.server 8080

Ensure Windows Firewall allows inbound traffic on port 8080. To check, you can use Powershell in administrator mode:

netstat -a -n -o | findstr :8080

If you see an address LISTENIING, a service is bound to it.

Step 2: Access the Website

On another device in your ZeroTier network:

  • Open a browser.
  • Navigate to:
    http://<ZeroTier IP of host>:8080

Next Steps

By default, Python searches for a file index.html in the directory you are running the website from to act as a homepage. To customize your site, create and modify this file. Find out more about Python HTTP Servers.

Other options for self-hosted HTTP sites include:

  • Apache HTTP (sudo apt install apache2)
  • Nginx (sudo apt install nginx)
  • Node.js-based servers

Just configure them to listen on your ZeroTier IP or all interfaces (0.0.0.0).