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 list
uvx localghost sessions logs SESSION_ID -f
uvx localghost sessions stop SESSION_ID
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 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| localghost-3.1.0.tar.gz | 145.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| localghost-3.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 321.7 kB
Release files / localghost-3.1.0.tar.gz
| Download URL | localghost-3.1.0.tar.gz |
|---|---|
| Size | 145.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b04c19e21aeccdf6b61ee39e985b6e3dcd99b9150358c63330c622a9d071efef
|
|
BLAKE2b-256 checksum How to use checksums |
ea37586d15a9a3ed6242a9312e8219f03fad66e16c8f9842fe0eee7bfb223c58
|
| 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-3.1.0-py3-none-any.whl
| Download URL | localghost-3.1.0-py3-none-any.whl |
|---|---|
| Size | 176.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf0086095c43fd85623e31dbdc372d236796b379698107ec63ab266e663dba73
|
|
BLAKE2b-256 checksum How to use checksums |
22af3a73abcd40279fd78ffa9431a117bfb939a111ab04030bed9bcbb0d8b920
|
| 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}
|