Remote Access
Remote access allows the Mydia mobile app to connect to your Mydia instance from anywhere, even when your server is behind NAT or a firewall.
Get the Mobile App (iOS Beta)
The Mydia player is in open beta on TestFlight. Install the TestFlight app on your iPhone or iPad, then join the beta. New builds reach you automatically as they ship.
Configuration
Enable Remote Access
Remote access is off by default and is turned on with an environment variable, not from the web interface. There is no in-app toggle: until the variable is set, the Remote Access tab is not rendered at all.
-
Set
ENABLE_REMOTE_ACCESS=truein your container environment: -
Restart Mydia. The p2p server starts with the application and announces itself.
- Go to Admin > Configuration > Remote Access in the web interface. The tab appears only once the variable is set.
Optionally set P2P_BIND_PORT to a fixed UDP port and forward it, which lets peers
hole-punch a direct connection instead of falling back to a relay. See
Environment Variables for both.
Direct URLs
Direct URLs are automatically detected from your instance's network configuration:
- Local IP addresses (e.g., https://192.168.1.100:4443)
- Public hostname (if configured)
- Custom domain (if configured)
Pairing a Device
Pairing uses a claim code: a short, single-use code (shown as a QR code or as eight characters) that you generate on your instance and enter in the player. It stands in for your instance's cryptographic node identity, which is far too long to type, and it is valid for five minutes and one use only. After pairing, the device holds a long-lived device token and the code is no longer involved.
To generate one, open Admin > Configuration > Remote Access and use Pair New Device. Paired devices are listed on the same page, where you can revoke them individually or clear the inactive ones.
See How Remote Access Works for why the window is so short.
Troubleshooting
App won't connect
- Check remote access is enabled - if the Remote Access tab is missing from
Admin > Configuration,
ENABLE_REMOTE_ACCESSis not set on the container - Verify p2p server is running - check logs for startup messages
- Generate a fresh claim code - codes expire five minutes after you create them and cannot be reused, so a code left on screen while you fetched your phone is likely already expired
Slow performance
- Check connection type - a connection that stayed on the relay is slower than one that hole-punched through to a direct path
- Network issues - try from different network to isolate
- Firewall rules - ensure outbound UDP is allowed for QUIC
Connection drops
The p2p stack handles reconnection automatically:
- Transient failures - automatic retry with backoff
- Network change - reconnection after network switch
- Long disconnects - may require re-pairing
The retry and path-selection logic lives in the player, not the server. See API Reference for where to find it.
Next Steps
- How Remote Access Works - The peer-to-peer design, what infrastructure it depends on, and why claim codes expire so quickly