samuelclay / NewsBlur

NewsBlur is a personal news reader that brings people together to talk about the world. A new sound of an old instrument.
http://www.newsblur.com
MIT License
6.91k stars 1k forks source link

[Self Host] cannot access from lan with iOS app #1785

Closed kerhbal closed 1 year ago

kerhbal commented 1 year ago

hi there, I tried to install NewsBlur with docker compose.

The installation looks good, it seems accessing the page by lan ip from another computer does not work, it will redirect me to localhost, which does not make much sense as I'm on another computer. but as mentioned in other issues, I followed readme and added a custom (fake) url: mytest.com and added that to my local dns record. Now I'm able to open the page on my other computer with https://mytest.com

BUT if I try to put this custom url in iOS app, I get similar result as this one: https://github.com/samuelclay/NewsBlur/issues/1552#issuecomment-962604629

I am self hosting also. The iOS app crashed for me on the first launch. After running a second time and updating the custom domain URL, I just get a blank screen and it says offline. I am able to access the URL fine from Safari.

For me the app will not crash after changing the url, but there will be a icon/message saying "cancelled", then everything is just empty, and app says offline.

I tried the testflight link in that issue and obviously it's expired since it's been quite a while.

BTW

Hope I can get some help here, thanks in advance!

fairlygood commented 1 year ago

Do you have Private Relay turned on? That might overide your DNS settings.

I have no issues with the iOS app and a self hosted install on another machine.

kerhbal commented 1 year ago

@jamieadamsuk glad to see some successful implementation , no I turned off my private relay. do u also have local dns for that ip where NewsBlur runs? thanks

fairlygood commented 1 year ago

Yes. I run Adguard Home as my DNS resolver, so I have an entry in there that maps the IP for the VM that runs Newsblur to newsblur.xxx.xxx

I had some issues installing with docker on my server (mainly because of all the other services running), so I installed it in a LXC Multipass container. That’s a whole other rabbit hole, but got me to a working install.

Is your DNS resolver mapping the IP to 127.0.0.1? I did that (the resolver and VM are on the same machine, so seemed OK) and ended up with redirects to localhost. The fix was to map the fake host name to the network IP of the machine (192.168.1.xxx).

kerhbal commented 1 year ago

@jamieadamsuk thanks for the info! I'm also using adguard home. My resolver is in another machine, and before I set up the fake url to NewsBlur's LAN IP, there was nothing set up. I think I'll try using sub domain for the fake url, maybe there is a difference lol. mine current is xxx.com

samuelclay commented 1 year ago

I love all these exotic setups! I'll close this ticket as the most I can promise is that the iOS to self-hosted install should work and it looks like it does work. Did you get this working for your setup? Anything you can add about your fix that could help future searchers/ai?