Audiobookshelf disconnects randomly (websocket issue) through cloudflare
from DonutsRMeh@lemmy.world to selfhosted@lemmy.world on 09 Mar 01:40
https://lemmy.world/post/44019211

Hi all, I’m desperate. This has been draining my brain cells one a time. I know for a fact that it is not an ABS issue, because it runs flawlessly locally and it has never even hitched once. The shit starts when I connect through my cloudflare “.com” domain that I just bought last week thinking it’ll solve all my problems (nope).

Every now and then, the frontend client I use (it doesn’t matter which one I use) just disconnects from my ABS server and things just start spinning for a very long time. Just out of nowhere and half of my books are just ghosts because it can’t reach the sever. It acts as if the ABS server becomes inactive and cloudflare just shuts off its tunnel. It’s like the ABS server stops telling cloudflare “yo, I’m up, give me a pass” but cloudflare doesn’t hear/see it and just disconnects it anyway, if that makes any sense.

Sometimes it comes back, and others I have to go into my Debian server and restart the cloudflared service I have for it, in order for the service to resume. I often go to the web interface and either get a red error message complaining about websocket something something. Then I’d refresh the page and either get thrown into the login screen and get stuck there or get the “oops couldn’t find library………”.

I’ve literally disabled everything I can on cloudflare dashboard that now probably a child can hack me. lol . I even put my audiobooks server in its own tunnel.

I’m at a point that I’m just gonna give up and deactivate all of this cloudflare shit and go back to tailscale and switching servers between home and out of home.

I’m asking for any suggestions if you’ve ever been through something similar. Searching the internet lead me to doing many things that didn’t even fix it. Don’t even get me started on AI.

Thank you in advance. Let me know if you want any details: Debian Trixie and the latest ABS server. Your average .com cloudflare domain are the things I have.

Edit: one little detail I forgot to mention maybe it could be of help. My phone and the pc are both running through pihole and my own DNS with unbound.

#selfhosted

threaded - newest

justinthegeek@lemmy.zip on 09 Mar 02:21 next collapse

Sigh…

I hate to add to this by saying I also have the same issue and not provide anything helpful.

Things that made it better?

  1. Dual zone DNS. When I’m in the house or on my VPN I don’t need to go out and back in.
  2. Disable Cloudflare proxy, or whatever it’s called that hides the endpoint IP.
DonutsRMeh@lemmy.world on 09 Mar 04:01 collapse

Pointing my https cloudflare domain at my local through pihole was basically just like switching servers in the app, because it still required me to switch servers. Might as well just do that. Also, by cloudflare proxy you mean the little orange cloud they have on the records in the dashboard?

For now I have been using the Android app I built to switch between local and remote very quickly. I put the menu right in the home screen so it’s just two clicks and I’m off. I’m also going to add an option in the settings to switch servers automatically based on the connected network, so it’s seamless and I won’t have to fuss with it.

justinthegeek@lemmy.zip on 09 Mar 05:23 collapse

Oh, then something is wrong with your DNS. You should have a forwarder setup, then you don’t need two ABS servers.

TrumpetX@programming.dev on 09 Mar 02:30 next collapse

What are you using for a reverse proxy? There’s some nginx websocket settings I had to do before things worked properly. I use cloudflare, but just for the DNS/cdn stuff, not their zero trust things.

server {
  server_name my.domain.com;
  client_max_body_size 2048M;

  location / {
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Host $host;
    proxy_pass http://10.10.10.30:13378/;  # My Wireguard Tunnel up to the VPS
    # proxy_cache_bypass  $http_upgrade; # This was added by Certbot
    # WebSocket support
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
  }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/my.domain.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/my.domain.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
    if ($host = my.domain.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

  listen 80;
  listen [::]:80;

  server_name my.domain.com;
    return 404; # managed by Certbot
}
LordChaos82@fosstodon.org on 09 Mar 02:57 next collapse

@TrumpetX @DonutsRMeh I use Pangolin and it works great.

fleem@piefed.zeromedia.vip on 09 Mar 09:58 collapse

damn i do be loving how easy and robust pangolin is getting to be

DonutsRMeh@lemmy.world on 09 Mar 03:56 collapse

I don’t use nginx for reverse proxy.

Decronym@lemmy.decronym.xyz on 09 Mar 04:10 collapse

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
DNS Domain Name Service/System
HTTP Hypertext Transfer Protocol, the Web
IP Internet Protocol
NAS Network-Attached Storage
VPN Virtual Private Network
VPS Virtual Private Server (opposed to shared hosting)
nginx Popular HTTP server

[Thread #148 for this comm, first seen 9th Mar 2026, 04:10] [FAQ] [Full list] [Contact] [Source code]