---
title: "Installation"
weight: 10
description: "Downloading, installing and enabling the SmartAuth module for Dolibarr."
source_hash: "762cd45f"
---

# Installation

## Download

Download the module from the [DoliStore](https://www.dolistore.com/) or from your CAP-REL customer area.

## Installing the module

1. Unzip the downloaded archive
2. Copy the `smartauth` folder into the `htdocs/custom/` directory of your Dolibarr installation
3. Install the Composer dependencies:

    ```bash
    cd htdocs/custom/smartauth
    composer install --no-dev
    ```

## Activation

1. Log in as a Dolibarr administrator
2. Go to **Home > Setup > Modules/Applications**
3. Search for "Smartauth" in the module list
4. Click the activation button

![SmartAuth module activation in the Dolibarr module list](screenshots/activation-module.webp)

The module automatically creates the required database tables upon activation.

## Verification

After activation, the **Tools > SmartAuth** menu appears in the left sidebar. You land on the module's dashboard.

## Accessing the configuration

Go to **Home > Setup > Modules > SmartAuth** to access the different configuration tabs:

- **Settings** -- General configuration (token lifetime, default user, logs, debug)
- **OAuth server** -- Activation and configuration of the OAuth2/OIDC server
- **GeoIP** -- Download and activation of the GeoIP database for geolocation
- **About** -- Module information and version

## Permissions

The module defines a read permission. Assign it to the users who need to access SmartAuth features:

1. Go to **Home > Users & Groups**
2. Open the record of the relevant user
3. In the **Permissions** tab, enable the "Read objects of SmartAuth" permission

> **Warning**: Only Dolibarr administrators have access to the module's configuration pages.

## Public SSO portal (optional)

If you enable the OAuth2/OIDC server, it is strongly recommended to expose the public SSO portal (`htdocs/custom/smartauth/public/`) on a dedicated subdomain (example: `https://auth.example.com`). This portal serves the login page, registration, password reset and the OIDC endpoints (`/.well-known/openid-configuration`, `/.well-known/jwks.json`, `/oauth/*`).

See the [Public SSO portal](/smartauth/oauth#portail-sso-public) section of the OAuth2/OIDC chapter for the complete Apache vhost configuration, the `/.well-known/` exception to add, and the Dolibarr constants to define (`SMARTAUTH_APP_URL`, `SMARTAUTH_REGISTRATION_ENABLED`, `SMARTAUTH_ACCOUNT_ENABLED`).
