How to set up Lando for Platform.sh on Windows 10

Dan Dinu
Dan Dinu
Dec 5, 2017 · 3 min read
Lando local development environment for Platform.sh

Most programmers on Platform.sh use a Linux machine or a Mac. However, there are times when using Windows is the only option. So, I am going to show you how to set up your Windows 10 machine to run a Platform.sh project using Lando.

1. Get Lando

Download Lando from here

2. Enable Hyper-V your Windows 10 machine

You need to enable Hyper-V to make Docker work.
Warning: Lando only works on Windows 10 as it requires Hyper-V

3. Install Lando

If you do not have Docker or GIT make sure you leave them checked. Lando will install them for you

4. Enable your SSH keys

Copy your SSH keys into
You need both the private key and public key present in the folder with this structure:
a.
b.
Ex: and

5. Enable password protected private key forwarding

Unless you work in a lab without internet you most likely have a password protected private key. You need to enable this manually in Lando. Here is how you do it:
a. Navigate to
b. Create/Edit
c. Add in the file

6. Create a .lando.yml file in your project folder

Navigate to you Platform GIT repo and create a file called there then paste the recommended config from Platform.sh.

One thing to remember is to modify the with a unique project name. if you leave this as is and you have multiple projects called , Lando will affect all of them when you run a command.

# Name the application the same as in your .platform.app.yaml.
name: app
# Use the recipe appropriate for your application.
recipe: drupal8

# The following additional build step will install the Platform CLI
# in the application container.
services:
appserver:
build:
- "curl -sS https://platform.sh/cli/installer | php"

# The following entry creates a `lando platform` command that will run
# any Platform CLI command from inside the container if desired.
tooling:
platform:
service: appserver
description: Run Platform CLI commands
cmd:
- /var/www/.platformsh/bin/platform
options:
passthrough: true

config:
# Lando defaults to Apache. Switch to nginx to match Platform.sh.
via: nginx

# Set the webroot to match your .platform.app.yaml.
webroot: _www

# Lando defaults to the latest MySQL release, but Platform.sh uses MariaDB.
# Specify the version to match what's in services.yaml.
database: mariadb:10.1

7. Run lando start

Navigate to you project using either or and run . This will start up your Lando server.

Note: You cannot use GITBash as it does not support TTY (I know, that sucks).

8. Do a lando platform build

In order to have you project set up inside the Lando environment you’ll need to run a command in the project folder.

In case you are getting related errors (utime or archiving errors) add a parameter so your command will look like this: .

9. Set up your Drupal 8 settings.local.php

In order to let your build connect to the lando docker machine, navigate to in your Platform.sh project folder and replace the contents of your with this:

<?php
/**
* @file
* An example settings.local.php file for Drupal.
*/
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
$config['advagg.settings']['enabled'] = FALSE;
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
// Add your database configuration here (and uncomment the block).
$databases['default']['default'] = array(
'driver' => 'mysql',
'host' => 'database',
'username' => 'drupal8',
'password' => 'drupal8',
'database' => 'drupal8',
'prefix' => '',
);

10. Import your database from platform

platform db:dump -f database.sql.gz
lando db-import database.sql.gz

11. Import your files

You need to run the file sync command like this:

lando platform mount:download

Frequently Asked questions

  • I am getting “Drush is not installed” when I run or similar.
    A: This is happening because the recipe does not include by default. You will need to add this to your :
config:
drush: global:8.1.15
  • I am getting a big Docker “file not found error” or “could not access file”.
    A: If you are experiencing file system errors, it might be because the share between Docker and you host system is broken. Go to Docker -> Settings and remove then re-add your file shares.