The SECRET_KEY_BASE environment variable sets a secret key that is used for various security-related features, including session cookie encryption and other cryptographic operations.

Note: This is different from PWPUSH_MASTER_KEY which handles in DB encryption.

Generating

If you are getting logged out on every deploy, set this environment variable to a random string in your environment.

You can generate a new string by getting running ./bin/pwpush secret. In the Docker container, the full path would be /opt/PasswordPusher/bin/pwpush secret.

This will output a new, random generated string:

$) bin/pwpush secret
f7af32f6f51fff9df4e0ae9dd127a6588ab07d0988bd805ba5e650cb5399z30cc225aec2848c9c763549c31260203a751601e7ef28c2b7aa353ee533644c0d05
$) bin/pwpush secret
df04f112ff508f8f8aa92e942ffb0ed8b252cbd9ae59fadc7b69e1d3190439796e62f20c7b431ae1285682857183fb55c567223210b98a7558de6975499468b6
$) bin/pwpush secret
7ea591173da2443a65a3d601c3876fb63c3b75855e54a61dfc0bacd64d7748450d176c8b15218c6d11fa244a26a6d0c0214485e9356458606f075d002a503289

Environment Variable

Set the SECRET_KEY_BASE environment variable for your application to keep consistently signed cookies through deploys.

Updated: