Documentation

Publications

Make a service running on 127.0.0.1 reachable from one profile's tailnet — and from nothing else. The inverse of a tunnel, applied live, with your tailnet's ACLs as the access control.

View as Markdown

What a publication is#

A publication takes a service you already run on this machine — a dev server on 127.0.0.1:8080, a preview build, an internal dashboard — and makes it reachable from exactly one profile's tailnet. Teammates on that tailnet open it through the profile's node; nobody on your other tailnets, your local network, or the public internet can.

It is the mirror image of a tunnel. A tunnel is outbound: a loopback port on your machine relayed into one tailnet. A publication is inbound: a port on one profile's tailnet node relayed back to a loopback target.

Data path
1peer on the work tailnet2        │3        ▼4work profile's node, tailnet port 4435        │   TailMux relays — one profile, no fallback6        ▼7127.0.0.1:8080   (your own service)

The tailnet-side listener lives inside the profile's embedded node. TailMux opens no new port on your network interfaces; the only OS socket involved is TailMux's own connection to your loopback service.

Publishing a service#

In the app, open Publications (the macOS menu bar app: Open → Publications; the Fedora app: Publications in the sidebar) and click Add Publication:

Publication
1Name:           preview2Profile:        work3Local service:  127.0.0.1:80804Tailnet port:   4435Serve over HTTPS: on

Once it is listening, the row shows the address your tailnet uses — copy it with one click and share it. You never assemble it yourself:

Address
1https://tailmux-work.example-tailnet.ts.net

The same publication from the CLI. Every publish subcommand talks to the running TailMux service:

zsh — publish a dev server on the work tailnet
$tailmux publish add preview --profile work --target 127.0.0.1:8080 --port 443 --tls$tailmux publish list

publish list prints one line per publication: name, profile, state (stopped, starting, listening, error, or blocked), who can reach it (see Making it reachable), the tailnet address, the local target, and the reason when something is wrong. Add -o json for scripts.

  • --profile — the one profile whose tailnet serves the publication.
  • --target — the local service, which must be a loopback host:port such as 127.0.0.1:8080.
  • --port — the port on the tailnet side. Required: TailMux never picks one for you, because it is part of the address you share.
  • --tls — serve over HTTPS with the tailnet's certificate (see below). Off by default.
  • --reach — tailnet, the default and the only reach this version serves.

HTTPS#

With Serve over HTTPS (--tls, tls: true), TailMux terminates TLS on the tailnet side using the MagicDNS certificate Tailscale issues for the profile's node, and relays the decrypted connection to your loopback target — so the local service itself speaks plain HTTP. On port 443 the address is a clean https:// URL with no port.

HTTPS must be enabled on the tailnet. If HTTPS certificates are not turned on for that tailnet, an HTTPS publication fails to start and shows the tailnet's own error. It never falls back to plain TCP — a silent downgrade would change what you think you exposed. Enable HTTPS in the tailnet's admin settings, then start the publication again.

Without HTTPS the publication is a raw TCP relay and its address reads tcp://<host>:<port>. Use that for anything that is not HTTP, or for a service that already does its own TLS.

Who can reach it#

A publication is reachable by the devices of one tailnet, subject to that tailnet's ACLs — and by nothing else.

TailMux adds no authentication in front of a published service. Your tailnet's ACLs are the access control. If the ACLs let every device reach the profile's node, every device on that tailnet can open the service — assume a local dev server has no login of its own, and restrict the node in your ACLs if that matters.
  • A publication belongs to exactly one profile and is served only by that profile's node. Another profile's tailnet has no listener on that port, so it can never reach it.
  • The target must be loopback. TailMux will not publish a host on your local network — it is not a LAN-to-tailnet gateway.
  • The target cannot be one of TailMux's own listeners — a tunnel, a proxy, the PAC server, or the control API. Publishing one would let one tailnet relay into another.
  • Nothing is published unless you add it.

Making it reachable#

A publication can be listening and still reachable by nobody. Your tailnet's access policy decides which devices may connect to the profile's node, and TailMux cannot change or get around it. While a publication is listening, TailMux reads that policy from the node and tells you what it allows:

  • Reachable — the app shows "reachable from 3 devices" (or "from every device in the tailnet"); publish list shows reachable (3) or everyone in the REACH column.
  • Unreachable — no device is allowed to connect. The app's badge reads Unreachable; publish list shows unreachable.
  • Unknown — TailMux could not tell, for example because the policy admits devices by capability rather than by address, and says why. It never reports a publication as unreachable on a guess.
  • - in REACH — the publication is not listening, so there is nothing to check.

On a tailnet with the default policy, which lets every device reach every other, there is nothing to do: every device in that tailnet can reach your publications.

On a tailnet with a restricted policy, the profile's node is a new device that no rule mentions, so its publications start out unreachable. To fix it:

  1. Click Make reachable… on the publication in the app, or run tailmux publish policy preview.
  2. Add the two entries it shows to the tailnet policy file — one inside "hosts", one inside "grants". Open Access Controls takes you to the policy editor on tailscale.com. Not an admin? Send the lines to your tailnet admin.
  3. Once the policy is saved, the badge turns back to Published within half a minute.
Tailnet policy — added once per computer and profile
1"hosts": {2  // TailMux publications: profile work on laptop3  "tailmux-work": "100.64.0.10",4},5 6"grants": [7  // TailMux publications: profile work on laptop.8  // Only TailMux publications listen on this node, so "*" opens nothing else.9  {10    "src": ["you@example.com"],11    "dst": ["tailmux-work"],12    "ip":  ["*"],13  },14],

You do this once per computer and profile. The entries cover every publication on that profile, on any port, including ones you add later — there are no per-port rules to maintain.

What the entries open, and to whom:

  • "ip": ["*"] opens only your publications. The profile's node listens on nothing else: no SSH, no other ports on your computer, none of TailMux's own local listeners. Turning a publication off closes its port.
  • "src" decides who can connect. TailMux suggests your own login, which admits only your own devices. Widen it — to a group, for example — only if you mean to share with those people.
Remove the entry when you remove the computer or the profile. The entry points at the node's tailnet address. If the node is removed from your tailnet or re-created (for example after deleting the profile's state), it gets a new address and TailMux shows new lines for it. Delete the old entry rather than leaving an unused address in your policy.

For a profile on a custom control server, TailMux shows the same two entries but cannot link to its admin console: edit the policy where that server keeps it.

Managing publications#

zsh — start, stop, remove
$tailmux publish stop preview     # close its tailnet listener$tailmux publish start preview    # open it again$tailmux publish stop --all       # take every publication off its tailnet$tailmux publish rm preview       # delete it from the configuration
  • Publications apply live — adding, editing, starting, stopping, or removing one needs no router restart, unlike routing changes.
  • Enabled publications start automatically when the service runs. A stopped publication stays stopped across restarts until you start it again.
  • publish stop --all is the panic button: it stops every publication in one command. stop works even without a valid licence, so you can always take a service down.
  • publish add only creates. To replace a publication from the CLI, remove it with publish rm and add it again; in the app, use Edit publication.
  • A publication in error shows the reason on its row; fix the cause (for example, enable HTTPS on the tailnet), then restart it from its row in the app or run publish start.

Configuration#

Publications live in the same config file as everything else, under publications:. The app and the CLI write this block for you; you can also edit it by hand.

tailmux.yaml — publications
1publications:2  preview:3    display_name: "Preview build"   # optional; defaults to the key4    profile: work                   # a tsnet profile5    target: 127.0.0.1:8080          # must be loopback6    port: 443                       # tailnet-side port, required7    tls: true                       # HTTPS with the tailnet's MagicDNS certificate8    reach: tailnet                  # default9    disabled: false                 # true = stopped

The tailnet port must be unique per profile: two publications cannot share a port on the same profile, but a work and a personal publication can both use 443.

Requirements#

  • The profile must use the tsnet backend. Publications are served by the embedded node; a profile on the tailscaled backend is rejected with an error that names the fix. Switching a profile to backend: tsnet means authenticating that profile again, because the two backends do not share state — see backends.
  • The TailMux service must be running. A publication needs the live, signed-in profile that only the service owns, so tailmux publish fails with a clear message when no service is running. The menu bar and Fedora apps run it for you.
  • A valid licence. Adding, starting, listing, and removing publications need one, like tunnels; stopping does not.
  • HTTPS enabled on the tailnet — only for publications with tls: true.

Notes#

  • Tailnet only. reach: funnel is accepted in the config file but this version never serves it: such a publication is reported as blocked and stays off the public internet. There is no public-internet path in this version.
  • Publications are TCP. They do not advertise subnet routes, turn TailMux into an exit node, or publish Tailscale Services.
  • TailMux publishes a service that is already running; it does not start or supervise your application.
  • To reach a service on a tailnet from this machine — the opposite direction — use a tunnel.