headless

The headless parameter is a Boolean value that allows you to force Liquibase to run without access to the console for input and output. By default, the value is false.

Uses

You can use the headless parameter when you run Liquibase in automation or with CI/CD tools. For example, when running commands, you may need to skip the prompt for Liquibase Hub Auto-Registration and Report Links to continue the automation. In this case, you can set the headless parameter to true to run commands without interaction.

If you run Liquibase in containers, the headless parameter will prevent Liquibase from trying to access the display, keyboard, or mouse.

Syntax

For more information, see Working with Command Parameters. You can set this parameter in the following ways:

Option Syntax
Liquibase properties file
liquibase.headless: <true|false>
Global CLI parameter
liquibase
 --headless=<true|false> update
 --changelog-file=mychangelog.xml

JVM system property

JAVA_OPTS Environment Variable

macOS/Linux:
JAVA_OPTS=-Dliquibase.headless=<true|false>
Windows:
set JAVA_OPTS=-Dliquibase.headless=<true|false>
Liquibase Environment Variables macOS/Linux:
LIQUIBASE_HEADLESS=<true|false>
Windows:
set LIQUIBASE_HEADLESS=<true|false>

Note: These commands only apply to the current shell. To set permanent environment variables, see Liquibase Environment Variables.