简体中文RSS

Deploy the user portal

The user portal (freenet-user-portal) is the consumer-facing layer for a FreeNet deployment. Users register with an e-mail, get a WireGuard account provisioned automatically on your panel, and self-serve config downloads, QR codes, usage, and expiry from a web console.

The portal is fully independent of the panel: it talks to the panel only through the admin API (an HMAC API key) and public subscription URLs, keeps all of its own state in its own Postgres, and never touches panel code. A panel upgrade never breaks it.

consumer ──▶ user-portal :8082 ──▶ control plane :48088 ──▶ WireGuard nodes
└──▶ freenet-sub-convert :8081 ──▶ /api/v1/sub/{token}

Two layers of identity, never mixed:

  • Portal users — people: e-mail, password, orders.
  • Panel accounts — WireGuard service instances: quota, expiry, peers.

The link is a binding table (user_id ↔ account_id plus the account’s subscription token, encrypted at rest). The portal is a proxy: it translates user intent into panel API calls, and a portal user never touches the panel directly.

With freenet-sub-convert deployed alongside, the same subscription URL serves every popular client: WireGuard, Clash / mihomo, sing-box, and Surge. Users pick a format in the portal — or paste the URL into their client and let content negotiation do it.