DDEV Test Environment for OpenMage in Windows 10/11 #3839
Replies: 8 comments 21 replies
-
|
Those who use PHPStorm as IDE can integrate DDEV in the editor.There is already a plugin that offers more features. For more details visit |
Beta Was this translation helpful? Give feedback.
-
|
Question on (Windows) Installing mkcert for Secured Connections scoop bucket add extras
scoop install mkcertI cannot connect my steps with this step:
Where do I look for the file [edit] Got it, the windows executable to install mkcert can be downloaded here: https://github.com/FiloSottile/mkcert/releases |
Beta Was this translation helpful? Give feedback.
-
|
I encountered the following error: kiat@DESKTOP-7GLIBDK:~/openmage$ ddev composer install
Building project images...
Project images built in 1s.
Container ddev-openmage-db Recreate
Container ddev-openmage-web Recreate
Container ddev-openmage-db Recreated
Container ddev-openmage-web Recreated
Container ddev-openmage-db Started
Container ddev-openmage-web Started
Failed to create certificates for project, check mkcert operation: ERROR: failed to read the CA certificate: unexpected content
; err=exit status 1What do I do? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
For PHPMyAdmin, it can be invoked simply with |
Beta Was this translation helpful? Give feedback.
-
|
@addison74 can you add it to #4156 ? |
Beta Was this translation helpful? Give feedback.
-
|
Small updates to this article
|
Beta Was this translation helpful? Give feedback.
-
|
I will create a separate article for the situation when the computer on which the DDEV test environment is installed is behind a proxy server with authentication. I encountered this situation recently where a corporation allows employees to access the Internet through a proxy server. Now it seems to me easy to implement, but initially it created some issues because the settings have to be made in both Windows and WSL for it to work. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Last update February 27, 2025
VMware Workstation - Free for Personal Use
In this tutorial I used VMware Workstation as a desktop hypervisor. Starting with spring 2024, the new owner Broadcom has decided to provide the application with two license models, Free Personal Use or Paid Commercial use. So, you can use this application for free as long as it is for personal use. I encourage everyone to use VMware because compared to its competitors (VirtualBox, Microsoft Hyper-V) it has better performance especially on the graphics side. A Windows 10 or 11 operating system runs in a virtual machine pretty decent to a real one.
For more details read this article
https://blogs.vmware.com/workstation/2024/05/vmware-workstation-pro-now-available-free-for-personal-use.html
VMware Workstation Settings
If you run Windows OS in a virtual machine, it is mandatory to activate the virtualization option. For example, in VMware with the virtual machine off, access
Edit virtual machine settings. In theHardwaretab selectProcessorsand in theVirtualization enginesection check theVirtualize Intel VT-x/EPT or AMD-V/RVIoption.You need at least 8 GB of memory to run (Docker + PHPStorm) decent. I recommend a machine with 16 GB.
(Windows) Installing the Windows Terminal Application
Microsoft Storeapplication and search forWindows TerminalGetbuttonIf you use PHPStorm, at the bottom there is a tab called
Terminal. Here you can run commands in the Linux distribution too.(Windows) Installing WSL2 (Windows Subsystem for Linux 2)
The Installation Tutorial
https://pureinfotech.com/install-windows-subsystem-linux-2-windows-10/
Useful Commands
https://learn.microsoft.com/en-us/windows/wsl/
Advanced Settings
https://learn.microsoft.com/en-us/windows/wsl/wsl-config#configure-global-options-with-wslconfig
You can configure limits on the memory, CPU and swap size allocated to WSL 2 in a
.wslconfigfile. For example, create a file named.wslconfigin theC:\Users\<User Name>directory with the following content(Windows) Installing a Linux Distribution
Variant 1
Command Promptapplication as Administratorwsl --list --onlinewsl --install -d Ubuntu-20.04Variant 2
Microsoft Storeapplication and search for UbuntuOpen the
Terminalapplication then choose a new tab with Ubuntu. Follow the steps to complete the installation, setting theusernameandpassword(e.g. ubuntu / 1234).(Windows) Installing Docker
https://docs.docker.com/desktop/install/windows-install/
Docker Desktop Installer.exeand run it as AdministratorUse WSL 2 instead of Hyper-V (recommended)(Windows) Installing mkcert for Secured Connections
https://github.com/FiloSottile/mkcert
Terminalapplication as Administratormkcert-vX.X.X-windows-amd64.exemkcert-vX.X.X-windows-amd64.exe --installYes(Windows) Linux distribution drive mapping
Windows ExplorerapplicationLinuxpath and selectUbuntu-20.04Map network drive...from the menu. Choose a letter, for example Z:From now on it appears in the
This PCsection underNetwork locations. If you want to disconnect it, right-click and selectDisconnectfrom the menu.(Windows) PHPStorm
Create a new project in PHPStorm that has the location where you cloned the OpenMage repository. If you log in to your GitHub account, you will see in the
Pull Requesttab on the left the open PRs from OpenMage. Open one and checkout to start testing. When you are done, at the bottom of the PHPStorm window you will see theGittab. Click on it, then right click onLocal > mainand selectCheckout. You can update the repositories, locals and remotes, from time to time and more.(Linux) Installing DDEV
https://ddev.readthedocs.io/en/latest/users/install/ddev-installation/
Terminalapplication and choose a new tab with Ubuntusudo apt update && sudo apt upgrade -y(Linux) Copying mkcert Certificates from Windows to Linux
Variant 1
Terminalapplication and choose a new tab with Ubuntumkdir -p /home/<user_name/.local/share/mkcertcp /mnt/c/Users/<User Name>/AppData/Local/mkcert/* /home/<user_name>/.local//share/mkcert/Variant 2
Windows Explorerapplication as administratorrootCA.pemandrootCA-key.pemfromC:\Users\<User Name>\AppData\Local\mkcert/home/<user_name/.local/share/mkcertmkcertdirectory(Linux) Installing OpenMage
First make sure that the
Docker Desktopapplication is running in Windows.Terminalapplication and choose a new tab with Ubuntumkdir -p /home/<user_name>/openmagegit clone https://github.com/OpenMage/magento-lts.git /home/<user_name>/openmage/home/<user_name>/openmage.ddev/config.yamlfile to change the webserver and PHP version as you want. I am using Apache and PHP 8.3(WSL) The xdg-open error when running the ddev launch command
If you encounter errors when running the
ddev launchcommand, related to xdg-open and a long list of missing Linux browsers it is normal. DDEV wants to launch an installed browser in WSL and since there is none, we have to configure to use the default one in Windows. All you have to do is editing the ~/.bashrc file and adding the following line to the endexport BROWSER="powershell.exe /C start"For the change to take effect, run
. .bashrc..Another variant would be to install in WSL the wslu package.
Conclusion
As you can see, the more complicated part is the initial configuration of WSL, Docker, DDEV. Once done, it doesn't take more than 3-5 minutes to get an instance of OpenMage ready for testing. Forget about XAMPP, WAMP in Windows. The free nature of VMware Workstation allows you to move a virtual machine into many desktops and have a ready to go testing environment.
You can use a test environment in Windows without WSL2, but I do not recommend this configuration because DDEV must be installed in Windows and not inside the Linux distribution. It depends on Mutagen and it is very very slow. Testing in a Linux distribution has many advantages and it is close to the final stage, when you have to move the project into production.
For more information about using DDEV please visit https://docs.openmage.org/developers/tools/ddev/. It is a fantastic tool!
Proxy Connection
When you connect to the Internet through a proxy connection, with or without authentication, because the network administrator has banned the access to certain websites (YouTube, Facebook, TikTok), you have to make some changes to be able to run properly the DDEV-based test environment. Please follow the tutorial I created here #4656.
Beta Was this translation helpful? Give feedback.
All reactions