Today I'm going to detail how to install and run a Drupal 8 site on your local machine, and use either Lando or DDEV as the back-end. The same process should, in theory, work on a Mac and even in a WSL system on Windows 10 (you will need the Pro version, though), but ymmv.

First thing to do is get the required tools installed:

Docker: Composer:


If you have any issues, or need to install this for another operating system, I suggest checking the linked docs above.

  1. Update the apt package index:

    sudo apt-get update
  2. Install packages to allow apt to use a repository over HTTPS:

    sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
  3. Add Docker’s official GPG key:

    curl -fsSL | sudo apt-key add -

    Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.

    sudo apt-key fingerprint 0EBFCD88   
    pub   rsa4096 2017-02-22 [SCEA]
          9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
    uid           [ unknown] Docker Release (CE deb) <>
    sub   rsa4096 2017-02-22 [S]
  4. Use the following command to set up the stable repository.

    sudo add-apt-repository \
    "deb [arch=amd64] \
    $(lsb_release -cs) \
  5. Update the apt package index.

    sudo apt-get update
  6. Install the latest version of Docker CE and containerd, or go to the next step to install a specific version:

    sudo apt-get install docker-ce docker-ce-cli
  7. Verify that Docker CE is installed correctly by running the hello-world image.

    sudo docker run hello-world

This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits. If you see the message, you're good to go. If not, read the documentation I've linked to above to try figure out the problem.


Taken from

  1. Download and run the composer installer. Note that you should already have PHP installed. If you need to do that, this page should help:

    php -r "copy('', 'composer-setup.php');"
    php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    php composer-setup.php
    php -r "unlink('composer-setup.php');"
  2. I recommend installing it so that it can be used globally throughout your system:

    mv composer.phar /usr/local/bin/composer
  3. You should be able to run composer in your terminal and see the help output.


Taken from

  1. Download the latest package file from GitHub.

  2. Run the installer:

    sudo dpkg -i lando-stable.deb
  3. If your distro uses a docker group, make sure your user is a member of it:

    sudo usermod -aG docker $USER

    You will need to log out for this change to take effect. Sometimes a reboot is necessary.

  4. Run lando in the terminal and you should see the default help output. If not, check out the linked documentation for more help.


Taken from

  1. Run the following command to install DDEV:

    curl -L | bash
  2. On variants of Linux you may be prompted for additional package installation to get certutil installed, but you can follow the instructions given by mkcert:

    mkcert -install
  3. Run ddev in the terminal and you should see the help message. If not, check out the documentation for help.


Taken from

If you've made it this far - congrats! Hopefully you didn't have too many issues. Let's get Drupal installed now.

  1. Download Drupal with composer (change my_site_name_dir to the directory name you want to install Drupal into):

    composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --no-interaction
  2. This will download the current dev version of the 'drupal-composer/drupal-project' project into a folder named 'mysitename_dir' and then automatically executes composer install which will download the latest stable version of Drupal 8 and all its dependencies.

  3. Now you get to choose your back-end system to run your site. You don't need both, although you could run both if you really wanted to.

Running Drupal on DDEV

(Scroll down for Lando instructions.)

  1. To use DDEV as your back-end, run the following command i your root folder and follow the prompts (it should auto-detect all the settings, but you might have to set a url-friendly project name):

    ddev config
  2. To start your database and web server containers run:

    ddev start
  3. It will take some time to download all the required bits and pieces, but when restarting later on, it will be much faster.

  4. If you get an error about port 443 being in use, edit .ddev/config/yaml and change these lines:

    router_http_port: "80"
    router_https_port: "443"


    router_http_port: "8080"
    router_https_port: "8443"

    then run

    ddev start
  5. You can, in theory, use any port numbers you want, but these are fairly standard practice ones for local development.

  6. You should see the following message (or something similar) if everything worked properly:

    Successfully started my-site 
    Project can be reached at,
  7. Now go to and you should see the Drupal install page.

Running Drupal on Lando

  1. Run lando init in the root folder of your site. The prompts don't seem to auto-detect all the settings, so I'll detail each option here.

  2. Select current working directory for the first option.

  3. Choose drupal8 for the recipe you want to use. If you plan to host on Pantheon, you can choose that as your recipe.

  4. For the webroot, enter web as that is the folder where your Drupal codebase is installed.

  5. Now run lando start to get things going.

  6. Lando installs faster than DDEV (at least on my system), and it generates seemingly random port numbers, so you shouldn't get any clashes with ports in use. You should see the following message is all goes well:

    Your app has started up correctly.
    Here are some vitals:
    NAME            my-lando-app                       
    LOCATION        /var/www/html/my_site_name_dir     
    SERVICES        appserver, database                
    APPSERVER URLS  https://localhost:32790            
  7. Open up one of the provided urls in your browser and you should see the Drupal install screen. Note that the https urls wil give you warnings in Chrome and Firefox, but you're good to accept the risks and load the pages anyway. DDEV does not have this issue.

So there you have it. A good local dev setup for Drupal 8, using Docker's container system as the back-end - you get to choose which implementation you prefer. I've used both and don't really have a preference, tbh. Both work well and sites load quickly in each.

Lando does seem to be a bit faster to setup, and has some nice recipes to set things up e.g. for Pantheon. DDEV uses the standard ports for serving sites, and has a trusted root certificate (via the mkcert step), so you don't get warnings about https connections.