> 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/configuration-basics.md).

# Grundlagen der Konfiguration

KiloCenter-Konfigurationsdateien und Basiseinstellungen — config.docker.yaml, KC-Core, KC-Gateway, Portzuordnungen.

### Ziel

Verstehen und die grundlegende Laufzeitkonfiguration für eine lokale Bereitstellung überprüfen.

### Konfigurationsdateien

* `kilocenter-modules/config/config.docker.yaml` -- KC-Core-Konfiguration (Container-Modus)
* `kilocenter-modules/KC-Core/config.yaml` -- KC-Core-Konfiguration (Quellcode-Entwicklermodus)
* `kilocenter-modules/KC-Gateway/config.yaml` -- KC-Gateway-Konfiguration (Quellcode-Entwicklermodus)
* `kilocenter-modules/docker-compose.yml` -- Dienstdefinitionen und Portzuordnungen

### Standardwerte im Container-Modus

Im Container-Modus liest KC-Core `config/config.docker.yaml`. Alle Dienstadressen verwenden Docker-Service-DNS-Namen (z. B. `postgres`, `redis`, `mosquitto`). Umgebungsvariablen in `.env` überschreiben die Standardwerte von Compose.

### Standardwerte im Quellcode-Entwicklermodus

`kilocenter-modules/start-dev.sh` exportiert Umgebungsvariablen und erkennt den PostgreSQL-Port automatisch:

* Wenn der Docker-Container `kilocenter-postgres` ausgeführt wird, verwendet er Port `5433`.
* Andernfalls fällt er zurück auf `5432` für ein auf dem Host lokal laufendes PostgreSQL.

### Vor dem Testen zu überprüfende Einstellungen

* **Datenbank**: Host, Port, Zugangsdaten (Standard: `localhost:5433`, Benutzer `kilocenter`, Passwort `changeme`)
* **KC-Core-Status**: Port `8086`
* **KC-Gateway gRPC-Web**: Port `9090`
* **KC-Gateway-Status**: Port `8087`
* **BSSCI**: Port `5000`, TLS-Zertifikatspfade
* **SCACI**: Port `5001`, TLS-Zertifikatspfade
* **MQTT**: Broker-Host, Port und Zugangsdaten

### TLS-Zertifikatspfade

Die TLS-Zertifikatspfade für BSSCI und SCACI werden unter dem `protocol` Abschnitt in `KC-Core/config.yaml` (Quellcode-Entwicklermodus) oder `config/config.docker.yaml` (Container):

```yaml
protocol:
  bsci_tls:
    enabled: true
    cert_file: "certificates/server.crt"
    key_file: "certificates/server.key"
    ca_file: "certificates/ca.crt"
    min_version: "1.2"
  scaci_tls:
    enabled: true
    cert_file: "certificates/server.crt"
    key_file: "certificates/server.key"
    ca_file: "certificates/ca.crt"
    min_version: "1.3"
```

Die Pfade in der Quellcode-Entwicklerkonfiguration beziehen sich relativ auf das Arbeitsverzeichnis von KC-Core. Die Containerkonfiguration verwendet absolute Pfade (`/app/certificates/`). Generieren Sie Zertifikate vor dem ersten Start — siehe Docker-Compose-Installation.

### Standardanmeldedaten

Diese Standardwerte dienen der Bequemlichkeit bei der lokalen Entwicklung. Ändern Sie sie für jede nichtlokale Bereitstellung:

* PostgreSQL: Benutzer `kilocenter`, Passwort `changeme`
* MQTT-Broker: Benutzer `admin`, Passwort `KiloCenter`
* Standard-Login der AVA-Basisstation: `ubuntu` / `123456`

### MQTT-Integration

MQTT ist **standardmäßig deaktiviert** in `KC-Core/config.yaml`:

```yaml
mqtt:
  enabled: false
  host: "localhost"
  port: 1883
  username: "admin"
  password: "KiloCenter"
```

Um MQTT zu aktivieren, setzen Sie `enabled: true` und starten Sie KC-Core neu. Der Mosquitto-Broker muss laufen (er ist im Docker-Compose-Stack enthalten). Siehe MQTT First Steps für Integrationsdetails.

### Validierungs-Checkliste

* KC-Core startet ohne Fehler und `/health` antwortet auf Port `8086`
* KC-Gateway startet und `/health` antwortet auf Port `8087`
* **Container-Modus**: KC-Web lädt unter `http://localhost/`
* **Quellcode-Entwicklungsmodus**: KC-Web lädt unter `http://localhost:5173`
* KC-Web kann KC-Gateway auf Port erreichen `9090` (gRPC-web-Anfragen sind in der Browserkonsole erfolgreich)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kiloiot.io/kilo-docs-de/kilo-center/kilo-mioty-service-center/getting-started/configuration-basics.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
