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

Documentation about Let's Encrypt is wrong #2614

Closed
Flaburgan opened this issue Nov 21, 2023 · 6 comments
Closed

Documentation about Let's Encrypt is wrong #2614

Flaburgan opened this issue Nov 21, 2023 · 6 comments
Assignees

Comments

@Flaburgan
Copy link

Hello,

After migrating my snap to another Ubuntu installation, I had to change the domain names for which Certbot had to renew the SSL certificate. The documentation says:

remove all/any certificates that are there (this includes self-signed certs, Let’s Encrypt certs, everything). Make sure you get this command right, you don’t want to delete anything else in the current/ dir:

$ sudo rm -rf /var/snap/nextcloud/current/certs

And then asks to run sudo nextcloud.enable-https lets-encrypt.

If one does so, this second commands is failing with:

Attempting to obtain certificates... error running certbot:
/var/snap/nextcloud/current/certs/certbot does not exist or is not a directory

To fix this I had to manually recreate the certs and then cerbot directories.

So, the documentation looks wrong, why do we need to rm -rf the directories and not only the content? Or why should we remove the certificates anyway?

@scubamuc
Copy link
Member

scubamuc commented Nov 22, 2023

@Flaburgan Thanks for pointing this out.
Do you have a better suggestion? Please post here, We'll gladly change the docs.

@kyrofa had suggested this method in a solved issue. Could you check the Wiki and suggest alternative?

I have no way of double checking that this works since my encryption is managed by reverse proxy.

@scubamuc
Copy link
Member

scubamuc commented Nov 23, 2023

@kyrofa I'd like to suggest something like this:

sudo rm /var/snap/nextcloud/current/certs/keys/*.pem

and

sudo rm -rf /var/snap/nextcloud/current/certs/live/

because of:

grafik

would you agree?

@kyrofa
Copy link
Member

kyrofa commented Nov 23, 2023

Yeah whatever we put there, someone should confirm!

@pachulo pachulo self-assigned this Nov 27, 2023
@pachulo pachulo reopened this Nov 27, 2023
@pachulo
Copy link
Member

pachulo commented Nov 27, 2023

I've just been hit by this 😓 so yeah, doc is wrong.

@kyrofa I'd like to suggest something like this:
sudo rm /var/snap/nextcloud/current/certs/keys/*.pem
and
sudo rm -rf /var/snap/nextcloud/current/certs/live/

@scubamuc what about doing this after the original rm command?
sudo mkdir -p /var/snap/nextcloud/current/certs/certbot

@scubamuc
Copy link
Member

@pachulo thanks, added your suggestion in Wiki

Please confirm

@pachulo
Copy link
Member

pachulo commented Nov 28, 2023

Yes, that's right @scubamuc ! Thanks!

@pachulo pachulo closed this as completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants