LemmyNet/lemmyBB

[Question]: Is the SSL Cert for the BB Subdomain made automatically?

Opened this issue · 9 comments

nixoye commented

I'm getting this error mentioning the Lets Encrypt cert for the subdomain ill be using for LemmyBB

{"changed": true, "cmd": "nginx -s reload", "delta": "0:00:00.020479", "end": "2022-12-26 21:55:33.321149", "msg": "non-zero return code", "rc": 1, "start": "2022-12-26 21:55:33.300670", "stderr": "nginx: [emerg] cannot load certificate \"/etc/letsencrypt/live/mybbsubdomain/fullchain.pem\": BIO_new_file() failed (SSL: error:80000002:system library::No such file

Tealk commented

The manual installation does not create a certificate, you have to use certbot or acme.sh.

That is why the instructions say

and edit it to fit your setup

because it is also possible that you have a wildcard certificate

nixoye commented

Looks like the certbot commands are missing from the section "Install alongside existing Lemmy instance (native)". You can add that to your pull request by copying from the section above.

nixoye commented

@Nutomic would these be the correct commands to add to my pull request?

Install nginx config and set correct domains. Note that this config by default doesn't allow direct access to the API nor pictrs. This makes it harder for spam bots, but also means that Lemmy clients cant be used. The nginx config includes instructions for putting lemmy-ui behind HTTP Auth, so that only admins can access it.

wget https://raw.githubusercontent.com/LemmyNet/lemmyBB/main/docker/nginx.conf -O /etc/nginx/sites-enabled/lemmybb.conf

Request tls certificates (use your actual domains and email)

certbot certonly --nginx -d lemmybb.com -m contact@lemmybb.com

replacel lemmybb_domain with your domain by replacing lemmybb.com with your domain in this command

sed -i -e 's/$lemmybb_domain/lemmybb.com/g' /etc/nginx/sites-enabled/lemmybb.conf

reload nginx

nginx -s reload

open your daily cronjob

sudo crontab -e

and add these lines to automatically renew tls certificates

@daily certbot certonly --nginx -d lemmybb.com --deploy-hook 'nginx -s reload'

I'm confused by the nginx config part, I don't understand what it means that Lemmy clients cant be used. Does this mean I won't be able to use the Lemmy apps or?

nixoye commented

@Tealk can you take a look at these updated instructions? I tried them but they're not helping (I'm trying to fix the install lemmybb alongside existing lemmy instance instructions)

Tealk commented

think that this is not so easy, but I do not know much about the certbot
nginx could run into errors because of the ssl certificate

nixoye commented

Are there any instructions on deleting lemmybb? I cant get it to work and my instance has been down since i began trying

Tealk commented

lemmybb does not affect the lemmy instance

If you want to enable the api and allow client usage, you need to uncomment these lines.

The instructions you put look good, but maybe it would be clearer to use something like your-domain.com instead of lemmybb.com.

For uninstalling you basically need to stop Lemmy and delete all the files you created previously.