Installing a Self-Signed SSL Certificate
Overview
StorageLink comes pre-configured with a self-signed SSL certificate. This article explains how to regenerate or replace it if needed.
note
Self-signed certificates will show browser security warnings. For production environments, use Let's Encrypt or a certificate from a trusted CA instead.
Steps
1. SSH into the Instance
ssh -i your-key.pem -p 2222 admin@<your-instance-ip>
2. Elevate Privileges
sudo su
3. Navigate to the SSL Directory
cd /etc/nginx/ssl
4. Generate the Certificate
openssl req -x509 -nodes -days 365 -newkey rsa:4096 \
-keyout website.key \
-out website.bundle.crt \
-extensions server_extension \
-config self-signed-ssl.cnf
This generates a certificate valid for 365 days and places the key and certificate in /etc/nginx/ssl/.
5. Restart nginx
nginx -t && service nginx restart
Troubleshooting
If certbot or another tool has overwritten your website.conf and locked you out of the Web Interface, restore it manually. The key values to update are the server_name and ssl_certificate paths.
After restoring the file, restart nginx:
nginx -t && service nginx restart
