I would like to know what am i doing wrong right here

I'm having React+Nodejs app on my server running globally via pm2. I wanted to use certbot in order to create ssl certificate.
My domain is 'somoontrans.ru'
I'm using VPS server and connecting to it via ssh. server by beget.
I have installed nginx and other needed stuff.
OS of vps server is ubuntu 22.04 LTS.

I tried to run certbot and got this error. (used this command ```
sudo apt install certbot python3-certbot-nginx


> Encountered exception during recovery: certbot.errors.MisconfigurationError: nginx restart failed:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] still could not bind()
nginx restart failed:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Unknown error)
nginx: [emerg] bind() to [::]:80 failed (98: Unknown error)
nginx: [emerg] still could not bind()

Hi @lamename, and welcome to the LE community forum :slight_smile:

Which one is using port 80?
Show:
netstat -pant | grep -i listen | grep 80

4 Likes

Sure. It's 80 port.
I should run this command on my server?
i did it there.

tcp6       0      0 :::80                   :::*                    LISTEN      8862/node /root/cli```

That's not nginx on port 80.
[that's Node.js]

So, you shouldn't be using certbot with --nginx.

4 Likes

Can i use certbot --node or smth similar then?
Can't find it in official certbot documentation

No.
You could use certbot with certonly and use --webroot authentication.

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.