Goal
Serve the backend on a stable custom domain (e.g. api.oneconcept.app) instead of the raw provider hostname (api-production-f3a9f.up.railway.app), so the backend host can change with just a DNS update — no mobile release.
Why this matters (and why it’s a prerequisite for #169)
The API base URL is not just a config value — it’s embedded in several places, most of them expensive to change:
EXPO_PUBLIC_API_BASE_URL is compiled into the mobile OTA bundle → changing it needs a new mobile release shipped to every phone.
- Supabase Auth → Redirect URLs allowlists
.../reset-password.
- The root README “Install the app” / API references and the backend’s own
/confirmed + /reset-password pages assume the domain.
Today, moving hosts (Railway → Oracle, #169) or even a Railway domain change would force a mobile release + Supabase reconfig. With a custom domain in front, a host move becomes a DNS record change — invisible to installed apps.
Scope
- Register/choose a domain (or subdomain) for the API.
- Point it at the current Railway service (custom domain in Railway supports this) over HTTPS.
- Set
EXPO_PUBLIC_API_BASE_URL to the new domain in both EAS environments (preview + production — keep them in sync) and ship one mobile release on it (JS-only OTA is enough — the URL is a JS env value, not native).
- Add the new
https://<api-domain>/reset-password to Supabase → Auth → Redirect URLs (keep the old one until all clients are updated).
- Update the README API/APK references and any docs that hardcode the Railway hostname.
- Verify
/health, /confirmed, /reset-password, and a normal app session all work on the new domain, then retire the raw hostname.
Acceptance
Note
Do this before the Oracle migration (#169) — it’s the single highest-leverage step to de-risk that move and any future host change.
Goal
Serve the backend on a stable custom domain (e.g.
api.oneconcept.app) instead of the raw provider hostname (api-production-f3a9f.up.railway.app), so the backend host can change with just a DNS update — no mobile release.Why this matters (and why it’s a prerequisite for #169)
The API base URL is not just a config value — it’s embedded in several places, most of them expensive to change:
EXPO_PUBLIC_API_BASE_URLis compiled into the mobile OTA bundle → changing it needs a new mobile release shipped to every phone..../reset-password./confirmed+/reset-passwordpages assume the domain.Today, moving hosts (Railway → Oracle, #169) or even a Railway domain change would force a mobile release + Supabase reconfig. With a custom domain in front, a host move becomes a DNS record change — invisible to installed apps.
Scope
EXPO_PUBLIC_API_BASE_URLto the new domain in both EAS environments (preview + production — keep them in sync) and ship one mobile release on it (JS-only OTA is enough — the URL is a JS env value, not native).https://<api-domain>/reset-passwordto Supabase → Auth → Redirect URLs (keep the old one until all clients are updated)./health,/confirmed,/reset-password, and a normal app session all work on the new domain, then retire the raw hostname.Acceptance
/healthgreen. After this, changing the backend host (per Migrate backend hosting: Railway → Oracle Cloud Always Free VM #169) requires only a DNS change — no app release.Note
Do this before the Oracle migration (#169) — it’s the single highest-leverage step to de-risk that move and any future host change.