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
  • Usage
  • Reserve a subdomain
  • Reserve a custom domain
  • Check if you configured your DNS correctly
  • Create a Let's Encrypt certificate
  • Wildcard custom domain

Was this helpful?

  1. Reservations

Domain

PreviousUDPNextEndpoint

Last updated 2 years ago

Was this helpful?

You can reserve a domain name so that it will never be assigned to another user, even if your tunnel is offline; you can reserve a subdomain of the form sub.loclx.io or a totally custom domain like example.com.

Usage

Reserve a subdomain

loclx domain reserve --subdomain dev

This will reserve the domain dev.loclx.io if you want to reserve in another region you need to pass --region ap for example then the final domain will be dev.ap.loclx.io.

Note that we advice to only reserve first level subdomains like dev.loclx.io to avoid TLS issues.

For example reserving dev.app.loclx.io will have TLS warning when access it.

loclx.io TLS certificate includes only the following:

  • *.loclx.io

  • *.ap.loclx.io

  • *.eu.loclx.io

Reserve a custom domain

loclx domain reserve --domain example.com --region ap

The command above will reserve example.com and it will return a DNS record that you need to add in your domain DNS settings, check tutorial for more information.

One of the two flags --subdomain or --domain is required but not both.

Check if you configured your DNS correctly

loclx domain status --domain example.com

Create a Let's Encrypt certificate

Create a Let's Encrypt certificates for your reserved custom domain is simple with LocalXpose, you just need to run:

loclx domain letsencrypt --domain example.com

Please make sure of the following rules: 1. There is no a running tunnel using the domain which you want to issue a certificate for. 2. The port 54538 is free.

Creating Let's Encrypt certificate mostly needed only when you want to use TLS tunnel, HTTP tunnel will automatically generate the certificate for you and handle the renewal too.

Wildcard custom domain

You can reserve a wildcard custom domain by doing

loclx domain reserve --domain '*.example.com'
loclx tunnel http --reserved-domain '*.example.com` # or 'anything.example.com`

This command will check your DNS if configured correctly, it may take time to see your domain as verified due to time.

This will create a Let's Encrypt certificate and store it in your machine, then you can use the generated certificate in your tunnel.

Then you can start /s or tunnel in this reserved wildcard domain by running:

Read more about creating tunnel with wildcard domain.

THIS
DNS propagation
TLS
HTTP
TLS
here