> 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-de/kilo-center/kilo-mioty-service-center/getting-started/installation-linux-host.md).

# Installation: Linux-Host

Installieren Sie KiloCenter auf einem Linux-Host ohne Docker — PostgreSQL, Redis, Mosquitto, TLS-Zertifikate und die vier KC-Dienste.

### Ziel

Führe KiloCenter ohne Docker aus, indem alle Abhängigkeiten direkt auf dem Host installiert werden.

### Schritt 1: Infrastruktur-Abhängigkeiten installieren

Installiere und starte diese Dienste auf dem Host:

* **PostgreSQL 18+** -- eine Datenbank erstellen mit dem Namen `kilocenter`
* **Redis 7+**
* **Mosquitto 2.0+**

### Schritt 2: TLS-Zertifikate generieren

Baue den Zertifikatsgenerator und generiere die Zertifikate, bevor du KC-Core konfigurierst oder startest:

```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
```

Ersetze `your-hostname.example.com` durch den FQDN oder die IP-Adresse, über die Basisstationen diesen Server erreichen. Für Tests nur lokal verwende `localhost`.

Dadurch werden vier Dateien erstellt in `KC-Core/certificates/`:

* `ca.crt` und `ca.key` -- CA-Zertifikat und privater Schlüssel
* `server.crt` und `server.key` -- Serverzertifikat und privater Schlüssel

Das Serverzertifikat enthält automatisch `localhost`, `127.0.0.1`und alle lokalen Netzwerk-IP-Adressen als SANs.

KC-Core startet ohne diese Dateien nicht. Um später zu erneuern, ohne die CA neu zu generieren, verwende `-server-only`:

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

Siehe Sicherheit für die vollständige certgen-Referenz und die Generierung von Clientzertifikaten.

### Schritt 3: KC-Core konfigurieren

Aktualisiere `kilocenter-modules/KC-Core/config.yaml` damit sie zu den Adressen deiner Host-Dienste passt. Wichtige Einstellungen:

* `storage.host` und `storage.port` -- PostgreSQL-Adresse (typischerweise `localhost:5432` bei Host-Installation)
* `storage.username` und `storage.password` -- Datenbankzugangsdaten
* TLS-Zertifikatspfade für BSSCI und SCACI

### Schritt 4: KC-Core bauen und starten

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

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

### Schritt 5: KC-Gateway bauen und starten

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

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

### Schritt 6: KC-Web starten

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

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

### Schritt 7: Überprüfen

* KC-Core-Health: <http://localhost:8086/health>
* KC-Gateway-Health: <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-de/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.
