Lando is a local development environment app made by the developers who built Kalabox. It is similar to Kalabox, but unlike Kalabox, is CLI only. Many of Lando CLI commands are the same as Kalabox, but there are some differences.

To get started using Lando, download the latest
.dmg
package on Github.

Before moving on, you might want to make sure Kalabox isn’t running any sites. Lando sites can be started and run at the same time as Kalabox sites as long as the Kalabox is spun up first, but I ran into an error when creating sites. The easiest way to shut down all Kalabox sites is to cd into the Kalabox directory, and run
kbox poweroff
. This command can take a couple minutes to run.

You will also want to make sure Docker is up-to-date before you begin by going opening Docker > Preferences.

Unlike Kalabox, Lando doesn’t need to run inside its own directory. You can create a Lando instance in any directory. I recommend not using the Kalabox directory, but anywhere else is fine. I created a Lando folder in my user directory so it’s next to Kalabox, but you might prefer to use your Sites directory.

After choosing a directory, you will need to create a folder for the site. This is a new step, since Kalabox created the site directory for us. Most of the time you’ll use the site name in Pantheon (ex: gfd-rdsn, foc-flst). If you are creating a local version of multi-dev environment you might want to change the name of the directory to match the multi dev (ex: oco-plnd, gfd-vote). After creating the site directory, you need to cd into the directory in terminal.

Terminal steps so far:
cd ~/Lando
mkdir foc-flst
cd foc-flst
The command to create a Lando instance from Pantheon will be familiar, but there are additional steps. Lando’s
init
command is similar to Kalabox’s
create
command, but
init
doesn’t pull down the database, uploads or spin up the site.

From your new site directory run:
lando init pantheon
You’ll be prompted to confirm your Pantheon email, and then be able to choose you site:

After the process is complete, you’ll get a confirmation notice:

At this point you have created a Lando instance, but it is not yet running. To start the site, run:
lando start

After the site is started, you’ll see a list of local URLs for the site. The site won’t load yet because the site’s database and files still need to be pulled down. You might want to copy the list for reference. I had success using the http://focflst.lndo.site:8000 and https://focflst.lndo.site, but to load the https site you will need to confirm a security exception in your browser.

To complete the process, you’ll pull the site down. Run:
lando pull
This will initiate a series of prompts, which will allow you to pull the codebase, database and files from dev, test, live or a multi-dev environment. (Depending on the project it may make sense to create a standalone instance for a multi-dev environment.)

That’s it! You should now be able to see the site in your browser. Keep in mind that you’re probably still in the site’s root directory so you’ll need to cd into the theme and run
bower install
and
npm install
before being able to run gulp.

Notes

Additional Lando commands are described in the documentation.

On new sites, the
.gitignore
file has been updated for Lando. Older sites may still need to have
.lando.yml
added to
.gitignore
. On Pantheon sites, the file is located in the root site directory. It can be opened in Terminal with this command.
open -a TextEdit .gitignore
When pulling a big site with lots of files (like OCO), the pull may abort before every file is downloaded. If this happens you can run:
lando pull --code=none --database=none --rsync
This command will not update the code or database, and will run rsync on files. Existing ones stay in place and missing files will resume downloading.

Older sites may need
*.lndo.site
whitelisted in typekit before fonts will load. The URL has been added to the Basecamp template to-do for Typekit setup.

If you encounter the error below when running
lando pull
, you’ll need to generate a machine token (name it Lando machine token), and use that token to run this command:
lando terminus auth:login --machine-token=[your-machine-token]
lando pull
should now run without an error.