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

Built distribution (wheel)

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

Total release size: 159.3 kB

Release files / localghost-2.0.0.tar.gz

Download URL localghost-2.0.0.tar.gz
Size 68.1 kB
Tags Source
SHA-256 checksum
How to use checksums
baecb03dcc5a0fb56034ad215942984082097d1cca57f5f6c75ad8a004f981a0
BLAKE2b-256 checksum
How to use checksums
2d5e3ec2c7e11bff4834547d09103da3cf151947ca904d86bd48efb29c85eb54
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.0-py3-none-any.whl

Download URL localghost-2.0.0-py3-none-any.whl
Size 91.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93275becf4680ebba81c1365f88a0c59f44ea202a35a5b245ae65a04e75a4bd0
BLAKE2b-256 checksum
How to use checksums
c04267c405dc79178a9eee52d2bb77bc6ec9346b0b72b16b16001e85652c0de4
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

2.0.1

2 release files

This release

2.0.0 This release

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