Requirements
- Computer with Windows 10 or 11
- Internet access
- WSL extension installed in VS Code
- VS Code configured to use LF line endings
Steps
- Open the Windows Terminal
- Install Ubuntu using
wsl --install
- Restart your computer to finish installing the system
- Open the Windows Terminal again and select Ubuntu from the dropdown
- Enter the new username and password for the system when prompted
- Install the necessary packages with this single command (Docker and DDEV)
sudo apt-get update && sudo apt-get install -y mkcert ca-certificates curl gnupg && sudo install -m 0755 -d /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && sudo chmod a+r /etc/apt/keyrings/docker.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list/dev/null && sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin && sudo usermod -aG docker $USER && sudo sh -c 'echo ""' && sudo install -m 0755 -d /etc/apt/keyrings && curl -fsSL https://pkg.ddev.com/apt/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/ddev.gpg/dev/null && sudo chmod a+r /etc/apt/keyrings/ddev.gpg && sudo sh -c 'echo ""' && echo "deb [signed-by=/etc/apt/keyrings/ddev.gpg] https://pkg.ddev.com/apt/ * *" | sudo tee /etc/apt/sources.list.d/ddev.list >/dev/null && sudo sh -c 'echo ""' && sudo apt update && sudo apt install -y ddev && mkcert -install && logout
- Log in again
- Activate docker using
sudo systemctl start docker && sudo systemctl enable docker
- Open GitHub Desktop and clone the Mautic repository into the Ubuntu home folder
- Go back to the Windows Terminal, in the Ubuntu option
- Use
cd /mautic
to get to the directory - Set up DDEV using
ddev config
- Give a name to the installation or press Enter to use “mautic”
- Press Enter again at the next prompt
- When asked for the project type, press Enter
- Finally start DDEV with
ddev start
- Use
- Access the Mautic installation at https://mautic.ddev.site/ (slow) or use the IP provided by the terminal (faster)
Troubleshooting
If any error occurred during the DDEV set up, you’ll be prompted to do a regular Mautic installation.
- Perform the installation
- Click Next on the first screen
- In Database Host, Name, Username and Password, fill in all with db
- Click Next
- Create your username and password and finish
- Log in
DDEV indicates that the address is already in use, what do I do?
Run the command docker stop $(docker ps -a -q)
to stop all active containers.
An error appears when accessing the link
Run the commands in the terminal, inside the folder:
ddev ssh
composer install && npm install
It stopped working and the app no longer opens, how can I solve it?
In Windows terminal, use the command wsl --unregister Ubuntu
.
Then do a clean install. It will work again (it’s better than racking your brains trying to fix it).
I deleted the folder to clone again, but GitHub says it is being used
Close VS Code before trying to clone again.