Type object
File match .lando.yml .lando.*.yml
Schema URL https://catalog.lintel.tools/schemas/schemastore/lando-landofile/latest.json
Source https://lando-community.github.io/lando-spec/landofile-spec.json

Validate with Lintel

npx @lintel/lintel check
Type: object

The configuration file for a Lando app.

Properties

name string

The name of the Lando app. This is used as the project name in Docker Compose and should be unique across all Lando apps on your system.

Examples: "mysite", "example-web-app", "867-5309"
minLength=1pattern=^[a-z0-9][a-z0-9_-]*$
recipe string

The recipe type used for the app. Recipes are pre-configured combinations of services and tooling that provide a complete development environment for common use cases. For example, the 'lamp' recipe provides Apache, MySQL and PHP, while 'drupal10' provides everything needed for Drupal 10 development including Drush.

Examples: "lamp", "drupal10", "wordpress", "mean", "pantheon", "laravel"
config object

Configuration options for specified recipe.

7 nested properties
via string

The web server type and version for serving the application. Can be apache, nginx, or cli. Optionally specify a version number after a colon (e.g. nginx:1.25). Apache is the default if not specified. The cli option runs PHP directly without a web server.

Default: "apache:2.4"
Examples: "apache:2.4", "nginx:1.25", "cli"
One of: const: "cli" const: "cli", variant
webroot string

The directory containing the web-accessible files, relative to the app root. This is where your index.php or other entry point files should be located. For Drupal sites this is often 'web' or 'docroot', for WordPress it's typically '.', and for other frameworks it varies. The path can include subdirectories using forward slashes. All web requests will be served from this directory.

Default: "."
Examples: "web", "docroot", "drupal/web"
php string

The PHP version for the app. This should be specified as a major.minor version number (e.g. '7.4' or '8.2'). For LAMP/LEMP based recipes, this determines the PHP version installed in the appserver container.

Examples: "7.3", "8.2"
database string

The database type and version for the app. Specify as type:version where type is the database type such as 'mysql' or 'mariadb'.

Examples: "mariadb:10.2", "mysql:8.0"
composer object

Global composer dependencies to install. This follows composer.json syntax but in YAML format.

Examples: {"phpunit/phpunit":"^6.5"}
composer_version string | number | boolean

The version of Composer to install. Can be a specific version number or release channel alias.

Xdebug configuration for the app. This can be a boolean or a string of modes to enable.

Default: false
Examples: "true", "debug,develop"
One of: boolean boolean, string string
env_file string[]

List of .env files to load into all services.

Examples: [".env"], [".lando/mysql_vars.env",".lando/drupal_vars.env"], ["drupal/.env","frontend/.env"]
excludes string[]

List of directories to exclude from syncing to the Lando services. This is a performance optimization feature that prevents large directories like vendor and node_modules from being synced between host and container filesystems, which can significantly improve startup time and reduce disk I/O. Use ! prefix to negate an exclusion pattern.

Examples: ["vendor","web/modules/contrib","!web/modules/contrib/webform"], ["node_modules"]
services object

Define custom services for your Lando app. Each service runs in its own container and can be configured with specific options like type, build commands, ports, and more. Service names must be unique and can contain letters, numbers, dots, and hyphens. Common services include web servers, databases, caching layers, and build tools.

Examples: {"appserver":{"type":"php:8.2","build":["composer install"]},"node":{"type":"node:20","build":["npm install"],"command":"vite --host 0.0.0.0","port":"5173","ssl":true}}
proxy object

Proxy configuration for Lando services

Examples: {"appserver":"myapp.lndo.site"}, {"node":"myapp.lndo.site:5173"}
tooling object

Define custom CLI commands that can be run via 'lando '. Each command can run in one or more services and can execute shell commands, scripts, or other tools. Commands can be configured with options like service target, description, and user context. Common uses include running package managers (composer, npm), build tools (webpack, gulp), testing frameworks (phpunit, jest), and database operations (mysql, drush). Commands can be chained together and run in parallel or sequence.

Examples: {"install":{"description":"Install dependencies for the project across multiple services.","cmd":[{"appserver":"composer install"},{"node":"npm install"}]},"build":{"description":"Build the project using a single service.","service":"appserver","cmd":["composer install","scripts/build.sh"]},"push":"disabled"}
events object

Attach commands to Lando events hooks.

compose string[]

List of docker-compose files to include.

Examples: ["compose.yml"]
plugins object

Lando plugins to load.

Definitions

compose
proxy object

Proxy configuration for Lando services

Examples:
  • { "appserver": "myapp.lndo.site" }
  • { "node": "myapp.lndo.site:5173" }
service object

Configuration for a Lando service. Services are the core building blocks of a Lando app, representing containers that provide functionality like web servers, databases, caching, etc. Each service can be customized with build steps, runtime configuration, port mapping, and plugin-specific settings.

type string

The Lando service type to use for this service.

Examples: "node:22", "php:8.4", "nginx:1.27", "apache:2.4", "mysql:8.0", "lando"
Any of: const: "lando" const: "lando", const: "compose" const: "compose", variant, variant
api number

The Lando service API version used to define the service.

Default: 3
Values: 3 4
build string[]

Commands to run while the service is being built.

Examples: ["npm install"]
build_as_root string[]

Commands to run as the root user while the service is being built.

Examples: ["apt-get update","apt-get install -y curl"]
run string[]

Commands to run after the service is started.

Examples: ["drush config:import -y","drush cache:rebuild"]
run_as_root string[]

Commands to run as the root user after the service is started.

Examples: ["echo '127.0.0.1 mysite.lndo.site' >> /etc/hosts"]
ports string | number[]

Deprecated. Define ports under overrides or services instead.

ssl boolean | number

SSL configuration for the service.

Examples: 3000, false
sslExpose boolean

Expose SSL for the service.

portforward boolean | number

Forwards a port to the host OS. Use true to allow Docker to manage ports (recommended). You may also specify a port number, but there is risk of conflicting with other services or applications.

Examples: true, 3000
scanner boolean | object

Scanner configuration for the service.

services object
5 nested properties
image string

Docker image for the service.

Examples: "php:8.2-apache", "bitnami/mariadb:10.2", "node:14", "google/cloud-sdk:latest"
command string

Overrides the default command declared by the container image.

Examples: "docker-entrypoint.sh mysqld", "docker-entrypoint.sh sleep infinity", "docker-php-entrypoint apache2-foreground"
environment object | string[]

Environment variables for the service.

Examples: ["DB_STORAGE_TYPE=mongo","CONNECTION_STRING=mongodb://database:27017/mean"], {"GO_VERSION":"1.16.15","GOPATH":"/go"}
volumes string | object[]

Volumes for the service.

Examples: ["type: volume","source: go_path","target: /go"], ["./:/app","./default.conf.template:/etc/nginx/templates/default.conf.template"]
ports string[]

Ports for the service.

Examples: ["80","9222:9222"], ["8080","2345:2345"]
overrides object
5 nested properties
image string

Docker image for the service.

Examples: "php:8.2-apache", "bitnami/mariadb:10.2", "node:14", "google/cloud-sdk:latest"
command string

Overrides the default command declared by the container image.

Examples: "docker-entrypoint.sh mysqld", "docker-entrypoint.sh sleep infinity", "docker-php-entrypoint apache2-foreground"
environment object | string[]

Environment variables for the service.

Examples: ["DB_STORAGE_TYPE=mongo","CONNECTION_STRING=mongodb://database:27017/mean"], {"GO_VERSION":"1.16.15","GOPATH":"/go"}
volumes string | object[]

Volumes for the service.

Examples: ["type: volume","source: go_path","target: /go"], ["./:/app","./default.conf.template:/etc/nginx/templates/default.conf.template"]
ports string[]

Ports for the service.

Examples: ["80","9222:9222"], ["8080","2345:2345"]
hogfrom string[]

List of service names to capture mail from. The mhsendmail binary will be installed in each listed service.

Examples: ["appserver"]
composer object

Global composer dependencies to install. This follows composer.json syntax but in YAML format.

Examples: {"phpunit/phpunit":"^6.5"}
composer_version string | number | boolean

The version of Composer to install. Can be a specific version number or release channel alias.

Xdebug configuration for the app. This can be a boolean or a string of modes to enable.

Default: false
Examples: "true", "debug,develop"
One of: boolean boolean, string string
command string

Command to run when starting the service.

port string | number | boolean

Port to expose for the service. Set to false to disable port mapping. Values less than 1024 will cause the service to run as root.

Examples: "3000", 80, false
creds object

Database credentials configuration for MySQL and MariaDB services. Allows customizing the database user, password, and database name.

Examples: {"user":"drupal11","password":"drupal11","database":"drupal11"}, {"user":"steve","password":"doggie123","database":"drupal11"}
3 nested properties
user string required

The database username to create and use for connections.

Examples: "drupal11", "steve", "myapp"
minLength=1
password string required

The password for the database user.

Examples: "drupal11", "doggie123", "secure_password"
minLength=1
database string required

The name of the database to create.

Examples: "drupal11", "myapp", "wordpress"
minLength=1
app_mount boolean | string | string

Controls how the application codebase is mounted in the container. Lando automatically mounts your codebase at /app using the :cached performance optimization flag by default. Set to false or 'disabled' to prevent mounting, or specify a different Docker bind mount flag like 'ro' (read-only) or 'delegated'.

Examples: false, "disabled", "ro", "delegated"
environment object | string[]

Environment variables for the service.

Examples: ["DB_STORAGE_TYPE=mongo","CONNECTION_STRING=mongodb://database:27017/mean"], {"GO_VERSION":"1.16.15","GOPATH":"/go"}

Volumes for the service.

Examples: ["type: volume","source: go_path","target: /go"], ["./:/app","./default.conf.template:/etc/nginx/templates/default.conf.template"]
tool object
service string

The service to run the tool in. Required for single-service tooling.

Default: "appserver"
Examples: "appserver", "database"
cmd string | string | object[]

The command(s) to run for the tool. When service is not specified, cmd must be an array of objects with service names as keys.

Examples: "npm install", ["npm install","npm run build"], [{"database":"mysqldump > dbdump.sql"},{"appserver":"mycommand dbdump.sql"}]
description string

Description to help users understand the function of your tooling command.

dir string

The working directory to execute the command in.

Examples: "docroot", "/app"
user string

The user to run the tool as.

Default: "www-data"
Examples: "root"
env object

Environment variables to set before running the command.

Examples: {"COLUMNS":"80"}
level string

Set to app to enable interactive options for the command.

Values: "app"
options object
1 nested properties
environment object
4 nested properties
passthrough boolean

TODO

Default: true
alias string[]
describe string

Description of the environment option.

interactive object
mailhog
php