localghost
Localghost gives local servers friendly .localhost URLs instead of port
numbers:
https://storefront.localhosthttps://admin.storefront.localhosthttps://blog.localhost
Just a single local hub routing all your development apps by hostname.
▒█████████████▒
███▒ ▒███░
▓██░ ░███ ██ ██
██▒ ▒██ ██░ ██░
▓█▒ ░██ ██░ ░█████░ ▒█████ █████▓ ██░
░██ ███▓ ████ ▓█▒ ██░░██ ██░▒█▓ ██░ ░█▓ ██░
██░ ███▓ ▓███ ░██ ██░░██░ ██░▒██ ██▒ ░█▓ ██░
██░ █ █ ██ ██░ ░█████░ ░█████ █████▓ ██░
██░ ▒███▒ ██░
██ ██░ ░▒▒ ░
██ ▓█████████▒ ░▒▒ ▒▒
██ ▓██▒▒▒▒▒▒▒▒██▒ ░▒▒▒▒▒▒ ░▒▒▒▒▒▒░ ▒▒▒▒▒░ ░▒▒▒▒░ ▒▒▒▒▒
░██░ ░██▓▒▒▒▒▒▒▒▒▒▒▒██ ░▒▒ ▒▒ ░▒▒ ░▒░ ▒▒░ ░▒░ ░▒░ ▒▒
▒████▓ ▒███▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ░▒▒ ▒▒ ░▒▒ ░▒▒ ▒▒░ ░▒░ ░▒░ ▒▒░
██▒▒▒▒▓▓█▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░ ▒▒▒▒▒▒ ░▒▒ ░▒▒ ░▒▒▒▒░ ░▒▒▒▒░ ░▒▒▒
░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ░▒ ░▒▒
░██▒▒▒▒███████▓▒▒▒▒███████▒▒▒▒▒██ ░▒▒▒
▒█████▓ ▒█████▓ ▒██████
This is local-development infrastructure, not a production proxy. It runs the
hub — a single, loopback-only Traefik container
— as the localghost Compose project on the localghost Docker network.
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, 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.
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
Start or reconcile only the shared hub with:
uvx localghost hub up
Open http://traefik.localhost for its dashboard,
inspect it with uvx localghost status, and remove it with
uvx localghost hub down.
Run it in the background with --detach and manage it afterwards:
uvx localghost run --detach
uvx localghost sessions
uvx localghost sessions logs NAME -f
uvx localghost restart NAME
uvx localghost sessions stop NAME
See Saving project setup for .localghost.toml, Compose
overrides, custom commands, explicit type selection, and safe updates.
To make the same project and secondary-service hostnames available inside a
Tailscale tailnet, see Tailnet hosting. It uses an opt-in
tagged gateway and split DNS; the ordinary .localhost routes stay local.
Documentation
The localghost documentation covers application integration, saving setup, host-native servers, HTTPS, operations, troubleshooting, security, architecture, and development.
For a local documentation preview, install the development dependencies and run
uv run zensical serve.
Metadata
Release files for localghost 4.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| localghost-4.2.1.tar.gz | 184.7 kB | Without provenance | Details for localghost-4.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| localghost-4.2.1-py3-none-any.whl | Python 3 | none | any | Details for localghost-4.2.1-py3-none-any.whl |
Total release size: 407.6 kB
Release files / localghost-4.2.1.tar.gz
| Download URL | localghost-4.2.1.tar.gz |
|---|---|
| Size | 184.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7113d4488157708be1bbf065bd38c10d838097e563a4cd65e03aaeab315b869
|
|
BLAKE2b-256 checksum How to use checksums |
f5a4d04e7ac7dd5f86c9c0cb2a79ed891d316aeaec5bee17391c2f03d0304ec9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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.2.1-py3-none-any.whl
| Download URL | localghost-4.2.1-py3-none-any.whl |
|---|---|
| Size | 222.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0716433a44b54206c658e7005237c8d02ddc5882d67c1e1385d5ded41e2aaa0
|
|
BLAKE2b-256 checksum How to use checksums |
1686663dae870e95e44b556a18087458c70c29bdbaf86d4a34a6d39982b07023
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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.2.1
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.