Skip to main content

localghost

Localghost gives local servers friendly .localhost URLs instead of port numbers:

  • https://storefront.localhost
  • https://admin.storefront.localhost
  • https://blog.localhost

One loopback-only Traefik hub routes every development app by hostname, so nothing needs its own port.

          ▒█████████████▒
        ███▒           ▒███░
      ▓██░               ░███           ██                          ██
     ██▒                   ▒██          ██░                         ██░
    ▓█▒                     ░██         ██░ ░█████░  ▒█████  █████▓ ██░
   ░██    ███▓       ████    ▓█▒        ██░░██   ██░▒█▓     ██░ ░█▓ ██░
   ██░    ███▓       ▓███    ░██        ██░░██░  ██░▒██     ██▒ ░█▓ ██░
   ██░         █   █          ██        ██░ ░█████░  ░█████  █████▓ ██░
   ██░         ▒███▒          ██░
   ██                         ██░            ░▒▒                       ░
   ██                 ▓█████████▒            ░▒▒                      ▒▒
   ██              ▓██▒▒▒▒▒▒▒▒██▒    ░▒▒▒▒▒▒ ░▒▒▒▒▒▒░  ▒▒▒▒▒░ ░▒▒▒▒░ ▒▒▒▒▒
  ░██░          ░██▓▒▒▒▒▒▒▒▒▒▒▒██   ░▒▒   ▒▒ ░▒▒  ░▒░ ▒▒░  ░▒░ ░▒░    ▒▒
  ▒████▓     ▒███▒▒▒▒▒▒▒▒▒▒▒▒▒▒██   ░▒▒   ▒▒ ░▒▒  ░▒▒ ▒▒░  ░▒░    ░▒░ ▒▒░
  ██▒▒▒▒▓▓█▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░    ▒▒▒▒▒▒ ░▒▒  ░▒▒  ░▒▒▒▒░ ░▒▒▒▒░  ░▒▒▒
 ░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██  ░▒   ░▒▒
 ░██▒▒▒▒███████▓▒▒▒▒███████▒▒▒▒▒██    ░▒▒▒
  ▒█████▓     ▒█████▓     ▒██████

Quick start

You need Docker Engine or Docker Desktop, Docker Compose 5.x+, uv, and port 80 available. From an application directory, run:

uvx localghost run

Localghost detects Django, Vite, Astro, CakePHP, Laravel, plain PHP, static HTML, and Docker Compose projects, starts the shared hub when needed, and keeps the local URL visible while the application runs. Press Ctrl+C to stop the application, or Ctrl+Z to detach and leave it running.

An unconfigured Compose project asks you to save its routing setup first:

uvx localghost save --run

Save a custom command the same way:

uvx localghost save --port 8080 --run -- ./server --port 8080

Use save when you want to persist setup without starting anything:

uvx localghost save

Hub and background runs

The hub starts on demand, but you can manage it directly:

uvx localghost hub up      # start or reconcile the hub
uvx localghost status      # inspect hub state and routes
uvx localghost hub down    # remove it

Its dashboard is at http://traefik.localhost.

Add --detach to run to keep an application going in the background, then use sessions, sessions logs NAME -f, sessions attach NAME, restart NAME, and sessions stop NAME to manage it.

Documentation

Start at the documentation home, or jump straight in:

Preview the docs locally with uv run zensical serve after installing the development dependencies.

Metadata

Release files for localghost 4.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for localghost 4.6.0
File Size Uploaded Provenance Actions
localghost-4.6.0.tar.gz 206.6 kB Without provenance Details for localghost-4.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for localghost 4.6.0
File Interpreter ABI Platform Actions
localghost-4.6.0-py3-none-any.whl Python 3 none any Details for localghost-4.6.0-py3-none-any.whl

Total release size: 450.0 kB

Release files / localghost-4.6.0.tar.gz

Download URL localghost-4.6.0.tar.gz
Size 206.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b3a26b2bcac2e6071dca8ad2ca7012873f375516f82e414273d580d8fc284091
BLAKE2b-256 checksum
How to use checksums
cc35f012a23984c3a434af11c83bc09d52df013be987b62a80fd1d766897186d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / localghost-4.6.0-py3-none-any.whl

Download URL localghost-4.6.0-py3-none-any.whl
Size 243.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee690d2abb75b8999a211a49627f5ca527ae364e14554af648eb3bfe22802eaf
BLAKE2b-256 checksum
How to use checksums
8076c03fffc73f0bb023d514fcf7116d3d294817a4aba1b8a1b7ae2e6180d2ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for localghost 4.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page