---
title: "Configuration"
weight: 20
description: "Configuring the DOLPATH environment variable to connect Dolicli to your Dolibarr instance."
source_hash: "5e5f490b"
---

# Configuration

## DOLPATH environment variable

Dolicli needs to know the path to the `htdocs/` folder of your Dolibarr installation. This path is defined by the `DOLPATH` environment variable.

### One-off use

Prefix each command with the variable:

```bash
DOLPATH=/var/www/dolibarr/htdocs/ ./dolibarr user list
```

### Permanent use (session)

Export the variable for the current session:

```bash
export DOLPATH=/var/www/dolibarr/htdocs/
./dolibarr user list
```

### Permanent use (profile)

Add the following line to your `~/.bashrc` or `~/.zshrc` file:

```bash
export DOLPATH=/var/www/dolibarr/htdocs/
```

Then reload your profile:

```bash
source ~/.bashrc
```

## Default path

If `DOLPATH` is not defined, Dolicli looks for an `htdocs/` folder in the current directory. This behavior suits you if you place Dolicli at the root of your Dolibarr installation.

## Verification

To check that the connection works, run:

```bash
./dolibarr
```

If the configuration is correct, Dolicli displays the detected Dolibarr version and the list of available commands.

> **Warning:** the path must point to the `htdocs/` folder that contains Dolibarr's `master.inc.php` file. If the file is not found, Dolicli displays an error message and stops.

## Debug mode

Debug mode is enabled by default in the application configuration (`config/app.php`). It allows displaying detailed error messages in case of a problem.
