Explain port 8001 security model in docs
This commit is contained in:
parent
25f19b6ada
commit
3ccc7f325d
@ -21,11 +21,15 @@ Ollama does not need to run on the same host — `OLLAMA_URL` can point to any r
|
||||
| `8000` | Proxy endpoint (OpenAI API) |
|
||||
| `8001` | Admin API + web interface |
|
||||
|
||||
Port 8001 must be exposed because the container serves the admin interface directly on this port. To restrict access to the local machine, bind it to `127.0.0.1` — this makes the port reachable only from the host, not from the network:
|
||||
Port 8001 must be exposed because the container serves the admin interface directly on this port. All API endpoints require the `ADMIN_PASSWORD` — without a valid token, only the public frontend files (HTML/JS/CSS of the login page) are accessible. The password is therefore the primary protection.
|
||||
|
||||
Additional hardening: binding to `127.0.0.1` restricts access to the local host and prevents direct network access:
|
||||
|
||||
```
|
||||
ports:
|
||||
- "127.0.0.1:8001:8001"
|
||||
- "127.0.0.1:8001:8001" # local access only
|
||||
# or:
|
||||
- "8001:8001" # network-wide, protected by ADMIN_PASSWORD only
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
@ -21,11 +21,15 @@ Ollama muss dabei nicht auf demselben Host laufen — `OLLAMA_URL` kann auf jede
|
||||
| `8000` | Proxy-Endpunkt (OpenAI-API) |
|
||||
| `8001` | Admin-API + Web-Oberfläche |
|
||||
|
||||
Port 8001 muss exposed werden, da der Container die Admin-Oberfläche selbst auf diesem Port ausliefert. Um den Zugriff auf den lokalen Rechner zu beschränken, die Portbindung auf `127.0.0.1` setzen — so ist der Port nur vom Host erreichbar, nicht aus dem Netzwerk:
|
||||
Port 8001 muss exposed werden, da der Container die Admin-Oberfläche selbst auf diesem Port ausliefert. Alle API-Endpunkte erfordern das `ADMIN_PASSWORD` — ein Zugriff ohne gültiges Token liefert nur die öffentlichen Frontend-Dateien (HTML/JS/CSS der Login-Seite). Das Passwort ist damit die primäre Schutzmaßnahme.
|
||||
|
||||
Zusätzliche Härtung: Portbindung auf `127.0.0.1` beschränkt den Zugriff auf den lokalen Host und verhindert direkten Netzwerkzugriff:
|
||||
|
||||
```
|
||||
ports:
|
||||
- "127.0.0.1:8001:8001"
|
||||
- "127.0.0.1:8001:8001" # nur lokal erreichbar
|
||||
# oder:
|
||||
- "8001:8001" # netzwerkweit, Schutz nur durch ADMIN_PASSWORD
|
||||
```
|
||||
|
||||
## Umgebungsvariablen
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user