How to generate new SECRET_KEY in the settings.py file — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberLoader

How to generate new SECRET_KEY in the settings.py file

Hello, I have a snapshot with CyberPanel installed that I would like to restore to my clients' web servers, so I avoid reinstalling every time.

I have already created a bash script to update the machineIP file and another to update the root and CyberPanel database passwords, including updating the passwords in the settings.py file.

What I would like to know now is if I can generate a new SECRET_KEY, for example, with /dev/urandom or at that site https://djskgen.herokuapp.com/ and add to the settings.py file of each webserver, for security reasons. I wonder if this secret key is only in the settings.py file or also in other files and which ones.

Thanks in advance.

Comments

Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion