drupal / drupack
Installs drupack, which serves a Drupal project with its own PHP and web server, into the project root.
Package info
git.drupalcode.org/project/drupack.git
Type:composer-plugin
pkg:composer/drupal/drupack
Requires
- php: >=8.1
- composer-plugin-api: ^2
- composer-runtime-api: ^2.2
- composer/semver: ^3
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 1.0.0-rc15
- 1.0.0-rc14
- 1.0.0-rc13
- 1.0.0-rc12
- 1.0.0-rc11
- 1.0.0-rc10
- 1.0.0-rc9
- 1.0.0-rc8
- 1.0.0-rc7
- 1.0.0-rc6
- 1.0.0-rc5
- 1.0.0-rc4
- 1.0.0-rc3
- 1.0.0-rc2
- 1.0.0-rc1
- 1.0.0-beta23
- 1.0.0-beta22
- 1.0.0-beta21
- 1.0.0-beta20
- 1.0.0-beta19
- 1.0.0-beta18
- 1.0.0-beta17
- 1.0.0-beta16
- 1.0.0-beta15
- 1.0.0-beta14
- 1.0.0-beta13
- 1.0.0-beta12
- 1.0.0-beta11
- 1.0.0-beta10
- 1.0.0-beta9
- 1.0.0-beta8
- 1.0.0-beta7
- 1.0.0-beta6
- 1.0.0-beta5
- 1.0.0-beta4
- 1.0.0-beta3
- 1.0.0-beta2
- 1.0.0-beta1
- 1.0.0-alpha12
- 1.0.0-alpha11
- 1.0.0-alpha10
- 1.0.0-alpha9
- 1.0.0-alpha8
- 1.0.0-alpha7
- 1.0.0-alpha6
- 1.0.0-alpha5
- 1.0.0-alpha4
- 1.0.0-alpha3
- 1.0.0-alpha2
- 1.0.0-alpha1
- 0.9.0
- 0.8.1
- 0.8.0
- 0.7.1
- 0.7.0
- 0.6.1
- 0.6.0
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
This package is auto-updated.
Last update: 2026-12-02 14:21:40 UTC
README
Drupack serves a Drupal project that you already have from one executable. The executable contains PHP, FrankenPHP and Caddy. It uses the project's own settings, database and Drush.
This package installs the drupack executable into a Composer project.
Install
composer require 'drupal/drupack:^1.0@RC'
./drupack
The package is a Composer plugin. Composer prompts once to ask whether to trust it, and y adds allow-plugins.drupal/drupack to composer.json. A run without a terminal, such as a deploy, needs that entry to be committed first:
composer config allow-plugins.drupal/drupack true
The plugin runs vendor/bin/drupack-install after every composer install and composer update, with or without --no-dev. A failed download fails the Composer command. A project that runs drupack-install from its own post-install-cmd or post-update-cmd scripts removes them.
drupack-install downloads the drupack release matching the package's version into the project root, and checks its SHA-256. It adds /drupack to the project's .gitignore, and creates that file in a git project without one. On Windows the executable is drupack.exe.
Composer runs no plugin under --no-plugins, and no install or update event under --no-scripts. A project installed either way runs vendor/bin/drupack-install by hand. A dev branch of the package has no release, so drupack-install exits with an error.
Serve the project
./drupack serves the project in the working directory, or in the directory that you pass after it. It exits with an error for a folder without Drupal core. It reads the docroot from the web root of the scaffold in composer.json, web by default.
The start prints a login link for one use through the Drush of the project. It returns the prompt once the project serves requests on http://127.0.0.1:3787, and continues to serve in the background. A project without Drush serves with no link.
./drupack stopstops it.--foregroundserves in the terminal instead.--listen IP:PORTpicks another address.--versionprints the release and the versions of FrankenPHP, PHP, Caddy and SQLite that it contains.
The settings.php file of the project sets the database, the paths of the files and the hash salt. Drupack writes nothing into the project. For a DDEV project, point settings.local.php at the database's published port on 127.0.0.1.
Drush and PHP
./drupack drush COMMANDruns the Drush of the project on the bundled PHP, from any directory inside the project../drupack dr COMMANDruns the command line of Drupal core the same way, on Drupal 11.4 and later../drupack composer COMMANDruns the Composer thatdrupackcontains, on the bundled PHP, in the project root../drupack php SCRIPT [ARGUMENTS]and./drupack php -r CODErun the bundled PHP.
drupack exits with an error for a project with a composer.lock that requires a PHP extension which the bundled PHP lacks. The message lists the extension and the packages that need it.
Linux builds
A Linux release publishes a glibc build and a musl build per processor. drupack-install installs the glibc build when the host has the glibc loader at glibc 2.28 or later, and the musl build otherwise. DRUPACK_LIBC set to glibc or musl overrides that pick:
DRUPACK_LIBC=musl vendor/bin/drupack-install
The unpacked runtime
The first start of a version unpacks PHP and Caddy into a cache directory. Later starts of that version reuse it.
- Linux:
~/.cache/drupack/runtime - macOS:
~/Library/Caches/drupack/runtime - Windows:
%LOCALAPPDATA%\drupack\runtime
DRUPACK_CACHE_DIR moves the cache. DRUPACK_CA_FILE sets a CA bundle for the HTTPS requests of PHP, such as one that contains the root certificate of a re-signing proxy.
More
The Drupack repository covers installing without Composer, verifying a download and building an executable of your own site.