-
To generate and use a self-signed certificate you can use the following command on your server:
-openssl req -x509 -newkey rsa:4096 -keyout ~/local-certs/portainer.key -out ~/local-certs/portainer.crt -days 365
+openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -keyout ~/local-certs/portainer.key -out ~/local-certs/portainer.crt
Then start Portainer referencing the certificate and key file you just created:
diff --git a/docs/v2.0/deploy/ssl.md b/docs/v2.0/deploy/ssl.md
index c176ffe..1593c42 100644
--- a/docs/v2.0/deploy/ssl.md
+++ b/docs/v2.0/deploy/ssl.md
@@ -8,7 +8,7 @@ To do so, you can use the --ssl
, --sslcert
and -
To generate and use a self-signed certificate you can use the following command on your server:
-openssl req -x509 -newkey rsa:4096 -keyout ~/local-certs/portainer.key -out ~/local-certs/portainer.crt -days 365
+openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -keyout ~/local-certs/portainer.key -out ~/local-certs/portainer.crt
Then start Portainer referencing the certificate and key file you just created: