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:
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
loadPassphraseProtectedKeys: true in the file
6. Create a .lando.yml file in your project folder
Navigate to you Platform GIT repo and create a file called
.lando.yml there then paste the recommended config from Platform.sh.
One thing to remember is to modify the
name: app with a unique project name. if you leave this as is and you have multiple projects called
app, Lando will affect all of them when you run a command.
# Name the application the same as in your .platform.app.yaml.
# Use the recipe appropriate for your application.
# The following additional build step will install the Platform CLI
# in the application container.
- "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.
description: Run Platform CLI commands
# Lando defaults to Apache. Switch to nginx to match Platform.sh.
# Set the webroot to match your .platform.app.yaml.
# Lando defaults to the latest MySQL release, but Platform.sh uses MariaDB.
# Specify the version to match what's in services.yaml.
7. Run lando start
Navigate to you project using either
PowerShell and run
lando start. 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
lando platform build command in the project folder.
In case you are getting
tar related errors (utime or archiving errors) add a
--no-archive parameter so your command will look like this:
lando platform build --no-archive.
9. Set up your Drupal 8 settings.local.php
In order to let your build connect to the lando docker machine, navigate to
.platform/local/shared in your Platform.sh project folder and replace the contents of your
settings.local.php with this:
* 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
lando drush statusor similar.
A: This is happening because the
drupal8recipe does not include
drushby default. You will need to add this to your
- 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.