Skip to content

NodeBB socket with CloudFlare

Solved Performance
24 3 14.3k 1
  • wrote on last edited by
    #9

    @phenomlab done

  • wrote on last edited by phenomlab
    #10

    @DownPW Also remove these lines and restart nginx

    root /home/XXXXX/domains/socket.XXXX.fr/public_html;
    
    	index index.php index.htm index.html;
    
  • wrote on last edited by
    #11

    Same

    image.png

  • wrote on last edited by DownPW
    #12

    I see this on start log nodebb

    e5fc0e62-fa92-461d-9bfe-2b2b9ace2232-image.png

  • phenomlab phenomlab forked this topic on
  • wrote on last edited by
    #13

    There’s more of an issue here - try to change any CSS or JS in the ACP, and you’ll see that it does not save.

  • wrote on last edited by
    #14

    ???

  • I see this on start log nodebb

    e5fc0e62-fa92-461d-9bfe-2b2b9ace2232-image.png

    wrote on last edited by
    #15

    @DownPW Now working for me in Incognito. Can you check

  • There’s more of an issue here - try to change any CSS or JS in the ACP, and you’ll see that it does not save.

    wrote on last edited by
    #16

    @phenomlab said in NodeBB socket with CloudFlare:

    There’s more of an issue here - try to change any CSS or JS in the ACP, and you’ll see that it does not save.

    due to socket.io configuration in nodebb config.json file

    Actually I have delete socket.io block and change CSS and save is good.

  • @phenomlab said in NodeBB socket with CloudFlare:

    There’s more of an issue here - try to change any CSS or JS in the ACP, and you’ll see that it does not save.

    due to socket.io configuration in nodebb config.json file

    Actually I have delete socket.io block and change CSS and save is good.

    wrote on last edited by phenomlab
    #17

    @DownPW Ok, but that now means you should not need the socket A record anymore because it’s not used. From the logs, the socket is running on the site’s URL.

  • wrote on last edited by DownPW
    #18

    normal that it is not used (A record) @phenomlab because there currently, I do not use it because the socket.io block is removed from config.json.

    I’m just in normal mode with Cloudflare :

    5272437e-9b74-4482-881a-5c376cf73900-image.png

    I can put it back if you want ?

  • normal that it is not used (A record) @phenomlab because there currently, I do not use it because the socket.io block is removed from config.json.

    I’m just in normal mode with Cloudflare :

    5272437e-9b74-4482-881a-5c376cf73900-image.png

    I can put it back if you want ?

    wrote on last edited by phenomlab
    #19

    @DownPW It seems to be working fine without it, so I’d leave it. I see zero socket errors, so all good.

  • wrote on last edited by DownPW
    #20

    because I’m alone on the server.

    The goal is to try to market this method before putting it into production where i have a lot of errors

    And we can see that it doesn’t work when I try to reroute the web sockets in non-proxied mode. (socket error, no save when chnage in ACP, etc…)

    I don’t know if I can make myself understood. @phenomlab 🙂

  • because I’m alone on the server.

    The goal is to try to market this method before putting it into production where i have a lot of errors

    And we can see that it doesn’t work when I try to reroute the web sockets in non-proxied mode. (socket error, no save when chnage in ACP, etc…)

    I don’t know if I can make myself understood. @phenomlab 🙂

    wrote on last edited by
    #21

    @DownPW Understood. Even with just the two of us connected, I was still getting the websocket error, but I think that was related to config etc. In all honesty, this is yet another reason why I stopped using CF. I know you need it to hide your IP address, but if you bypass CF for the socket, you are exposing your IP anyway.

  • wrote on last edited by DownPW
    #22

    I know, I know,

    too bad… I just wanted to test this method but it seems more complex than it looks to make it work correctly

    The reverse proxy method is currently too expensive for me and technically too abstract

  • I know, I know,

    too bad… I just wanted to test this method but it seems more complex than it looks to make it work correctly

    The reverse proxy method is currently too expensive for me and technically too abstract

    wrote on last edited by
    #23

    @DownPW it’s your only realistic option at this stage.

  • wrote on last edited by
    #24

    Solved. Tuto here and here

  • DownPW DownPW has marked this topic as solved on

Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee ☕
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics