Question

How to upload ssl certificate on ubuntu console with nginx on digital oceant

Sir/ ma for months now i have been unable to upload my bought and signed ssl certificate bought and purchased on namecheap. i have bought the certificate and the signed file is been sent to me. i have downloaded and combined it using an online combiner tool since the cerficate must be uploaded in one file according to digital ocean doc. kindly, enlighten me on how to upload this certificate to my ubuntu using nginx on my console on digital ocean. am really stuck out here. i have no idea on how to upload certificate signed to ubuntu using ngix and all my attempts failed.

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Hello there,

The Droplet Console has a native-like terminal experience, so you can run commands on your Droplet from a familiar command-line interface. It also provides one-click SSH access to your Droplet without the need for a password or manual SSH key configuration.

It is indented for when you do not have access using a ssh-client or or during an emergency or recovery. It is not recommended to use the console for copy/pasting files, code and etc.

https://docs.digitalocean.com/products/droplets/how-to/connect-with-console/

Hope that this helps!

Hi @udunanka,

There is no need to upload it, you can just open a terminal, create a file and COPY-Paste it there.

Regarding the SSL certificates and how to add it to your Website on Nginx, you can add the CA Bundle and Cert in one file and upload them let’s say here /etc/ssl/your_domain_ssl-bundle.crt; then the private key here /etc/ssl/your_domain.key once you have the files on the Droplet, open your Domain conf in Nginx and add the following lines right under the server block for 443:

ssl on;
ssl_certificate /etc/ssl/ssl-bundle.crt;
ssl_certificate_key /path/to/your_private.key;

It should look something like that

server {
    listen 443;
    ssl on;
    ssl_certificate /etc/ssl/ssl-bundle.crt;
    ssl_certificate_key /path/to/your_private.key;
    root /path/to/webroot;
    server_name your_domain.com;
}

Of course there might be more configurations in there.