Lando on WSL2

I think Lando is amazing. A big thank you to all those involved in creating it and thereby making container based development significantly easier. It's amazing how much easier to is to work with Docker and containers and such. This is especially true if want to do things like have a local SSL (so you can have an HTTPS permalink).

If you've previously visited this tutorial, much has changed over the past couple of years. In early 2024, with the release of Lando v3.21, installation a breeze. However, there are two ways to proceed until the release of v4.0, when you'll have full control over "build engine". Let's cover these two options now.

Before we do though, we need to make sure you have a clean WSL instance. If you do already, skip ahead to the next section. If don't have WSL installed or have previously installed WSL, please review the various documentation from Microsoft. I will provide this quick tip though for anyone doing a first time install. From your Windows command line (running as an administrator) all you need to do is enter this command: wsl --install. One other tip, you can also install NodeJS via nvm, as per Microsoft's recommendations.

Option #1 - Use Docker Desktop (in Windows).

This is the current default way to roll with Lando, though not my personal preference. However, it is extremely easy to set up. There is actually only one command to run.

  • Go to your WSL command line, and as noted in the Lando Linux docs, enter this command:
  • /bin/bash -c "$(curl -fsSL https://get.lando.dev/setup-lando.sh)"

That's seriously it. Your work is done.

Option #2 - Use Docker Engine (in WSL).

As mentioned above, until Lando 4.0, we need to get a big sneaky about things. It's not the Lando recommended way, but I've had no issues running as such for many months and I prefer it this way.

Get ready for Lando Installation

  • Since we are keeping everything within WSL, you obviously need to go to your WSL command line for the rest of this journey.
  • As is usually a good habit before adding stuff to your Linux instance, you should first run:
    sudo apt update && sudo apt upgrade

Install Docker Engine

  • This is very easy and we can just follow the Docker documentation for this. But, I would stay only follow Step 1 & Step 2, then come back here for what to do next...
  • Now we need to "manage Docker as a non-root user". This sounds tricky but it's not hard at all. You just run the following commands:
    • sudo groupadd docker
    • sudo usermod -aG docker $USER
    • newgrp docker
  • Next, despite the advice that this should have taken effect, I've found you have to restart WSL, so go to your Windows command line and use wsl --shutdown and wait for WSL to shutdown. Then you can restart / reload it and move on to the next step.

Install Lando (with some tweaks)

Alright, we are now ready to install Lando. However, we have to do a few tweaks (hacks??) to make sure things run smoothly.

First thing, head back into your WSL instance, and make sure you are in your user home folder. In there you are going to create the Lando folder and a config file within it in advance. Please do the following:

  • mkdir .lando
  • cd .lando
  • Now we need to create the config file. I just use nano as it's quick and easy for small text files. So I suggest you do this: nano config.yml
  • That config file needs the following lines:
setup:
  buildEngine: false

We are now ready to install Lando. With the above config tweak the Lando installer will not try to install Docker Desktop. This is what we want since we are using Docker Engine and already have that installed. We are actually now back to just doing the same thing I listed in Option #1:

  • Go to your WSL command line, and as noted in the Lando Linux docs, enter this command:
  • /bin/bash -c "$(curl -fsSL https://get.lando.dev/setup-lando.sh)"

All that is left to do now is to restart your WSL environment. That is easily done by using wsl --shutdown from your Windows command line. I actually like to reboot my machine at this point, but it's really not necessary. :)

Fire up Lando (aka, your first container)

All done! Now sit back and enjoy the latest Lando and Docker all within your WSL2. Hooray!

  • Run the lando init command in a project folder somewhere in your WSL and you are on your way to Lando / Docker glory.

Photo by Casey Horner on Unsplash

© 2025 Creative Logic Tech Solutions.