Generate Strapi env variables for your production

 

You can copy the commands below to you shell and run it.

it will give you the output that you can just copy from into your .env file you are newly creating.


Strapi io  4.x  env variable generation



# Generate keys
APP_KEYS=$(openssl rand -base64 16),$(openssl rand -base64 16),$(openssl rand -base64 16)
API_TOKEN_SALT=$(openssl rand -base64 16)
ADMIN_JWT_SECRET=$(openssl rand -base64 16)
TRANSFER_TOKEN_SALT=$(openssl rand -base64 16)

# Print results
echo "APP_KEYS=$APP_KEYS"
echo "API_TOKEN_SALT=$API_TOKEN_SALT"
echo "ADMIN_JWT_SECRET=$ADMIN_JWT_SECRET"
echo "TRANSFER_TOKEN_SALT=$TRANSFER_TOKEN_SALT"


unset APP_KEYS API_TOKEN_SALT ADMIN_JWT_SECRET TRANSFER_TOKEN_SALT


I've posted this in the strapi github as well



https://github.com/strapi/strapi/issues/15206#issuecomment-2529899024






Comments

Popular posts from this blog

Strapi Can not start server with Cannot read properties of undefined (reading ‘toLowerCase’)

나는 솔로 24기 출연진 정보 + 인스타그램 링크 등

[Completely free] Connect to Oracle Always free database (mysql) from public Internet using mysql router