Magento – Specify encryption key during CLI install

encryption-keyinstallationmagento2.2

Is it possible to set the Magento encryption key when using the magento setup:install command for unattended installation?

There does not appear to be a specific option for the encryption key. I tried adding --magento-init-params="crypt[key]=$encryption_key", but no luck.

In theory I could use sed or similar to edit the encryption key immediately after installing, but I would prefer to avoid this approach if possible.

Using Magento 2.2.4 on Ubuntu 18.04.

Best Answer

yes it is possible. try:

magento setup:install --key="YOURKEYHERE" ... OTHER ARGS ...

Related Topic