Skip to main content
Version: 3.19.0

APISIX CLI

The APISIX CLI is the apisix runtime command bundled with Apache APISIX. Use it to initialize, start, stop, reload, and test an APISIX instance.

apisix [action] <argument>

Commands​

apisix help​

Print the APISIX CLI help menu.

apisix init​

Initialize the nginx.conf configuration.

apisix init_etcd​

Initialize data in etcd.

apisix start​

Initialize and start the APISIX instance.

Options:

  • -h or --help: print help menu.

  • -c or --config: specify the path to the custom configuration file when starting APISIX. For example:

    apisix start -c /path/to/custom_config.yaml

    APISIX will fall back to the default configuration if -c is not set.

  • --verbose: show init_etcd debug information.

apisix stop​

Stop the running APISIX instance immediately. APISIX will stop all worker processes without waiting for them to finish serving any outstanding requests.

apisix quit​

Quit the running APISIX instance gracefully. APISIX will wait for all worker processes to finish serving any outstanding requests before stopping.

apisix restart​

Restart the APISIX instance. This command checks the generated nginx.conf configuration first before stopping and restarting APISIX.

apisix reload​

Reload the APISIX instance. Reinitialize nginx.conf and apply configuration changes without interrupting existing connections.

apisix test​

Test the generated nginx.conf to validate the configuration.

apisix version​

Print APISIX version.

The apisix command manages the APISIX process, not gateway resources such as routes and upstreams. For resource management, see Management Options.