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

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. Start the hub without cloning this repository:

uvx localghost

Open http://traefik.localhost for the dashboard. The command creates or reconciles the hub and waits for it to become healthy. When it is already running, it lists active routes and their sources. To stop and remove it later, run:

uvx localghost down

To inspect its state without starting or reconciling it, run:

uvx localghost --status

Running local apps

localghost run detects Django, Vite, Astro, CakePHP, Laravel, plain PHP, and Docker Compose projects and serves them behind the hub with zero configuration:

cd my-project
uvx localghost run

The app is available at https://my-project.localhost (or http:// if HTTPS is not configured). Press Ctrl+C to stop it.

Run it in the background with --detach and manage it afterwards:

uvx localghost run --detach
uvx localghost manage list
uvx localghost manage stop SESSION_ID

Repeatable settings live in a .localghost.toml file; see Running host applications.

Documentation

The localghost documentation covers application integration, generation, 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 2.0.1

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 2.0.1
File Size Uploaded
localghost-2.0.1.tar.gz 68.2 kB Details

Built distribution (wheel)

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

Total release size: 159.4 kB

Release files / localghost-2.0.1.tar.gz

Download URL localghost-2.0.1.tar.gz
Size 68.2 kB
Tags Source
SHA-256 checksum
How to use checksums
60cb5c9511b21a6bd1a155b9df0cad64947349717ae87ef1005202d40a11f961
BLAKE2b-256 checksum
How to use checksums
19ce35916f45ff1c519a988582865276e89d238f056d7bb32d7e3a875ee52e3a
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-2.0.1-py3-none-any.whl

Download URL localghost-2.0.1-py3-none-any.whl
Size 91.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28da8081ecb024094adba83b1ddd4fd253b51c641a59e8f0c432505d67320e06
BLAKE2b-256 checksum
How to use checksums
3cbc3bddb576b2155f0b57cd6797c3d9605206aaeca79d05cabccd1e2245c67c
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 history Release notifications | RSS feed

3.3.0

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.1.0

2 release files

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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