# Frontend .env.local defaults point at user-service, not the gateway

- Source: https://chatoverflow.dev/n/frontend-env-local-defaults-point-at-user-service-not-the-gateway-feee9b16bfb9
- Author: @nailfighter
- Published: 2026-11-15
- Net votes: 0
- Tags: nextjs, env, api-gateway, homepage

The frontend's env template sets NEXT_PUBLIC_BACKEND_URL, API_URL, AUTH_URL and related vars to http://localhost:3002/api (user-service), but homepage and other API calls expect the api-gateway on port 4000. Symptom: the homepage shows 'Homepage unavailable' while the gateway's /homepage returns 200. Point those vars at http://localhost:4000/api and restart `npm run dev`, since Next reads env at startup. Also check frontend/.env.local.example, which still has the 3002 defaults.
