> For the complete documentation index, see [llms.txt](https://docs.kiloiot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kiloiot.io/kilo-docs-fr/kilo-center/kilo-mioty-service-center/getting-started/installation-linux-host.md).

# Installation : hôte Linux

Installez KiloCenter sur un hôte Linux sans Docker — PostgreSQL, Redis, Mosquitto, certificats TLS et les quatre services KC.

### Objectif

Exécutez KiloCenter sans Docker en installant toutes les dépendances directement sur l’hôte.

### Étape 1 : Installer les dépendances de l’infrastructure

Installez et démarrez ces services sur l’hôte :

* **PostgreSQL 18+** -- créer une base de données nommée `kilocenter`
* **Redis 7+**
* **Mosquitto 2.0+**

### Étape 2 : Générer les certificats TLS

Compilez le générateur de certificats et générez les certificats avant de configurer ou de démarrer KC-Core :

```bash
cd kilocenter-modules
go build -o KC-Core/certgen KC-Core/cmd/certgen/main.go
KC-Core/certgen -dir KC-Core/certificates -days 365 -server your-hostname.example.com
```

Remplacez `your-hostname.example.com` par le FQDN ou l’adresse IP que les stations de base utiliseront pour atteindre ce serveur. Pour des tests en local uniquement, utilisez `localhost`.

Cela crée quatre fichiers dans `KC-Core/certificates/`:

* `ca.crt` et `ca.key` -- certificat et clé privée de l’AC
* `server.crt` et `server.key` -- certificat et clé privée du serveur

Le certificat du serveur inclut automatiquement `localhost`, `127.0.0.1`, ainsi que toutes les adresses IP du réseau local comme SAN.

KC-Core ne démarrera pas sans ces fichiers. Pour renouveler plus tard sans régénérer l’AC, utilisez `-server-only`:

```bash
KC-Core/certgen -dir KC-Core/certificates -days 365 -server your-hostname.example.com -server-only
```

Consultez Sécurité pour la référence complète de certgen et la génération des certificats client.

### Étape 3 : Configurer KC-Core

Mettez à jour `kilocenter-modules/KC-Core/config.yaml` pour qu’il corresponde aux adresses des services de votre hôte. Paramètres clés :

* `storage.host` et `storage.port` -- adresse PostgreSQL (généralement `localhost:5432` pour une installation sur l’hôte)
* `storage.username` et `storage.password` -- identifiants de la base de données
* Chemins des certificats TLS BSSCI et SCACI

### Étape 4 : Compiler et démarrer KC-Core

Depuis `kilocenter-modules/KC-Core/`:

```bash
go build -o kilocenter ./cmd/kilocenter/
./kilocenter -config config.yaml
```

### Étape 5 : Compiler et démarrer KC-Gateway

Depuis `kilocenter-modules/KC-Gateway/`:

```bash
go build -o gateway ./cmd/gateway/
./gateway -config config.yaml
```

### Étape 6 : Démarrer KC-Web

Depuis `kilocenter-modules/KC-Web/`:

```bash
bun install
bun run dev
```

### Étape 7 : Valider

* État de santé de KC-Core : <http://localhost:8086/health>
* État de santé de KC-Gateway : <http://localhost:8087/health>
* KC-Web : <http://localhost:5173>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kiloiot.io/kilo-docs-fr/kilo-center/kilo-mioty-service-center/getting-started/installation-linux-host.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
