Skip to content

Play Together self-hosting: persist custom Hub URL and make invite page URL configurable #881

Closed

Description

@jolissipo

Context

I'm running the official PS5Upload Engine Web UI v12.6.13 in Docker, with a self-hosted signalling Hub and a guest invite page behind a reverse proxy. Internet guests have successfully joined and played from a mobile network without Tailscale using this setup.

Two configuration limitations currently require external workarounds.

1. Custom Hub URL is not persisted after an engine restart

Steps to reproduce

  1. Configure a custom Hub through the Play Together settings API, e.g. POST /api/join/settings with {"hub_url":"wss://play.example.com/ws"}.
  2. Confirm that GET /api/join?addr=<console-ip> reports the custom Hub.
  3. Restart or recreate the Engine Web UI container, keeping the persistent data volume.
  4. Query the settings again: hub_url has reverted to the default Hub URL.

This also matches the current implementation: join.rs stores only invites and port in play_together.json; it explicitly notes that other Play Together settings last one engine run. The hub_url setting exists, but isn't loaded from persistent storage.

Requested: persist the configured hub_url across engine/container restarts, just as the existing invite mode and port are persisted. The default should still be used when nothing custom is configured.

2. The public internet invite page URL is hard-coded

In join_net/mod.rs, the public Play Together guest page is defined as:

pub(crate) const PAGE: &str = "https://ps5upload.phantomptr.com/join/";

link_for() uses kind.page() when generating the internet invite. As a result, even when I use my own Hub and serve my own guest page, generated invites still start with the project's hosted URL.

Requested: make the public Play Together invite page URL configurable (for example, via a persisted setting and/or Docker environment variable, such as PS5UPLOAD_JOIN_PAGE_URL). Keep the existing official URL as the default for users who don't self-host.

For example, a self-hosted setup should be able to generate https://play.example.com/join/#room=... while retaining the existing fragment parameters (room, k, fp, hub, lan, ts) and their current behaviour.

Workaround and expected result

Currently I use an engine-restart hook to reapply the custom hub_url, and a local reverse-proxy response rewrite for generated invite links. Both work, but add unnecessary complexity and can break on updates.

Ideally a self-hosted operator could configure the Hub URL and public invite page once, restart/recreate the official Docker container, and still generate correct guest links without response rewriting or an external settings watchdog.

This is specifically about self-hosted WebRTC/Hub invite URLs, not opening the engine's management API to the public internet or replacing the existing default service. Related but distinct from #650 (direct public-address access).

Thanks for considering it!

Activity

  1. added a commit that references this issue on Nov 20, 2026
  2. phantomptr commented on Nov 20, 2026

    @phantomptr
    Owner

    Both are in 12.6.15 (a pre-release), plus a little more:

    • Kept across restarts: a custom hub address, the STUN servers and a new "Guest page address" are saved in play_together.json. For Docker you can set them once with PS5UPLOAD_HUB_URL and PS5UPLOAD_PAGE_BASE; a value saved in Settings wins over the environment, and Settings shows where each value comes from.
    • Configurable invite page: one base address (for example https://play.example.com/) gives the join, phone controller and share pages (join/, pad/, share/), with every fragment parameter unchanged.
    • New: a built-in hub in the engine (off by default). PS5UPLOAD_HUB_LISTEN turns it on and PS5UPLOAD_HUB_PUBLIC_URL=https://play.example.com sets both the hub and the page address in invites. It listens on its own port, which serves only the hub (/ws), the three guest pages (built into the engine, so they always match its version) and /health; the engine's own API is never reachable there. The engine connects to its own hub over loopback, and the hub allows your page's origin automatically. Optional STUN with PS5UPLOAD_HUB_STUN.
    • SELF_HOSTING.md has a compose example with Caddy that publishes only the hub port and keeps the engine API on your LAN.

    With that you shouldn't need the restart hook or the response rewrite any more. Friends also join faster over the internet in this version. Thanks for the clear request and for describing your setup. Please reopen if something doesn't fit how you run it.

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