# Phone access guide

## In the shop / same Wi-Fi

1. Keep the POS Windows computer switched on and the Shop Manager POS app running.
2. Connect the phone to the same Wi-Fi network.
3. On the login page, open the shown **Phone access** address on the phone, for example `http://192.168.1.25:5000`.
4. Sign in with the same staff account. In Chrome or Safari, choose **Add to Home Screen** for an app-like shortcut.

The installer creates a Windows Firewall rule for **Private** networks only.

## From anywhere (mobile data / outside the shop)

Do not open router port 5000. Use Cloudflare Tunnel, which provides an HTTPS address without exposing the PC directly.

1. Create a free Cloudflare account and add a domain you own.
2. On the POS Windows PC, install `cloudflared` from Cloudflare's official documentation.
3. Run `cloudflared tunnel login` and approve it in the browser.
4. Run `cloudflared tunnel create shop-manager-pos`.
5. Create `%USERPROFILE%\.cloudflared\config.yml` with this content, replacing the values:

```yaml
tunnel: YOUR-TUNNEL-UUID
credentials-file: C:\\Users\\YOUR-WINDOWS-USER\\.cloudflared\\YOUR-TUNNEL-UUID.json
ingress:
  - hostname: pos.yourdomain.com
    service: http://localhost:5000
  - service: http_status:404
```

6. Run `cloudflared tunnel route dns shop-manager-pos pos.yourdomain.com`.
7. Run `cloudflared tunnel run shop-manager-pos`.
8. Open `https://pos.yourdomain.com` on the phone and add it to the home screen.

For permanent use, install the Cloudflare tunnel as a Windows service. Use a separate, strong password for each staff member.
