mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-07 12:54:33 +00:00
Destroyed How to create self‐signed SSL certificate for 3X‐UI webpanel (also if you don't use domains) (markdown)
@@ -1,30 +0,0 @@
|
||||
## Hi team! <br />
|
||||
**From version 2.2 3X-UI make warning for me, that I am not use TLS when I communicate with WebPanel.**<br />
|
||||
I know, that it is security issue for me, but I can't use LetsEncrypt certificate, cause I am not use domains. <br />
|
||||
Solution - make self-signed certificate for my IP address.<br />
|
||||
## Lets do this!<br />
|
||||
Go to server bash.<br />
|
||||
I create folder inside /root directory for cert's.<br />
|
||||
`cd /root`<br />
|
||||
`mkdir ssl-srt`<br />
|
||||
`cd ssl-srt`<br />
|
||||
Next step - create certificates. I make it for 10 years, if you need more or less - just change -days option.<br />
|
||||
`openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650`<br />
|
||||
### **WARN**<br />
|
||||
It will ask you for PEM pass phrase - remember it! It will bee needed for next step! Or use easy - I use "1234"<br />
|
||||
<br />
|
||||
Next step - input data for certificate. I leave all blank. <br />
|
||||
**!!!BUT!!!** <br />
|
||||
You need to input **your real IP address into Common Name field**. <br />
|
||||
<br />
|
||||
Certs made. But if you try to install it inside the panel, you will take an error, cause your private key locked by pass phrase.<br />
|
||||
Let's unlock it! <br />
|
||||
`openssl rsa -in key.pem -out key.un.pem -passin pass:YOUR PASS PHRASE` <br />
|
||||
<br />
|
||||
## And the final round - install it into the WebPanel.<br />
|
||||

|
||||
|
||||
## Final
|
||||
After save and reboot Webpanel you will take an error about self-signed certificate, just ignore it. But, you will not see TLS error inside - your connection will be encrypted! <br />
|
||||
All complete! <br />
|
||||
Good Luck! <br />
|
||||
Reference in New Issue
Block a user