Report this

What is the reason for this report?

How do i recover my domain.crt and domain.key from my deleted ubuntu droplet

Posted on March 17, 2022

I erroneouslly deleted my ubuntu-s-1vcpu-1gb-amd-fra1-01 from my droplet and i used the deleted droplet to generate domain.crt and domain.key earlier and to add the two files mentioned above to my file path. Now the ubuntu is deleted from my project and i created a new one. i want to finalize everything by adding the ssl certificate already approved to my domain managed on digital ocean. now i want to add the .crt and .key files generated earlier back to my project and finalize the ssl linking to my website.

i have no idea and am very confused on this. someone should help me please



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey @udunanka,

Why don’t you generate a new certificate on your new Droplet, it shouldn’t be hard and impossible? You can even use Let’s Encrypt/certbot to issue it and configure it in one step.

Regarding the old droplet, if you don’t have a snapshot to restore it from, your best bet would be contacting DigitalOcean’s support and asking them if they have a backup of the said droplet.

https://www.digitalocean.com/support/

Hope that helps! - KFSys.

Hello,

If you do not have a backup of your server, I could suggest two things:

  • You can get a free new Let’s Encrypt SSL certificate by following the steps here:

https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-18-04

  • Alternatively, if the certificate that you are trying to recover was a purchased certificate from an SSL certificate provider, you could reach out to them and ask them to regenerate the certificate files for you.

Hope that this helps!

Regards,

Bobby

It’s worth double-checking if you have backups:

  1. DigitalOcean Snapshots:
  • Log in to your DigitalOcean Control Panel.
  • Navigate to the “Droplets” section.
  • Check if there are any snapshots that were taken automatically or manually. If you find one, you can create a new droplet from the snapshot to recover your files.
  1. Backups:
  • Again, check if you might have enabled backups at any point. These are different from snapshots and might provide another route to recovery.

If snapshots and backups are not available, you can try using testdisk to recover deleted files. testdisk is a powerful data recovery tool that can work in some cloud environments. You can also check this article:

https://www.digitalocean.com/community/tutorials/how-to-install-testdisk-on-linux-and-recover-deleted-files

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.