I have established an RPC node on a Digital Ocean droplet and configured NGINX and SSL according to the instructions at the polkadot wiki. Configurations below. Connecting on wss://koabd.rocks or wss://koabd.rocks:443 both produce the following ... The node accepts the incoming connection (node output: "accepting new connection 1/100") but the polkadot-JS screen is stuck in "Waiting to establish a connection with the remote endpoint."

What am I missing? Do I need to:

  • set up a firewall and allow specific ports? (there are currently no firewalls in place)
  • remove the IPv6only tag from the NGINX config?
  • some other trick?

My Node Configuration:

./target/release/substrate \
--base-path ./gropocloudmoose \
--chain ./GropoSpec20230115Raw.json \
--port 30333 \
--ws-port 9955 \
--rpc-port 9944 \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--enable-offchain-indexing=true \
--ws-external \
--state-pruning archive \
--blocks-pruning archive \
--ws-max-connections 100 \
--rpc-cors all \
--rpc-methods Safe \
--name gropocloudmoose \
--bootnodes /ip4/ \

My NGINX Configuration:

server {

    server_name koabd.rocks www.koabd.rocks;

    location / {
        proxy_buffers 16 4k;
        proxy_buffer_size 2k;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_pass http://localhost:9955;
        include proxy_params;

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/koabd.rocks/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/koabd.rocks/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 = www.koabd.rocks) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    if ($host = koabd.rocks) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80;
    listen [::]:80;

    server_name koabd.rocks www.koabd.rocks;
    return 404; # managed by Certbot


2 Answers 2


Connection to https://koabd.rocks does seem to work, so the nginx on https looks like its working and there is no issue with a firewall from the internet.

While accessing wss://koabd.rocks I did get an error aswell.

Do you see something in the access or error log for nginx?

And can you try adding

ssl on;

on the server block?

  • I see a 502 Bad Gateway error when I try to access the url koabd.rocks directly. I cannot see any log or error files for my nginx (probably just don't know where to look). I tried adding "ssl on;" to my server block and got an error saying that "server on;" was deprecated and it could not run the nginx that way. I also tried setting ipv6only=off but the nginx server would not run with that either. Jan 25, 2023 at 19:03
  • normally you can find the logs under /var/log/nginx/* . Check if you can find some info there.
    – Sequajaa
    Jan 25, 2023 at 19:05
  • Thanks! I found the logs and took a look at them. There is nothing obvious. In the access logs I see lots of GET and POST. In the error logs there are only a few lines: 2023/01/22 23:20:01 [notice] 103646#103646: using inherited sockets from "6;7;" 2023/01/23 00:22:12 [notice] 104666#104666: signal process started 2023/01/23 00:22:18 [notice] 104669#104669: signal process started Jan 25, 2023 at 19:15
  • I find it strange that there are no entries from today in either file. Jan 25, 2023 at 19:15
  • Yeah, thats strange. You should see something because koabd.rocks is accessible over the internet..
    – Sequajaa
    Jan 25, 2023 at 19:37

SOLVED! Open the Nginx config for the site… sudo nano /etc/nginx/sites-available/MYSITE

Erase EVERYTHING in the file (yes, everything) and set it back to just:

server { server_name MYSITE;

location / { proxy_buffers 16 4k; proxy_buffer_size 2k; proxy_pass http://localhost:MY-WS-PORT; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; } }

THEN…. Re-engage certbot…

certbot --nginx

Finish your certbot prompts and you are good to go!

Nginx Config FIRST, Certbot SECOND.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.