Jellyfin Forum
Cannot Connect Android App to Desktop Server - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Cannot Connect Android App to Desktop Server (/t-cannot-connect-android-app-to-desktop-server)



Cannot Connect Android App to Desktop Server - littleradio - 2024-09-12

Hello all, after about 2 days worth of searching, asking AI, and pulling my hear out, as a networking novice, I am finding connecting my android app and desktop client on a Debian server to be entirely impossible with my current understanding of all this. This is a plea, and I hope you all will have a wee bit of mercy, but I would like some help.

I had initially tried Jellyfin via CasaOS, which didn't work at all. "Tried 5 candidates for input, without success." I can SSH into the server no problem using my laptop, so I know it's visible at least to that degree. Also I have allowed all necessary ports via UFW, so that doesn't seem to be an issue. I'm not using any sort of proxy, dns, or anything since this is all on my own home network (and frankly for trial purposes only until I can confirm it will work). Remote access is enabled, and everything else is left untouched. I have tried accessing the server through all the possible names and addresses my server could possibly have, and none of them work. 

Am I missing some underlying networking understanding? Am I crazy? Please let me know if you have any insights or corrections for absolute beginners.

Thank you for your time.


RE: Cannot Connect Android App to Desktop Server - TheDreadPirate - 2024-09-12

CasaOS uses docker for Jellyfin, correct? Do you know what networking type is used? Bridge or host?


RE: Cannot Connect Android App to Desktop Server - littleradio - 2024-09-12

Hello, thank you for replying.

CasaOs does use Docker, but I have since removed CasaOs and all the docker containers previously installed, and re-installed a new jellyfin container following the docs. It is set up using the host connection. The loopback of course works perfectly fine, but so far no other device can access the jellyfin server.


RE: Cannot Connect Android App to Desktop Server - TheDreadPirate - 2024-09-12

When you added the UFW rule, did you ensure that UFW was enabled? Adding rules while UFW is not enabled doesn't apply them. IIRC, UFW is not enabled by default in most setups.

Code:
sudo ufw status



RE: Cannot Connect Android App to Desktop Server - littleradio - 2024-09-13

Hello again,

This is a lengthy post, and hopefully I make sense. After an afternoon of tinkering (and asking AI & the docs) I was able to set up Jellyfin in a way that was accessible via my phone as well as another desktop at home, so success, for the most part, as you'll read below.

I had UFW enabled and had allowed port 8096 on the server. What I realized was that no port was specified in the shell script I had used to run Jellyfin in a Docker container. I don't know if this was exactly the issue, but after rewriting the shell script and adding -p (published 8096:8096) and also specifying the bridge connection, I had success.

Once I had set that up I was able to log in via another desktop, however I was still stumped by my phone. What I discovered was that if I turned the VPN off on my phone, it connected no problem. I suspect that might have been a major issue in my former iterations. What I don't understand is that I use the same VPN on the desktop, and it still connected to the server. I haven't done anything to set up reverse proxy or to use a DNS address, but that will likely be my next project, at some point.

I've gained a lot of new info about networking and applications and shell scripts (which was half the goal of this project!) and will keep searching for why the VPN blocks it. Any ideas as to why the phone's VPN would block the access to the server, and not the desktop's VPN connection? They are both connected to our home network via the VPN. If you need more info, let me know.

Here is the successful shell script minus username:

#!/bin/bash
docker run -d \
--name jellyfin \
--user 1000:1000 \
--net=bridge \
--publish 8096:8096 \
--volume /home/user/jellyfin/configConfused-faceconfig \
--volume /home/user/jellyfin/cacheConfused-facecache \
--mount type=bind,source=/home/user/jellyfin/media,target=/media \
--restart=unless-stopped \
jellyfin/jellyfin


Thank you!


RE: Cannot Connect Android App to Desktop Server - TheDreadPirate - 2024-09-13

It depends on how each VPN client works. Is the phone VPN app set to funnel ALL traffic through the VPN? Is the desktop app configured for split tunneling? Local traffic doesn't use the VPN, Internet bound traffic goes through the VPN?