Repository navigation
Releases: SmileyChris/localghost
Release list
localghost v4.5.0
A tidier status screen and session list, with suggested commands that match how you run localghost.
- Bare
localghostshows your five most recent stopped projects instead of every remembered one, and lists running projects even when the hub is stopped. sessions listcolours projects by state, and--running/--stoppedfilter it.sessions forget --missingforgets projects whose directory is gone.sessions cleanis deprecated and hidden.- Suggested commands say
uvx localghost …when you ran it with uvx, and plainlocalghost …when it is installed. Mistyped project names get close-match suggestions. - Fingerprints and paths no longer wrap mid-value, so they copy cleanly.
- Fixed: an offline tailnet project is no longer served with Traefik's default certificate.
Scripts that parse the plain-text status output should switch to status --json.
uvx --refresh localghostlocalghost v4.4.0
localghost 4.4.0 adds a personal settings file that sits beside the shared .localghost.toml.
.localghost.local.tomloverrides.localghost.tomlkey by key: set your own port or name without touching the committed file. It also works on its own.localghost save --local --port 8401writes only what differs from the shared file, so later shared changes still reach you.- A local save adds the file to
.gitignorewhen git would otherwise commit it, and leaves no.bakcopy behind. - A plain
saveignores the local file, so personal settings never leak into the shared one.
Upgrade:
uvx --refresh localghostlocalghost v4.3.0
localghost 4.3.0 serves plain HTML folders, with pages that update as you edit.
- A folder with an
index.htmlis detected as the newhtmltype when nothing else is:localghost rungives it a.localhostURL with no server to set up. /inner/servesinner/index.html, and/innerredirects there.- Open pages update when a file they use changes: edited stylesheets swap in place, keeping scroll, form input and script state; other changes reload the page.
- Dotfiles and dot-directories such as
.envand.git/are never served, and the server stays on loopback whenever localghost can relay it. - In a folder inside another project, pass
--type html, or--project-root .to stop the search at the current directory.
Upgrade:
uvx --refresh localghostlocalghost v4.2.1
localghost 4.2.1 tidies the Tailscale sharing setup to match the current admin console.
- Console links go to
console.tailscale.com, with OAuth credentials on the Trust credentials page; unshare and split-DNS conflicts link the Machines and DNS pages. - Share skips the policy-file step when a tailnet device already carries the tag.
- Setup names scopes and fields as the console does: DNS: Write, Auth Keys: Write, Client ID.
unshare --forget-credentialsays where to revoke the OAuth credential in Tailscale.- Long URLs in setup output wrap instead of being cut off.
Upgrade:
uvx --refresh localghostlocalghost v4.2.0
localghost 4.2.0 makes sharing a hub over Tailscale simpler to set up and to trust, and lets host runs isolate themselves from busy ports.
- Trust a tailnet hub without a fingerprint.
uvx localghost tailscale trust <suffix>finds the hub through your Tailscale client's network map, so the tailnet vouches for the root instead of DNS. - A hub page on the tailnet.
http://localghost.<suffix>lists the hub's running projects and how to trust it.trust.<suffix>is deprecated and redirects there. tailscale share/unsharereplaceenable/disable, which still work as deprecated aliases. Unshare now keeps the OAuth credential so sharing again needs no setup;--forget-credentialremoves it.- Isolated host runs.
localghost run --isolate(andsave --isolate) runs the app in its own network namespace behind an ephemeral port, so it never collides with another checkout. - Custom commands using
{port}walk past a busy port, and detached runs relay loopback-bound apps on Linux. localghost,trustandtraefikare now reserved project names.
Upgrade:
uvx --refresh localghostlocalghost v4.1.0
Localghost 4.1 gives projects in folders like web or frontend the name of the repository they belong to, and tidies the hub's welcome page.
- Better names for generic folders. A host project in a folder named
web,www,site,app,frontend,client,ui,backend,server,api,apps,packages,src,dist,build,outorpublicis named after the folder above it, socineshelf/webserves atcineshelf.localhost. This only happens inside a git repository, and never above its root or a folder holding.localghost.toml.--nameand[run].namestill win, and Compose projects keep Compose's own naming. - Existing projects keep their names. A project localghost already remembers under its folder name keeps it. To move one over, run
localghost sessions forget weband then run it again. - A clearer welcome page.
http://localhostlists running projects first, then the rest by when they last started.
uvx --refresh localghost --versionlocalghost v4.0.1
Localghost 4.0.1 stops the hub routing to detached apps that have already stopped.
- No more stale routes. A detached app that crashed or exited, or every one after a reboot, left its bridge running, so its hostname answered 502 and the welcome page showed it as running.
sessions,status,run,restartandhub upnow remove those routes, all at once, and say so: "Removing route for NAME, which stopped outside localghost…". The session record and its log are kept. - Missing directories are flagged.
sessionsandstatusmark a remembered project whose directory no longer exists with(missing), andsessions list --jsongainsdirectory_exists. Nothing is forgotten automatically;sessions forget NAMEdrops a project.
uvx --refresh localghost --versionlocalghost v4.0.0
Localghost 4.0 brings a project back with one command: localghost restart NAME stops it if it's running and starts it again the way it last ran. localghost sessions becomes the one view of your projects, showing which are running and whether in the foreground or detached, and the hub's welcome page shows the same.
Upgrade
uvx --refresh localghost --versionThe hub image is rebuilt on the first localghost run or hub up, which brings in the new welcome and offline pages. Existing registry entries and session records keep working; a project last started before the upgrade shows as running in the foreground until its next run records how it was started. Check the two breaking changes below if you script against sessions list --json or still use [run].framework.
Highlights
localghost restart [NAME]stops a running project and starts it again from its remembered directory, re-reading.localghost.tomland the rest of its setup. It comes back the way it last ran, in the foreground or detached;--foregroundor--detachpicks the other way, sorestart NAME --foregroundbrings a background app into your terminal. With no name it restarts the project you're standing in.- Taking over a foreground run. Foreground runs are now recorded as sessions while they run.
restartcan take over a project running in another terminal after you confirm, andsessions stopcan end it. - Sessions by name.
sessions logsandsessions stoptake a project name; session IDs still work, and an exact ID wins. - One list of projects.
localghost sessionslists every remembered project with whether it's running and how.statusshows the same state. - Running state on the hub.
http://localhostmarks each project "Running in the foreground", "Running detached", or when it last started, using Traefik's own router list. - Worktrees can't collide.
runrefuses to start a project whose name is already served from another directory, such as a second worktree of the same repository, and suggests--name. Starting a project clears its stopped session records.
Breaking changes
sessions list --jsonreturns a list of projects (the registry entry plusstateand the newestsessionrecord, ornull) instead of a list of session records.status --json'srememberedlist holds the same objects.[run].frameworkin.localghost.toml, deprecated since 2.0, is rejected with the fix: rename it to[run].type.
Command changes
| Before | Now |
|---|---|
localghost summon NAME |
localghost restart NAME |
localghost forget NAME |
localghost sessions forget NAME |
sessions logs SESSION_ID |
sessions logs NAME (IDs still work) |
sessions stop SESSION_ID |
sessions stop NAME (IDs still work) |
summon and the top-level forget still work as hidden commands and print a deprecation notice. sessions forget also removes the project's stopped session records and refuses a project that's still running. Compose labels, the localghost network and project name, and hostname conventions are unchanged.
The full list is in CHANGELOG.md.
localghost v3.3.0
Tailnet hosting now tells applications who is visiting, follows the machine it runs on, and can move to another suffix without re-enrolling.
- Tailnet identity. Applications receive the
Tailscale-User-Login,Tailscale-User-NameandTailscale-User-Profile-Picheaders Tailscale Serve would set, so a shared development app can recognize a teammate without its own sign-in. See Tailnet identity. - Named after the machine. A new enable calls the gateway
localghost-<machine>after this machine's tailnet name, and defaults the suffix to that short name (shop.wrkon a machine namedwrk), so each hosting machine gets its own suffix. Existing gateways keep their names. - Switch suffix in place.
localghost tailscale enable --suffix <new>moves a running hub's routes to another suffix on the same gateway device: no new auth key and no offline device left behind. After renaming the machine in the admin console, a plainenablefollows it. - Clearer tailnet commands.
tailscale disableexplains a missing credential instead of showing a bare prompt, trust commands check formkcertbefore doing any work, andtailscale statusnames the sites to trust (Trust https://*.wrk on other machines). - Tidier run output. The run summary is headed by the app (
Running shop (django)), Ctrl+C reportsStopped shop.rather than a failure, and warnings no longer print in framed boxes.
Upgrade with:
uvx --refresh localghostSee the changelog for the full list.
localghost v3.2.1
Localghost 3.2.1 makes applications see who really connected, instead of a Docker-internal address, and stops a host run's bridge from lying about the request scheme.
Upgrade
uvx --refresh localghost --versionHighlights
- Requests from this machine arrive as
127.0.0.1. A newlocalghost-clientTraefik middleware renames the Docker gateway address every published-port connection arrived from, instead of leaving applications to see that instead of the real client. - Tailnet requests carry the requesting device's own tailnet address, not the gateway container's — the gateway now forwards it on plain HTTP and names it in a PROXY protocol header on the HTTPS passthrough.
- Host runs report HTTPS correctly.
localghost run's bridge no longer overwritesX-Forwarded-Proto/X-Forwarded-Forwith its own view of the internal hop, fixing frameworks that followSECURE_PROXY_SSL_HEADER-style advice and saw every HTTPS request as plain HTTP.
The full list is in CHANGELOG.md.