Skip to content

Two PCs install as two phone apps both named "herdr"; the name needs a setting #476

Closed

Description

@sma505

Problem

I run herdr web ui on two PCs and installed the app from each of them on my Android phone. Each PC is
its own origin (https://<pc>.<tailnet>.ts.net), so they install as two apps — but both are called
"herdr" and have the same icon, so the home screen gives no hint which one opens which PC.

Android has no way to rename an installed web app: Chrome takes the label from the manifest's
short_name, and public/manifest.webmanifest hard-codes "herdr".

Proposal

An optional setting, for example HERDR_WEB_APP_NAME, read like the other settings (the plugin's
env/.env in herdr plugin config-dir devswha.herdr-web-ui, or the environment for a source
install). When it is set:

  • the server answers /manifest.webmanifest with name and short_name replaced by it, and
  • index.html with apple-mobile-web-app-title replaced, so an iOS home-screen install matches.

Unset, nothing changes, so existing installs keep "herdr".

The pieces are already in place: server/static.ts serves the manifest with no-cache
(REVALIDATED_PATHS) and sw.js deliberately leaves it to the network. Chrome treats name and
short_name as updatable fields, so an app that is already installed should pick the new name up on
Chrome's next manifest check, without a reinstall. A row in INSTALL.md's Configuration table would
document it.

An automatic default is possible too: the server already knows the PC's name (hostname() for the
local machine in server/machines.ts), so the app could
call itself e.g. herdr · <pc>. But that would rename every existing install after an update, so I
would leave it opt-in — your call.

Happy to send a PR for the setting if the approach suits you.

Where

Phone, installed app and alerts

Workarounds and alternatives

  • Editing public/manifest.webmanifest blocks the in-app updater ("The source checkout has local
    changes").
  • Remote PCs: one app could show both PCs, but then the PC that serves the app has to be awake,
    and one of mine sleeps most of the time while the other is a laptop.

Activity

  1. devswha commented on Oct 9, 2026

    @devswha
    Owner

    Checked against v0.4.2 (b82584d): still as described. public/manifest.webmanifest:3-4 hard-codes name "herdr web ui" and short_name "herdr", index.html:32 hard-codes apple-mobile-web-app-title, and the manifest already revalidates on every load (server/static.ts:31, public/sw.js:4-6), so a served name would reach installed apps without a reinstall. The manifest's id is / per origin, so renaming does not change which app is which.

    No PR is open for this yet. The choice that is still open is the owner's:

    1. Opt-in setting, as proposed: HERDR_WEB_APP_NAME read like the other settings; the server answers /manifest.webmanifest and the index.html title meta with it. Unset changes nothing. Smallest change; a phone user has to edit the PC's .env once.
    2. Automatic default: herdr · <PC name> from the name the server already knows. No setup, but every existing install is renamed after an update.
    3. A field in Settings → Phone saved in the server's state dir instead of .env. Reachable from the phone itself, but it is a new mutating endpoint (same-origin plus the x-herdr-machine header, a contract test and a demo transport answer).

    Any of the three is a server change, so a remote PC would need a new remote bundle to serve its own name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions