LogoLogo
  • Getting Started
  • CLI
    • Docker
    • Config.yaml
  • GUI (SOON)
  • Tunnels Types
    • HTTP/s
      • HTTP/s plugins
      • HTTP/s apps
    • TLS
    • TCP
    • UDP
  • Reservations
    • Domain
    • Endpoint
  • Troubleshoot
    • Common errors
  • Tutorials
    • Expose a local web server
    • Expose Apache/Nginx web server
    • Share files from localhost
    • Use LocalXpose with Traefik
    • Expose PocketBase backend
    • Create a custom domain name
    • Make Let's Encrypt certificate
    • Access your IP camera remotely
    • Access your Raspberry Pi remotely
    • Sync your Keepass password manager
    • Expose localhost RASA chatbot for Telegram Integration
    • Expose your local Netdata Instance
    • Testing Stripe webhook
    • Expose localhost Kubernetes
    • Expose database server (PostgreSQL)
    • Exposing local Minecraft server
    • More Tutorials
Powered by GitBook
On this page
  • 1. Prepare the website
  • 2. Start a web server
  • 3. Start an HTTP tunnel

Was this helpful?

  1. Tutorials

Expose a local web server

This tutorial will explain how to expose a localhost web server and give it a shareable link that is accessible from the internet.

PreviousCommon errorsNextExpose Apache/Nginx web server

Last updated 2 years ago

Was this helpful?

1. Prepare the website

We have here a website as follows

2. Start a web server

We will serve the website by using any webserver (apache, nginx..etc), in our case we chose http-server(a simple, zero-configuration command-line http server).

Now we have website running on localhost at http://localhost:8081 .

3. Start an HTTP tunnel

loclx tunnel http --to 127.0.0.1:8081 --subdomain hello-world

After creating the tunnel and getting a shareable link to our website, we can access the website from that URL.

Website files
Starting a webserver
Our website accessible now from the internet