Skip to content

Releases: SmileyChris/localghost

localghost v4.5.0

Choose a tag to compare

@SmileyChris SmileyChris released this 22 Oct 23:46

A tidier status screen and session list, with suggested commands that match how you run localghost.

  • Bare localghost shows your five most recent stopped projects instead of every remembered one, and lists running projects even when the hub is stopped.
  • sessions list colours projects by state, and --running / --stopped filter it.
  • sessions forget --missing forgets projects whose directory is gone. sessions clean is deprecated and hidden.
  • Suggested commands say uvx localghost … when you ran it with uvx, and plain localghost … 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 localghost

localghost v4.4.0

Choose a tag to compare

@SmileyChris SmileyChris released this 13 Oct 19:25

localghost 4.4.0 adds a personal settings file that sits beside the shared .localghost.toml.

  • .localghost.local.toml overrides .localghost.toml key by key: set your own port or name without touching the committed file. It also works on its own.
  • localghost save --local --port 8401 writes only what differs from the shared file, so later shared changes still reach you.
  • A local save adds the file to .gitignore when git would otherwise commit it, and leaves no .bak copy behind.
  • A plain save ignores the local file, so personal settings never leak into the shared one.

Upgrade:

uvx --refresh localghost

localghost v4.3.0

Choose a tag to compare

@SmileyChris SmileyChris released this 12 Oct 22:59

localghost 4.3.0 serves plain HTML folders, with pages that update as you edit.

  • A folder with an index.html is detected as the new html type when nothing else is: localghost run gives it a .localhost URL with no server to set up.
  • /inner/ serves inner/index.html, and /inner redirects 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 .env and .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 localghost

localghost v4.2.1

Choose a tag to compare

@SmileyChris SmileyChris released this 11 Oct 22:37

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-credential says where to revoke the OAuth credential in Tailscale.
  • Long URLs in setup output wrap instead of being cut off.

Upgrade:

uvx --refresh localghost

localghost v4.2.0

Choose a tag to compare

@SmileyChris SmileyChris released this 11 Oct 18:22

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 / unshare replace enable / disable, which still work as deprecated aliases. Unshare now keeps the OAuth credential so sharing again needs no setup; --forget-credential removes it.
  • Isolated host runs. localghost run --isolate (and save --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, trust and traefik are now reserved project names.

Upgrade:

uvx --refresh localghost

localghost v4.1.0

Choose a tag to compare

@SmileyChris SmileyChris released this 09 Oct 01:29

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, out or public is named after the folder above it, so cineshelf/web serves at cineshelf.localhost. This only happens inside a git repository, and never above its root or a folder holding .localghost.toml. --name and [run].name still 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 web and then run it again.
  • A clearer welcome page. http://localhost lists running projects first, then the rest by when they last started.
uvx --refresh localghost --version

localghost v4.0.1

Choose a tag to compare

@SmileyChris SmileyChris released this 08 Oct 21:33

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, restart and hub up now 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. sessions and status mark a remembered project whose directory no longer exists with (missing), and sessions list --json gains directory_exists. Nothing is forgotten automatically; sessions forget NAME drops a project.
uvx --refresh localghost --version

localghost v4.0.0

Choose a tag to compare

@SmileyChris SmileyChris released this 08 Oct 20:34

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 --version

The 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.toml and the rest of its setup. It comes back the way it last ran, in the foreground or detached; --foreground or --detach picks the other way, so restart NAME --foreground brings 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. restart can take over a project running in another terminal after you confirm, and sessions stop can end it.
  • Sessions by name. sessions logs and sessions stop take a project name; session IDs still work, and an exact ID wins.
  • One list of projects. localghost sessions lists every remembered project with whether it's running and how. status shows the same state.
  • Running state on the hub. http://localhost marks each project "Running in the foreground", "Running detached", or when it last started, using Traefik's own router list.
  • Worktrees can't collide. run refuses 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 --json returns a list of projects (the registry entry plus state and the newest session record, or null) instead of a list of session records. status --json's remembered list holds the same objects.
  • [run].framework in .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

Choose a tag to compare

@SmileyChris SmileyChris released this 29 Sep 20:29

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-Name and Tailscale-User-Profile-Pic headers 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.wrk on a machine named wrk), 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 plain enable follows it.
  • Clearer tailnet commands. tailscale disable explains a missing credential instead of showing a bare prompt, trust commands check for mkcert before doing any work, and tailscale status names 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 reports Stopped shop. rather than a failure, and warnings no longer print in framed boxes.

Upgrade with:

uvx --refresh localghost

See the changelog for the full list.

localghost v3.2.1

Choose a tag to compare

@SmileyChris SmileyChris released this 14 Sep 04:33

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 --version

Highlights

  • Requests from this machine arrive as 127.0.0.1. A new localghost-client Traefik 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 overwrites X-Forwarded-Proto/X-Forwarded-For with its own view of the internal hop, fixing frameworks that follow SECURE_PROXY_SSL_HEADER-style advice and saw every HTTPS request as plain HTTP.

The full list is in CHANGELOG.md.