---
title: "FAQ"
weight: 50
description: "Frequently asked questions about the installation, configuration and use of Dolicli."
source_hash: "39c8bd8a"
---

# FAQ

## Installation and configuration

### Dolicli displays "Dolibarr sources must be in htdocs subfolder or please set DOLPATH env var"

The `DOLPATH` environment variable is not defined or points to an incorrect path. Check that the path does contain the `master.inc.php` file:

```bash
ls /var/www/dolibarr/htdocs/master.inc.php
```

If the file exists, configure the variable:

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

### Which PHP version is needed?

Dolicli requires PHP 8.2 or higher. Check your version with:

```bash
php -v
```

### Does Dolicli work with PostgreSQL?

Most commands work with PostgreSQL. The `backup --database` command only supports MySQL/MariaDB for now. The `rebuild_sequences` repair action is specific to PostgreSQL.

## Usage

### How to get help for a command?

Add `--help` to any command:

```bash
./dolibarr user add --help
./dolibarr system upgrade --help
```

### The `user password` command fails without a clear message

Dolibarr's password security rules are applied (minimum length, complexity). Check the configuration in **Administration > Security > Passwords** of your Dolibarr. The `--force` option bypasses these rules:

```bash
./dolibarr user password login=admin --force
```

### The `module activate` command does not find the module

The `name` parameter expects the module's technical name (the PHP class name), for example `modFacture` and not `Facture`. Use `./dolibarr module list` to find the exact name.

### How to automate commands in a cron?

Specify the full path to PHP and to Dolicli, and export `DOLPATH`:

```bash
0 2 * * * DOLPATH=/var/www/dolibarr/htdocs/ /path/to/dolicli/dolibarr backup --database dir=/var/backups/dolibarr
```

## Security

### Is anonymization reversible?

No. Anonymization is final and irreversible. Always make a full backup before running the `anonymize run --confirm` command.

### Is the API token displayed in clear text?

Yes, the token is displayed only once when generated. It cannot be retrieved afterwards via Dolicli. Store it immediately in a password manager or a secure file.

### Does maintenance mode block API access?

Maintenance mode restricts connection to Dolibarr's web interface to a single user. API calls are not affected by this restriction.

### What is the `system cronkey` command for?

It manages the `CRON_KEY` constant, which corresponds to the `securitykey` parameter required in the URL `public/cron/cron_run_jobs.php?securitykey=...`. You can display it (`show`), replace it with a specific value (`set key=...`), generate a new one randomly (`generate`) or delete it (`clear`). Remember to update the system cron task that calls this script whenever you change the key.

## Troubleshooting

### "Command Not Found" while the command exists

Check the syntax: the category and the sub-command must be separated by a space. For example `./dolibarr user list` and not `./dolibarr userlist`.

### Special characters display badly in the terminal

Check that your terminal uses UTF-8 encoding. On Linux:

```bash
echo $LANG
```

The value must contain `UTF-8`, for example `fr_FR.UTF-8`.

### The `repair run` command seems to do nothing

By default, the command runs in `test` mode which displays the actions without executing them. To apply the changes, add `mode=confirmed`:

```bash
./dolibarr repair run action=clean_menus mode=confirmed
```
