tangled on ur phone
README.md

Untangle server #

A tiny Node.js server (no dependencies) that hosts the atproto OAuth client metadata document for the Untangle iOS app, plus a landing page and an OAuth callback fallback.

Routes:

  • GET /oauth-client-metadata.json - OAuth client metadata (served at client_id)
  • GET /healthz - health check, returns ok
  • GET / - landing page
  • GET /oauth/callback - fallback page if the browser lands here

Deploy on Railway #

  1. Create a new service in Railway from the GitHub repo mozzius/untangle.
  2. In the service settings, set Root Directory to /server. Railway picks up railway.json from there.
  3. Under Settings > Networking, add the custom domain untangle.mozzius.dev. Railway shows a CNAME target; add that CNAME record in your DNS provider for untangle.mozzius.dev.
  4. Optional: set the environment variable PUBLIC_URL (default https://untangle.mozzius.dev). It must match the public origin, without a trailing slash.

Once deployed, check:

curl -s https://untangle.mozzius.dev/oauth-client-metadata.json

Run locally #

cd server
node server.js

The server listens on PORT (default 3000) on 0.0.0.0:

PORT=8080 node server.js
curl -s localhost:8080/oauth-client-metadata.json

Requires Node.js 22 or newer. There are no npm dependencies, so no install step is needed.