Skip to content

🔒 Security Configuration

To secure the application data and ensure the integrity of your deployment, it is highly recommended to modify the following environment variables in the Carrot server configuration (.env file), especially in a production environment.

🔑 Mandatory Encryption Variables

These keys and credentials are vital for cryptographic operations.

Environment VariableDescriptionHow to Generate (Example)
SECRET_KEYThe secret key used by the application (Django) for various cryptographic operations, including session hashing. Use a long, complex, random string.openssl rand -base64 50
SIGNING_KEY_FILEPath to the Private Key file used to sign JWT tokens (RS256 algorithm). The path must be accessible from within the Docker container. By default, Carrot expects the key at /etc/keys/jwt_rs256_signing_key.pem.openssl genpkey -algorithm RSA -out jwt_rs256_signing_key.pem -pkeyopt rsa_keygen_bits:2048
VERIFYING_KEY_FILEPath to the Public Key file used to verify JWT tokens. The path must be accessible from within the Docker container. By default, Carrot expects the key at /etc/keys/jwt_rs256_verifying_key.pem.openssl rsa -in jwt_rs256_signing_key.pem -pubout -out jwt_rs256_verifying_key.pem
POSTGRES_PASSWORDThe password used by Carrot to access the PostgreSQL database. Use a strong, unique password.openssl rand -base64 32

WARNING

⚠️ Default value placeholders are provided in the .env.sample file and encryption keys are automatically generated if not present, which simplifies the initial setup. You must change these default values before deploying to production.

👤 Default Administrator Account

By default, Carrot creates an initial administrator account with the following credentials:

  • Email: admin@mail.com
  • Username: admin
  • Password: admin

You can modify these default values before the first execution of Carrot by defining the following environment variables in your .env file:

Environment VariableDescription
ADMIN_EMAILThe email address for the default administrator account.
ADMIN_USERNAMEThe username for the default administrator account.
ADMIN_PASSWORDThe password for the default administrator account. Must be a strong password.