Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.

add-on registry CI last commit release

DDEV Lifna

Connect an existing DDEV Drupal project to a Lifna-hosted environment.

This add-on installs a native DDEV provider named lifna, so existing projects can use:

ddev pull lifna
ddev push lifna
ddev lifna status
ddev lifna spinup
ddev lifna pause

Code remains Git-first. The provider only syncs the database and Drupal public files, matching DDEV hosting-provider conventions.

Install

Requires DDEV v1.24.0+ and an existing DDEV Drupal project.

From a DDEV project root:

ddev add-on get Lifnaio/ddev-lifna
ddev restart

To test a local checkout while developing this add-on, use the same command with a local path, for example ddev add-on get /path/to/ddev-lifna.

Upgrade

Repeat the install command to update to the latest release:

ddev add-on get Lifnaio/ddev-lifna
ddev restart

Check the installed version with ddev add-on list --installed.

Connect A Project

In Lifna, open the site, choose Download for DDEV / local development, then use the DDEV access token card. The direct URL is:

https://app.lifna.io/sites/<site-slug>/export

Choose Account-wide token to reuse one token across every Lifna site you can access, or choose a specific environment for a narrower token. Select the allowed actions, click Create DDEV token, and copy the one-time token.

Then run:

ddev lifna connect \
  --site=my-site \
  --environment=main

Paste the token when prompted.

For local Lifna platform development only, set LIFNA_DEV_MODE=1 or pass --dev with --base-url when connecting to a local HTTPS or localhost URL.

The command writes:

Both are ignored locally by generated .gitignore files.

Daily Workflow

ddev lifna status
ddev pull lifna
ddev push lifna
ddev lifna pause
ddev lifna spinup
ddev lifna open

ddev pull lifna downloads the Lifna database and public files into the DDEV project.

ddev push lifna uploads the local database and public files back to the scoped Lifna environment. Pushes to protected environments such as main, live, prod, or production require a typed confirmation.

What Has Been Tested

Automated tests cover:

Limitations

Security Model

The add-on uses a Lifna local access token created in the Lifna UI. Tokens can be account-wide or scoped to one site/environment, and always carry limited actions plus an expiry date. Lifna still checks your account permissions for the requested site on every API call.

Tokens are read from the secure prompt during ddev lifna connect or from LIFNA_TOKEN. Do not pass tokens as command-line arguments and do not commit .ddev/lifna/.env.

Production connections default to https://app.lifna.io unless explicit dev mode is enabled.

Testing

The test suite is written with Bats and includes shell-level security tests plus a DDEV install smoke test.

bash -n commands/host/lifna lifna/client.sh
shellcheck commands/host/lifna lifna/client.sh
yamllint .
bats tests

GitHub Actions runs the same lint checks and uses DDEV’s add-on test action to install the add-on into a disposable DDEV project.

Publish

The recommended GitHub repo name is ddev-lifna, with the ddev-get topic added for DDEV add-on discovery.

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.