# Installation sur Debian et Ubuntu

## Exigences matérielles

Weblate devrait fonctionner sur n’importe quel matériel moderne sans problème, ce qui suit est la configuration minimale requise pour faire fonctionner Weblate sur un seul hôte (Weblate, base de données et serveur Web) :

* 3 Go de RAM
* processeur à deux coeurs
* 1 Go d’espace de stockage

#### NOTE
Les exigences réelles pour votre installation de Weblate varient fortement en fonction de la taille des traductions qui y seront gérées.

### Utilisation de la mémoire

The more memory the better - it is used for caching on all
levels (file system, database and Weblate).
For hundreds of translation components, at least 4 GB of RAM is
recommended.

#### HINT
For systems with less memory than recommended, [Single-process Celery setup](https://docs.weblate.org/fr/latest/admin/install.md#minimal-celery) is recommended.

### Utilisation du processeur

Beaucoup d’utilisateurs concurrents augmentent le nombre nécessaire de coeurs du processeur.

Weblate 2026.8 introduced NumPy as a required dependency. On x86-64 systems,
the optimized NumPy build bundled in the Docker image requires an x86-64-v2
compatible CPU. Without the required CPU features, NumPy fails to load and
Weblate cannot start.

Before upgrading, check for the required SSE4.2 CPU feature on the Linux system
running Docker:

```sh
grep sse4_2 /proc/cpuinfo
```

Empty output indicates that a required CPU feature is unavailable. This is a
preliminary check; finding SSE4.2 does not verify all x86-64-v2 CPU features.

If Docker runs in a virtual machine, run the check inside the guest. Virtual
machines can hide CPU features supported by the host. Configure the virtual
machine to expose the required host CPU features, then reboot the guest. If
the physical CPU lacks the required features, upgrade the hardware.

### Utilisation du stockage

The typical database storage usage is around 300 MB per 1 million hosted words.

Storage space needed for cloned repositories varies, but Weblate tries to keep
their size minimal by doing shallow clones.

### Storage performance

Version control operations perform many filesystem metadata lookups. The
`vcs` subdirectory in [`DATA_DIR`](https://docs.weblate.org/fr/latest/admin/config.md#std-setting-DATA_DIR) therefore needs low read
latency; storage with slow metadata access can make operations such as
**git status** take a long time even when its bulk throughput is good.
Keep [`CACHE_DIR`](https://docs.weblate.org/fr/latest/admin/config.md#std-setting-CACHE_DIR) on low-latency local or temporary storage when
possible.

The deployment checks measure metadata lookup latency for both locations and
warn when the median latency exceeds 10 milliseconds. This is an approximate
point-in-time measurement affected by filesystem and system load. Rerun
**weblate check --deploy** before changing the storage configuration.

### Noeuds

For small and medium-sized sites (millions of hosted words), all Weblate components (see
[Architecture overview](https://docs.weblate.org/fr/latest/admin/install.md#architecture)) can be run on a single node.

When you grow to hundreds of millions of hosted words, it is recommended to
have a dedicated node for database (see [Configuration de la base de données pour Weblate](https://docs.weblate.org/fr/latest/admin/install.md#database-setup)).

## Installation

### Exigences du système

Installez les dépendances nécessaires à la construction des modules Python (voir [Exigences logicielles](https://docs.weblate.org/fr/latest/admin/install.md#requirements)) :

```sh
apt install -y \
   libxml2-dev libxslt-dev libfreetype6-dev libjpeg-dev libz-dev libyaml-dev \
   libffi-dev \
   libacl1-dev liblz4-dev libzstd-dev libxxhash-dev libssl-dev libpq-dev libjpeg-dev build-essential \
   python3-gdbm python3-dev git
```

Installez les dépendances facultatives souhaitées en fonction des fonctionnalités que vous souhaitez utiliser (voir [Dépendances python](https://docs.weblate.org/fr/latest/admin/install.md#python-deps)) :

```sh
apt install -y \
   libldap2-dev libldap-common libsasl2-dev \
   libxmlsec1-dev
```

Installez éventuellement les logiciels nécessaires au serveur de production, voir [Exécuter un serveur](https://docs.weblate.org/fr/latest/admin/install.md#server), [Configuration de la base de données pour Weblate](https://docs.weblate.org/fr/latest/admin/install.md#database-setup), [Tâches en arrière-plan utilisant Celery](https://docs.weblate.org/fr/latest/admin/install.md#celery). Selon la taille de votre installation, il peut être judicieux d’exécuter ces composants sur des serveurs dédiés.

Les instructions d’installation locale :

```sh
# Web server option 1: NGINX and uWSGI
apt install -y nginx uwsgi uwsgi-plugin-python3

# Web server option 2: Apache with ``mod_wsgi``
apt install -y apache2 libapache2-mod-wsgi-py3

# Caching backend: Valkey
apt install -y valkey-server

# Database server: PostgreSQL
apt install -y postgresql postgresql-contrib

# SMTP server
apt install -y exim4

# Gettext tools for gettext POT/PO update add-ons
apt install -y gettext
```

### uv package manager

#### HINT
Nous utilisons le gestionnaire de paquets uv pour installer Weblate.

```sh
curl -LsSf https://astral.sh/uv/install.sh | sh
```

#### SEE ALSO
[Installing uv](https://docs.astral.sh/uv/getting-started/installation/)

### Modules Python

#### HINT
We’re installing Weblate in a separate Python environment.

1. Create the Python environment for Weblate:
   ```sh
   uv venv ~/weblate-env
   ```
2. Activate the Python environment for Weblate:
   ```sh
   . ~/weblate-env/bin/activate
   ```
3. Install Weblate including all optional dependencies:
   ```sh
   # Install Weblate with all optional dependencies
   uv pip install "weblate[all]"
   ```

   Please check [Dépendances python](https://docs.weblate.org/fr/latest/admin/install.md#python-deps) for fine-tuning of optional dependencies.

#### SEE ALSO
* [Using Python environments](https://docs.astral.sh/uv/pip/environments/)
* [Troubleshooting pip install](https://docs.weblate.org/fr/latest/admin/install.md#troubleshoot-pip-install)

### Configurer Weblate

#### NOTE
The following assumes the Python environment used by Weblate is activated
(by executing `. ~/weblate-env/bin/activate`). If not, specify the full path
to the **weblate** command as `~/weblate-env/bin/weblate`.

1. Copy the file `~/weblate-env/lib/python3.9/site-packages/weblate/settings_example.py`
   to `~/weblate-env/lib/python3.9/site-packages/weblate/settings.py`.
2. Adjust the values in the new `settings.py` file to your liking. You will
   need to provide at least the database credentials and Django secret key, but
   you will want more changes for production setup, see [Ajuster la configuration](https://docs.weblate.org/fr/latest/admin/install.md#configuration).
3. Create the database and its structure for Weblate (the example settings use
   PostgreSQL, check [Configuration de la base de données pour Weblate](https://docs.weblate.org/fr/latest/admin/install.md#database-setup) for a production-ready setup):
   ```sh
   weblate migrate
   ```

   #### SEE ALSO
   [`migrate`](https://docs.weblate.org/fr/latest/admin/management.md#weblate-admin-migrate)
4. Create an administrator user account `admin`, generate its password, and copy it
   to the clipboard; remember to save it for later use:
   ```sh
   weblate createadmin
   ```

   #### HINT
   If you previously missed/lost the admin password, you can generate a new one with the following command:
   ```sh
   weblate createadmin --update
   ```

   #### SEE ALSO
   [`createadmin`](https://docs.weblate.org/fr/latest/admin/management.md#weblate-admin-createadmin)
5. Collect the static files for your web server (see [Exécuter un serveur](https://docs.weblate.org/fr/latest/admin/install.md#server) and [Distribution des fichiers statiques](https://docs.weblate.org/fr/latest/admin/install.md#static-files)):
   ```sh
   weblate collectstatic
   ```
6. Start the Celery workers. This is not necessary for development purposes, but
   strongly recommended otherwise. [Tâches en arrière-plan utilisant Celery](https://docs.weblate.org/fr/latest/admin/install.md#celery) has more info:
   ```sh
   celery --app=weblate.utils worker --beat \
       --queues=celery,notify,memory,translate,backup \
       --prefetch-multiplier=1
   ```
7. Start the development server ([Exécuter un serveur](https://docs.weblate.org/fr/latest/admin/install.md#server) details a production setup):
   ```sh
   weblate runserver
   ```

## Après installation

Félicitations, votre serveur Weblate est maintenant opérationnel et vous pouvez commencer à l’utiliser.

* Vous pouvez maintenant accéder à Weblate sur `http://localhost:8000/`.
* Sign in with admin credentials obtained during installation or register with new users.
* You can now run Weblate commands using **weblate** command when
  Weblate Python environment is active, see [Commandes de gestion](https://docs.weblate.org/fr/latest/admin/management.md#manage).
* You can stop the test server with `Ctrl`+`C`.
* Review potential issues with your installation either on `/manage/performance/` URL (see [Rapport de performance](https://docs.weblate.org/fr/latest/admin/admin.md#manage-performance)) or using **weblate check --deploy**, see [Configuration de production](https://docs.weblate.org/fr/latest/admin/install.md#production).

### Ajouter une traduction

1. Ouvrez l’interface d’administration (`http://localhost:8000/create/project/`) et créez le projet que vous souhaitez traduire. Voir [Configuration du projet](https://docs.weblate.org/fr/latest/admin/projects.md#project) pour plus de détails.

   Tout ce que vous devez préciser ici est le nom du projet et son site Web.
2. Créez un composant qui est l’objet réel de la traduction - il pointe vers le dépôt du système de contrôle de version, et sélectionne les fichiers à traduire. Voir [Configuration des composants](https://docs.weblate.org/fr/latest/admin/projects.md#component) pour plus de détails.

   The important fields here are: [Nom du composant](https://docs.weblate.org/fr/latest/admin/projects.md#component-name), [Dépôt du code source](https://docs.weblate.org/fr/latest/admin/projects.md#component-repo),
   and [Masque de fichier](https://docs.weblate.org/fr/latest/admin/projects.md#component-filemask) for finding translatable files. Weblate
   supports a wide range of formats including [GNU gettext PO (Portable Object)](https://docs.weblate.org/fr/latest/formats/gettext.md#gettext), [Ressources de chaînes Android](https://docs.weblate.org/fr/latest/formats/android.md#aresource),
   [Chaînes Apple iOS](https://docs.weblate.org/fr/latest/formats/apple.md#apple), [Propriétés Java](https://docs.weblate.org/fr/latest/formats/java.md#javaprop), [Format Stringsdict](https://docs.weblate.org/fr/latest/formats/stringsdict.md#stringsdict) or [Format Fluent](https://docs.weblate.org/fr/latest/formats/fluent.md#fluent), see
   [Localization file formats](https://docs.weblate.org/fr/latest/formats.md#formats) for more details.
3. Une fois ce qui précède terminé (cela peut être un processus long selon la taille de votre dépôt du système de contrôle de version, et le nombre de messages à traduire), vous pouvez commencer à traduire.
