Using Lando for local development

Lando is a container-based local development toolchain that plays nicely with It is maintained by Tandem, a 3rd party agency, but is a viable option for most projects.

See the Lando documentation for installing and setting up Lando on your system.

Lando will ask you to create a .lando.yml file in your application root, which functions similarly to the file. (Note the different file extension.) It is safe to check this file into your Git repository as will simply ignore it.

If your application is one of those with a specific "recipe" available from Lando, you can use that directly in your .lando.yml file. It can be customized further as needed for your application, and some customizations are specific to certain applications.

.lando.yml configuration

In particular, we recommend:

# Name the application the same as in your
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.
      - "curl -sS | php"

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

  # Lando defaults to Apache. Switch to nginx to match
  via: nginx

  # Set the webroot to match your
  webroot: web

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

Downloading data from into Lando

In most cases downloading data from and loading it into Lando is straightforward. If you have a single MySQL database then the following two commands, run from your application root, will download a compressed database snapshot and load it into the local Lando database container (and give you a cheap backup of the database in the process).

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

Rsync can download user files easily and efficiently. See the exporting tutorial for information on how to use rsync.