Using key encryption to deploy smart contracts This is a much more secure way of deploying smart contract with an account. Don't store your PRIVATE_KEY in the .env file. Use this method instead. The private key is from Ganache, there is no need to try to steal something there ;)