Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nixoye opened this issue Dec 26, 2022 · 9 comments
Open
Labels
question Further information is requested

Comments

@nixoye
Copy link
Contributor

nixoye commented Dec 26, 2022

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

@nixoye nixoye added the question Further information is requested label Dec 26, 2022
@Tealk
Copy link
Collaborator

Tealk commented Dec 27, 2022

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
Copy link
Contributor Author

nixoye commented Dec 27, 2022 via email

@Nutomic
Copy link
Member

Nutomic commented Dec 27, 2022

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
Copy link
Contributor Author

nixoye commented Dec 27, 2022

@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 [email protected]

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
Copy link
Contributor Author

nixoye commented Dec 30, 2022

@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
Copy link
Collaborator

Tealk commented Dec 30, 2022

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
Copy link
Contributor Author

nixoye commented Dec 31, 2022

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

@Tealk
Copy link
Collaborator

Tealk commented Dec 31, 2022

lemmybb does not affect the lemmy instance

@Nutomic
Copy link
Member

Nutomic commented Jan 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants