Local Network Testing

To test the application from a phone or another device in your local network.

Security Considerations

Setting:

BIND_ADDRESS_HOST=0.0.0.0

exposes the backend to your entire local network.

This should:

  • Be used for development on trusted networks only
  • Not be used in production unless protected by a firewall or reverse proxy
  • Not be used on public Wi-Fi or untrusted networks

Steps

1. Allow network binding

In .env:

BIND_ADDRESS_HOST=0.0.0.0

Note: This is set by default

Restart the backend after changing the variable.

Note: Logging in via Keycloak does not work out of the box — see Known Limitations below.

2. Determine your local IP address

On Linux:

ip addr | grep 192

Look for something like:

192.168.0.143

This is your local IP address.

3. Update frontend configuration

In .env:

VITE_BASE_API_URL=http://<your-local-ip>:8080

Example:

VITE_BASE_API_URL=http://192.168.0.143:8080

4. Start the frontend with network binding enabled

When starting the frontend with make run-frontend, the --host flag is passed automatically. If starting it directly via npm run dev, add --host explicitly so the dev server binds to all interfaces:

npm run dev -- --host

Note: Without --host, the dev server only listens on localhost and is not reachable from other devices.

5. Access from mobile

Open in your mobile browser:

http://<your-local-ip>:5173

For example:

http://192.168.1.143:5173

Tip: Both devices must be connected to the same local network. If it is not working, check if you are connected to a VPN.

Known Limitations

Keycloak Login

Logging in via Keycloak does not work out of the box when accessing from another device. Keycloak requires each device's IP to be explicitly added as a valid redirect URL. Contact someone with Keycloak admin access to add your IP before testing authentication.

Currently registered IP-addresses:

  • 192.168.0.143
  • 192.168.1.160
  • 192.168.1.2
  • 192.168.1.3

Nextcloud Images

When accessing the frontend from a different device, images loaded from Nextcloud may fail to load. This is a separate configuration issue related to CORS. This does not affect backend functionality.