Skip to content

Start the Devilbox

Start the Devilbox

After installation, use the dvl CLI to start and stop Devilbox. dvl is the canonical wrapper around Docker Compose for this project. It knows where your Devilbox checkout lives, starts the configured service roster, and keeps common workflows consistent across operating systems.

Before you start

Confirm your shell profile is loaded and the CLI is available:

Terminal window
command -v dvl
printf '%s\n' "$DEVILBOX_PATH"
printf '%s\n' "$DEVILBOX_CONTAINERS"

If dvl is not found, restart your terminal or source the profile printed by the installer. If DEVILBOX_PATH is empty, the CLI cannot locate the Devilbox repository.

Default container roster

New installations derive their default container list from env-example. The current source-of-truth default line is:

Terminal window
CONTAINERS_CONFIG_DEFAULT="bind httpd php mysql"

The installer also appends the optional roster to preserve the broader legacy start set:

Terminal window
CONTAINERS_CONFIG_OPTIONAL="php74 php81 php82 php83 php84 redis opensearch buggregator"

Together, those values become DEVILBOX_CONTAINERS in your shell profile. dvl up starts that list when no services are passed.

Start the default stack

Start Devilbox in the background:

Terminal window
dvl up

The CLI changes into DEVILBOX_PATH and runs the Compose start workflow for the configured service list. On first start, Docker pulls missing images, creates networks and volumes, and initializes service data where needed.

Common first-start events:

  • Docker pulls images that are not present locally.
  • The Bind DNS service starts on the configured DNS port.
  • The PHP service mounts your project directory at /shared/httpd.
  • The HTTPD service prepares the Devilbox intranet and mass-vhost configuration.
  • MySQL initializes a version-specific data volume if one does not already exist.
  • Redis, OpenSearch, Buggregator, and additional configured services start if they are in DEVILBOX_CONTAINERS.

Check running services

Use Docker or the CLI help for status checks. The most common command is:

Terminal window
dvl ps

If your installed CLI version does not expose ps, use Docker directly from the Devilbox directory:

Terminal window
cd "$DEVILBOX_PATH"
docker compose ps

For logs:

Terminal window
dvl logs

If dvl logs is not available in your installed version, use:

Terminal window
cd "$DEVILBOX_PATH"
docker compose logs -f

Start a smaller service set

The recommended way to change the default start set is editing DEVILBOX_CONTAINERS in your shell profile. For a minimal web/database stack:

Terminal window
export DEVILBOX_CONTAINERS="bind httpd php mysql"
dvl up

For a PHP and Redis workflow:

Terminal window
export DEVILBOX_CONTAINERS="bind httpd php redis"
dvl up

For a one-off Compose start of selected services, pass service names to raw Compose only when you intentionally bypass the CLI. Prefer updating DEVILBOX_CONTAINERS for repeatable day-to-day starts.

Service names

The current core services in docker-compose.yml are:

ServicePurposeDefault image selector
bindDNS servicefixed Bind image
phpDefault PHP-FPM workspacePHP_SERVER
httpdApache or Nginx web serverHTTPD_SERVER and HTTPD_FLAVOUR
mysqlMySQL/MariaDB/Percona databaseMYSQL_SERVER
pgsqlPostgreSQL databasePGSQL_SERVER
redisRedis cacheREDIS_SERVER
memcdMemcached cacheMEMCD_SERVER
mongoMongoDB databaseMONGO_SERVER

Additional optional services can be layered from files in compose/, such as OpenSearch, Mailpit, MailHog, Buggregator, Varnish, Solr, Ngrok, and agent stacks.

Open the Devilbox intranet

After dvl up succeeds, open the intranet in your browser:

http://localhost
https://localhost

The HTTP and HTTPS ports are controlled by .env:

Terminal window
HOST_PORT_HTTPD=80
HOST_PORT_HTTPD_SSL=443

If those ports are busy, change the variables before starting the stack.

Stop the Devilbox

Stop and remove containers cleanly:

Terminal window
dvl down

The CLI performs a stop/down workflow and removes stopped containers so the next start is fresh. Named volumes remain intact, so database data is preserved unless you remove volumes separately.

Restart services

Restart the full configured stack:

Terminal window
dvl restart

Restart one running service by name:

Terminal window
dvl restart php

When you change .env values that affect images, ports, or mounts, prefer a clean down/up cycle:

Terminal window
dvl down
dvl up

First-start troubleshooting

SymptomCheckFix
dvl command not foundcommand -v dvlRestart the terminal or add the symlink directory to PATH.
DEVILBOX_PATH emptyprintf '%s\n' "$DEVILBOX_PATH"Source the shell profile or set the variable manually.
Docker daemon errordocker infoStart Docker Desktop or the Linux Docker service.
Compose command errordocker compose versionInstall the Compose v2 plugin.
Port conflictdocker compose ps or OS port toolsChange HOST_PORT_* variables in .env.
DNS not resolvingTLD_SUFFIX and Bind logsUse lvh.me or configure DNS forwarding for your host.
HTTPD failsHTTPD logsCheck HTTPD_SERVER, HTTPD_FLAVOUR, and port availability.

Checklist

  • dvl up starts without errors.
  • dvl ps or docker compose ps shows the expected services.
  • The intranet opens at http://localhost or your configured HTTP port.
  • HTTPS opens at https://localhost or your configured HTTPS port.
  • Project files are under data/www or the path configured by HOST_PATH_HTTPD_DATADIR.
  • dvl down stops the environment cleanly.

Next step

Continue with Enter the PHP container to run tools inside the workspace container.