Bitnami provide a VM for Magento 2 with all the software needed to start development.
If you need a development environment it’s a good quickstart because, you don’t need to configure and install Elasticsearch, MariaDB, Varnish etc for Magento 2.
This VM is working as is but some important things are not written in the documentation to be able to use it at his full potential.
I use the VM with VirtualBox but if you use another solution, you can follow this how to.
How to get VirtualBox ?
If you don’t already have Virtualbox you can download it from their offical website
I use Virtualbox 6.1 with Windows 11 on my computer.
How to get the Bitnami VM ?
Bitnami provide a lot of ready to use environment for Magento. To follow this article you need to download the OVA file is a package for the VM.
If you prefer you can also use the Docker container, the ready to host VM in Azure, Amazon AWS etc.
After your download you can double click on the OVA and follow the step of VirtualBox, i just change the memory and cpu to 6 GO but you can also run it with 3 GO and i prefer to allow 4 VCPU.
The first launch can be slow, you must wait that the VM show to you the IP adress and the welcome message message of Bitnami/Magento.
Your VM will be ready only when you have access to the magento website.
The process can take more than 20 minutes, it depend on your computer.
If you get a timeout, it’s maybe related to a network problem between your computer and the VM.
In this case you can set the network of your VM to Host only, after a reboot your VM will be accessible on http://192.168.56.101/
How to enable the SSH in the VM ?
By default, the VM has the SSH daemon disable, so you must use it in the console of VirtualBox.
To enable it you just have to launch your VM and type the following commands
The VM is a debian based so you must remove in first the file sshd_not_to_be_run
After that you must enable and start the ssh service
I’ve an error 503 Backend fetch failed
If you have a varnish error page with backend fetch failed message you can restart the services of bitnami.
This command will restart PHP FPM, Varnish, Apache, Elastic and MariaDB.
You also can restart a specific service with the name of the service at the end of the command.
How to change the keyboard layout ?
To change your keyboard layout you must have an internet connection in your VM.
After that you can run the following command and follow the steps to choose your prefered layout.