Fix port sharing permissions reverting to private

GitHub issue #177 Feature Shipped josharianvia discord Mar 23, 2026 View Discord message View GitHub mirror

Author: josharian Channel: #feedback Link: https://discord.com/channels/1405685085923049482/1405686161791516873/1485636855750725764


Issue

Ports shared via ssh exe.dev share port are reverting to private status, requiring manual intervention to set them public again.

Context

User reported that when serving an application on a shared port and sending access to others, the port repeatedly gets blocked/reverts to private status. They had to repeatedly run:

ssh exe.dev share port [name] 7681
ssh exe.dev share set-public [name]

This appears to be a bug in the port sharing system where the public/private state is not being persisted correctly.

Status

Acknowledged by @josharian as a potential bug requiring investigation.

discord-bug

1 Comment

josharianvia github Mar 23, 2026

OK, my mistake for not understanding this better earlier.

We only allow one port to be marked public at a time.

What's going on is that when one port got marked public, the other became private. Marking that one public made the first one private again.

There are a variety of workarounds available:

  • do some user networking (tailscale / cloudflare tunnel, etc)
  • use host headers -- get two domain names, run nginx/caddy etc to route
  • use url subpaths
  • create a 2nd vm as a proxy for the first (another way to get two domain names), set up a tunnel (ssh, https with api key) between them
  • for RPCs (not browsers), mint an API token and use that: https://exe.dev/docs/https-api#authentication-to-vms