fix(env): clarify WEBUI_AUTH comment in .env.example #5
@@ -0,0 +1,39 @@
|
||||
|
|
||||
# d0a1 quickstart - configuracion por defecto
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Copia este archivo como .env y edita segun necesites:
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# cp .env.example .env
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# --- Puertos ----------------------------------------------------------------
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Puerto de Open WebUI (interfaz web)
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
WEBUI_PORT=3000
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Puerto de Ollama (API del motor de IA)
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
OLLAMA_PORT=11434
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# --- Seguridad --------------------------------------------------------------
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Si false, desactiva el login de Open WebUI.
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Recomendado solo para uso personal en local.
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# NO expongas el puerto a internet sin autenticacion. Mantener en true.
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Valores validos: true | false
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
WEBUI_AUTH=true
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Clave de sesion de Open WebUI. Cambiala en cualquier despliegue real.
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Genera una con: openssl rand -hex 32
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
WEBUI_SECRET_KEY=
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# --- Modelos ----------------------------------------------------------------
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Modelo que Open WebUI sugiere al usuario al registrarse.
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Requisitos de RAM aproximados (Q4_K_M):
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# llama3.2:1b - 1 GB
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# llama3.2:3b - 2 GB (por defecto, cualquiera con 8 GB puede)
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# qwen2.5:7b - 5 GB
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# llama3.1:8b - 5 GB
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# codellama:7b - 5 GB
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
DEFAULT_MODEL=llama3.2:3b
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Tiempo que Ollama mantiene un modelo en memoria tras la ultima peticion.
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Usa '0' para descargar el modelo tras cada uso (libera RAM).
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
# Usa '-1' para mantenerlo siempre cargado.
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
OLLAMA_KEEP_ALIVE=5m
|
||||
|
flama
commented
Confirmed clean: the new wording Confirmed clean: the new wording `Mantener en true.` removes the misleading inline `WEBUI_AUTH=${...true}` reference. The real default still comes from `docker-compose.yml` via `${WEBUI_AUTH:-true}` so the empty value in `.env.example` is intentional and correct. No further action needed in this file.
|
||||
@@ -1,10 +1,10 @@
|
||||
# Garantiza que los scripts se guarden con saltos de línea Unix (LF),
|
||||
# incluso en clones desde Windows. Evita que `bash deploy.sh` rompa
|
||||
# con errores tipo "$'\r': command not found" en WSL / Git Bash.
|
||||
*.sh text eol=lf
|
||||
*.bash text eol=lf
|
||||
# Normaliza todos los archivos de texto a LF en checkout/merge
|
||||
# para evitar problemas con deploy.sh en WSL/Git Bash.
|
||||
* text=auto eol=lf
|
||||
|
||||
# Documentación también en LF para consistencia.
|
||||
*.md text eol=lf
|
||||
*.yml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
# Tratar como binarios
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.ico binary
|
||||
*.msi binary
|
||||
*.pdf binary
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Configuracion local (no commitear - contiene secretos)
|
||||
.env
|
||||
|
||||
# Volumenes Docker (gestion por docker compose)
|
||||
# Si necesitas persistencia, los volumenes named se crean en docker volume ls.
|
||||
|
||||
# OS / editor cruft
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 d0a1.es
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -8,6 +8,12 @@ Un comando y tendrás un asistente de IA corriendo **en tu propia máquina**.
|
||||
Sin enviar datos a terceros. Sin pagar por tokens. Sin crear cuentas.
|
||||
Usa modelos de lenguaje de código abierto (Ollama) con una interfaz web moderna (Open WebUI).
|
||||
|
||||
Este repo forma parte del ecosistema **d0a1.es**: un conjunto de servicios
|
||||
self-hosted que demuestran que la IA útil no requiere ceder tus datos a
|
||||
terceros. El quickstart es la puerta de entrada: el resto de servicios
|
||||
(Gitea, mail, aplicaciones internas) están disponibles bajo el mismo paraguas
|
||||
en [d0a1.es](https://d0a1.es).
|
||||
|
||||
## Requisitos
|
||||
|
||||
| Requisito | Mínimo | Recomendado |
|
||||
@@ -17,21 +23,26 @@ Usa modelos de lenguaje de código abierto (Ollama) con una interfaz web moderna
|
||||
| Sistema | Linux, macOS, Windows (WSL2) | Linux |
|
||||
| Software | Docker + Docker Compose v2 | Docker + Docker Compose v2 |
|
||||
|
||||
> **Importante:** con 8 GB de RAM, usa modelos de hasta 7B cuantizados (Q4).
|
||||
> Los modelos de 8B funcionan en CPU pero pueden ralentizar el sistema bajo carga.
|
||||
|
||||
## Instalación
|
||||
|
||||
### Opción rápida (recomendada)
|
||||
|
||||
```bash
|
||||
git clone https://git.d0a1.es/devops/quickstart.git
|
||||
git clone https://git.d0a1.es/d0a1/quickstart.git
|
||||
cd quickstart
|
||||
cp .env.example .env
|
||||
./deploy.sh
|
||||
```
|
||||
|
||||
### Opción manual
|
||||
|
||||
```bash
|
||||
git clone https://git.d0a1.es/devops/quickstart.git
|
||||
git clone https://git.d0a1.es/d0a1/quickstart.git
|
||||
cd quickstart
|
||||
cp .env.example .env
|
||||
docker compose up -d
|
||||
# Esperar ~30s a que Ollama arranque
|
||||
docker exec d0a1-ollama ollama pull llama3.2:3b
|
||||
@@ -45,24 +56,40 @@ Abre tu navegador en **http://localhost:3000**
|
||||
- **Open WebUI** — Interfaz web tipo ChatGPT, pero local y privada.
|
||||
- **llama3.2:3b** — Modelo inicial ligero (~2 GB). Buen punto de partida.
|
||||
|
||||
## Configuración
|
||||
|
||||
Toda la configuración se gestiona vía el archivo `.env` (copia `.env.example`):
|
||||
|
||||
| Variable | Por defecto | Descripción |
|
||||
|----------|-------------|-------------|
|
||||
| `WEBUI_PORT` | 3000 | Puerto de Open WebUI |
|
||||
| `OLLAMA_PORT` | 11434 | Puerto de Ollama |
|
||||
| `WEBUI_AUTH` | `true` | Si `false`, desactiva el login. **Recomendado solo para uso personal en local** — no exponer a internet sin autenticación. |
|
||||
| `DEFAULT_MODEL` | `llama3.2:3b` | Modelo que Open WebUI sugiere al registrarse |
|
||||
| `OLLAMA_KEEP_ALIVE` | `5m` | Tiempo que Ollama mantiene un modelo en memoria tras usarlo |
|
||||
| `WEBUI_SECRET_KEY` | *(generar)* | Clave de sesión de Open WebUI. **Cámbiala en producción.** Genera una con: `openssl rand -hex 32` |
|
||||
|
||||
## Añadir modelos
|
||||
|
||||
Cuanta más RAM tengas, mejores modelos puedes usar:
|
||||
|
||||
```bash
|
||||
# Mejor en español (5 GB RAM)
|
||||
# Mejor en español (8 GB RAM)
|
||||
docker exec d0a1-ollama ollama pull qwen2.5:7b
|
||||
|
||||
# Más inteligente (6 GB RAM)
|
||||
# Más inteligente (8 GB RAM)
|
||||
docker exec d0a1-ollama ollama pull llama3.1:8b
|
||||
|
||||
# Para programar (5 GB RAM)
|
||||
# Para programar (8 GB RAM)
|
||||
docker exec d0a1-ollama ollama pull codellama:7b
|
||||
|
||||
# Listar modelos instalados
|
||||
docker exec d0a1-ollama ollama list
|
||||
```
|
||||
|
||||
> Los tiempos de respuesta de los modelos grandes son sensiblemente mejores
|
||||
> con GPU. En CPU funcionan, pero pueden tardar varios segundos por respuesta.
|
||||
|
||||
## Comandos
|
||||
|
||||
```bash
|
||||
@@ -74,17 +101,16 @@ docker exec d0a1-ollama ollama pull MODELO # Descargar otro modelo
|
||||
|
||||
## ¿Y después?
|
||||
|
||||
Esto es solo el principio. El stack completo d0a1 añade:
|
||||
Esto es solo el principio. El stack completo d0a1 incluye servicios
|
||||
auto-hospedados en [d0a1.es](https://d0a1.es):
|
||||
|
||||
- **git.d0a1.es** — Gitea, repositorios Git con Pull Requests y code review
|
||||
- **mail.d0a1.es** — Webmail SnappyMail
|
||||
- **app.d0a1.es** — Aplicaciones internas
|
||||
- **Hermes Agent** — Agente autónomo con memoria, skills y 14+ plataformas
|
||||
- **n8n** — Automatizaciones visuales sin código
|
||||
- **Qdrant** — Base de datos vectorial para búsqueda semántica
|
||||
- **WordPress** — CMS con IA integrada
|
||||
- **Correo, backups, HTTPS** — Todo automatizado
|
||||
|
||||
Si la IA local te sabe a poco, despliega el stack completo en un VPS:
|
||||
|
||||
**[d0a1.es/vps](https://d0a1.es/vps)** — Desde 6€/mes, todo incluido
|
||||
Todos los servicios son open source, usan solo HTTPS 443 y se pueden
|
||||
ejecutar en una sola máquina.
|
||||
|
||||
## Preguntas frecuentes
|
||||
|
||||
@@ -124,10 +150,31 @@ Esto ocurre sobre todo cuando se descarga el archivo desde un navegador
|
||||
en Windows o se edita con el bloc de notas. Con `git clone` desde
|
||||
cualquier sistema queda en LF automáticamente.
|
||||
|
||||
### El modelo no carga / `model requires more system memory`
|
||||
|
||||
Has intentado descargar un modelo demasiado grande para tu RAM. Elimínalo
|
||||
y prueba con uno más pequeño:
|
||||
|
||||
```bash
|
||||
docker exec d0a1-ollama ollama rm llama3.1:8b
|
||||
docker exec d0a1-ollama ollama pull llama3.2:3b
|
||||
```
|
||||
|
||||
### Open WebUI no arranca / `address already in use`
|
||||
|
||||
Tienes otro servicio en el puerto 3000 (o el que configuraste en `.env`).
|
||||
Cámbialo en `.env`:
|
||||
|
||||
```bash
|
||||
WEBUI_PORT=8080
|
||||
```
|
||||
|
||||
Y reinicia: `docker compose down && docker compose up -d`.
|
||||
|
||||
## Licencia
|
||||
|
||||
MIT. Usa, modifica y comparte libremente.
|
||||
|
||||
---
|
||||
|
||||
[d0a1.es](https://d0a1.es) — Humano decides, agente ejecuta.
|
||||
[d0a1.es](https://d0a1.es) — Humano decides, agente ejecuta.
|
||||
|
||||
@@ -1,116 +1,121 @@
|
||||
#!/bin/bash
|
||||
# ──────────────────────────────────────────────
|
||||
# d0a1 quickstart — IA agéntica local, sin coste
|
||||
# ──────────────────────────────────────────────
|
||||
# Ejecuta: curl -fsSL https://d0a1.es/quickstart | bash
|
||||
# o: ./deploy.sh
|
||||
# Abre: http://localhost:3000
|
||||
# ──────────────────────────────────────────────
|
||||
set -e
|
||||
#!/usr/bin/env bash
|
||||
# d0a1 quickstart deployment script
|
||||
# Sube Ollama + Open WebUI en Docker. Lee configuracion de .env.
|
||||
set -euo pipefail
|
||||
|
||||
# Colores
|
||||
GREEN='\033[0;32m'
|
||||
CYAN='\033[0;36m'
|
||||
YELLOW='\033[0;33m'
|
||||
RED='\033[0;31m'
|
||||
BOLD='\033[1m'
|
||||
NC='\033[0m'
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
echo ""
|
||||
echo -e "${BOLD}${CYAN}╔══════════════════════════════════════════╗${NC}"
|
||||
echo -e "${BOLD}${CYAN}║ d0a1 quickstart — IA local, sin coste ║${NC}"
|
||||
echo -e "${BOLD}${CYAN}╚══════════════════════════════════════════╝${NC}"
|
||||
echo ""
|
||||
# --- Color helpers -----------------------------------------------------------
|
||||
if [ -t 1 ]; then
|
||||
BOLD="\033[1m"; GREEN="\033[32m"; YELLOW="\033[33m"; RED="\033[31m"; RESET="\033[0m"
|
||||
else
|
||||
BOLD=""; GREEN=""; YELLOW=""; RED=""; RESET=""
|
||||
fi
|
||||
info() { printf "%b\n" "${BOLD}${GREEN}>>>${RESET} $*"; }
|
||||
warn() { printf "%b\n" "${BOLD}${YELLOW}>>>${RESET} $*"; }
|
||||
err() { printf "%b\n" "${BOLD}${RED}>>>${RESET} $*" >&2; }
|
||||
|
||||
# ── 1. Comprobar Docker ──────────────────────
|
||||
echo -e "${YELLOW}[1/4]${NC} Comprobando Docker..."
|
||||
# --- Pre-flight checks -------------------------------------------------------
|
||||
|
||||
if ! command -v docker &>/dev/null; then
|
||||
echo -e "${RED}✗ Docker no está instalado.${NC}"
|
||||
echo ""
|
||||
echo "Instálalo primero:"
|
||||
echo " Linux: curl -fsSL https://get.docker.com | sh"
|
||||
echo " macOS: https://docs.docker.com/desktop/install/mac-install/"
|
||||
echo " Windows: https://docs.docker.com/desktop/install/windows-install/"
|
||||
echo ""
|
||||
echo "Y vuelve a ejecutar este script."
|
||||
exit 1
|
||||
if ! command -v docker >/dev/null 2>&1; then
|
||||
err "Docker no esta instalado. Instala Docker Desktop o docker-ce."
|
||||
err "https://docs.docker.com/get-docker/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! docker compose version &>/dev/null; then
|
||||
echo -e "${RED}✗ Docker Compose v2 no está disponible.${NC}"
|
||||
echo "Actualiza Docker: https://docs.docker.com/compose/install/"
|
||||
exit 1
|
||||
if ! docker info >/dev/null 2>&1; then
|
||||
err "Docker daemon no responde. Inicia Docker Desktop o el servicio."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}✓${NC} Docker encontrado: $(docker compose version --short 2>/dev/null || echo 'OK')"
|
||||
|
||||
# ── 2. Comprobar RAM ────────────────────────
|
||||
echo -e "${YELLOW}[2/4]${NC} Comprobando memoria..."
|
||||
|
||||
TOTAL_RAM_KB=$(grep MemTotal /proc/meminfo 2>/dev/null | awk '{print $2}' || echo "0")
|
||||
TOTAL_RAM_GB=$((TOTAL_RAM_KB / 1024 / 1024))
|
||||
|
||||
if [ "$TOTAL_RAM_GB" -lt 6 ]; then
|
||||
echo -e "${RED}✗ Se necesitan al menos 8 GB de RAM (detectado: ${TOTAL_RAM_GB} GB).${NC}"
|
||||
echo "El modelo de IA necesita memoria para funcionar."
|
||||
exit 1
|
||||
if ! docker compose version >/dev/null 2>&1; then
|
||||
err "Docker Compose v2 no esta disponible. Actualiza Docker."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}✓${NC} RAM: ${TOTAL_RAM_GB} GB"
|
||||
# --- Config ------------------------------------------------------------------
|
||||
|
||||
# ── 3. Descargar y arrancar ─────────────────
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
COMPOSE_FILE="$SCRIPT_DIR/docker-compose.yml"
|
||||
|
||||
if [ ! -f "$COMPOSE_FILE" ]; then
|
||||
echo -e "${RED}✗ No encuentro docker-compose.yml junto a este script.${NC}"
|
||||
echo "Asegúrate de ejecutarlo desde la carpeta quickstart/."
|
||||
exit 1
|
||||
if [ ! -f .env ]; then
|
||||
warn "No existe .env, copiando .env.example"
|
||||
cp .env.example .env
|
||||
info "Edita .env si quieres cambiar puertos o el modelo por defecto."
|
||||
fi
|
||||
|
||||
echo -e "${YELLOW}[3/4]${NC} Descargando contenedores (primera vez tarda 2-3 minutos)..."
|
||||
docker compose -f "$COMPOSE_FILE" up -d
|
||||
# Carga .env sin requerir bash 4+ (compatible con macOS)
|
||||
set -a
|
||||
# shellcheck disable=SC1091
|
||||
. ./.env
|
||||
set +a
|
||||
|
||||
# ── 4. Descargar modelo ─────────────────────
|
||||
echo -e "${YELLOW}[4/4]${NC} Descargando modelo de IA (llama3.2:3b, ~2 GB)..."
|
||||
echo " Esto también solo ocurre la primera vez."
|
||||
WEBUI_PORT="${WEBUI_PORT:-3000}"
|
||||
DEFAULT_MODEL="${DEFAULT_MODEL:-llama3.2:3b}"
|
||||
|
||||
# Esperar a que Ollama responda
|
||||
echo " Esperando a que Ollama arranque..."
|
||||
MAX_WAIT=60
|
||||
WAITED=0
|
||||
until docker exec d0a1-ollama ollama ps &>/dev/null; do
|
||||
sleep 2
|
||||
WAITED=$((WAITED + 2))
|
||||
if [ "$WAITED" -ge "$MAX_WAIT" ]; then
|
||||
echo -e "${RED}✗ Ollama no arrancó en ${MAX_WAIT}s. Revisa los logs:${NC}"
|
||||
echo " docker logs d0a1-ollama"
|
||||
exit 1
|
||||
fi
|
||||
# --- Memoria del sistema (Linux + macOS) -------------------------------------
|
||||
|
||||
total_ram_gb() {
|
||||
case "$(uname -s)" in
|
||||
Linux)
|
||||
awk '/MemTotal/ {printf "%d\n", $2/1024/1024}' /proc/meminfo
|
||||
;;
|
||||
Darwin)
|
||||
sysctl -n hw.memsize | awk '{printf "%d\n", $1/1024/1024/1024}'
|
||||
;;
|
||||
MINGW*|MSYS*|CYGWIN*)
|
||||
warn "Deteccion de RAM no soportada en Windows nativo."
|
||||
warn "Usa WSL2 o asume 8 GB como baseline seguro."
|
||||
echo "0"
|
||||
;;
|
||||
*)
|
||||
echo "0"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
RAM_GB=$(total_ram_gb)
|
||||
|
||||
# --- Arranque ----------------------------------------------------------------
|
||||
|
||||
info "Levantando servicios (esto puede tardar unos segundos)..."
|
||||
docker compose up -d
|
||||
|
||||
info "Esperando a que Ollama este listo..."
|
||||
TIMEOUT=60
|
||||
ELAPSED=0
|
||||
until docker exec d0a1-ollama ollama list >/dev/null 2>&1; do
|
||||
sleep 2
|
||||
ELAPSED=$((ELAPSED + 2))
|
||||
if [ "$ELAPSED" -ge "$TIMEOUT" ]; then
|
||||
err "Ollama no arranco en ${TIMEOUT}s. Revisa 'docker compose logs ollama'."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
docker exec d0a1-ollama ollama pull llama3.2:3b
|
||||
# grep -qF hace match literal (sin regex), evitando que un punto en el
|
||||
# nombre del modelo (p.ej. qwen2.5:7b) actue como wildcard.
|
||||
# --- Modelo por defecto ------------------------------------------------------
|
||||
|
||||
# ── Listo ────────────────────────────────────
|
||||
echo ""
|
||||
echo -e "${BOLD}${GREEN}¡Listo! Tu IA local está corriendo.${NC}"
|
||||
echo ""
|
||||
echo -e " ${BOLD}Abre tu navegador:${NC} ${CYAN}http://localhost:3000${NC}"
|
||||
echo ""
|
||||
echo " No necesitas cuenta ni API key. Empieza a chatear."
|
||||
echo ""
|
||||
echo -e " ${BOLD}Modelos adicionales (opcionales):${NC}"
|
||||
echo " docker exec d0a1-ollama ollama pull qwen2.5:7b # Mejor en español (5 GB RAM)"
|
||||
echo " docker exec d0a1-ollama ollama pull llama3.1:8b # Más calidad (6 GB RAM)"
|
||||
echo " docker exec d0a1-ollama ollama pull codellama:7b # Para código (5 GB RAM)"
|
||||
echo ""
|
||||
echo -e " ${BOLD}Comandos útiles:${NC}"
|
||||
echo " docker compose -f $COMPOSE_FILE logs -f # Ver logs"
|
||||
echo " docker compose -f $COMPOSE_FILE down # Parar todo"
|
||||
echo " docker compose -f $COMPOSE_FILE down -v # Borrar todo (incluidos datos)"
|
||||
echo ""
|
||||
echo -e " ${BOLD}¿Quieres más?${NC} Despliega el stack completo en un VPS:"
|
||||
echo " ${CYAN}https://d0a1.es/vps${NC}"
|
||||
echo ""
|
||||
echo -e "${BOLD}${CYAN}═══════════════════════════════════════════${NC}"
|
||||
if ! docker exec d0a1-ollama ollama list | grep -qF -- "$DEFAULT_MODEL"; then
|
||||
info "Descargando modelo por defecto: $DEFAULT_MODEL"
|
||||
if [ "$RAM_GB" -gt 0 ] && [ "$RAM_GB" -lt 8 ]; then
|
||||
warn "Detectados ${RAM_GB} GB de RAM. Para este modelo se recomiendan 8 GB."
|
||||
warn "Si falla la carga, prueba con 'docker exec d0a1-ollama ollama pull llama3.2:1b'."
|
||||
fi
|
||||
docker exec d0a1-ollama ollama pull "$DEFAULT_MODEL"
|
||||
else
|
||||
info "Modelo $DEFAULT_MODEL ya esta descargado."
|
||||
fi
|
||||
|
||||
# --- Resultado ---------------------------------------------------------------
|
||||
|
||||
printf "\n"
|
||||
info "d0a1 quickstart listo!"
|
||||
printf "\n"
|
||||
printf " %bOpen WebUI:%b http://localhost:%s\n" "$BOLD" "$RESET" "$WEBUI_PORT"
|
||||
printf " %bOllama:%b http://localhost:%s\n" "$BOLD" "$RESET" "${OLLAMA_PORT:-11434}"
|
||||
printf "\n"
|
||||
info "Comandos utiles:"
|
||||
printf " docker compose logs -f # logs en tiempo real\n"
|
||||
printf " docker compose down # parar todo\n"
|
||||
printf " docker exec d0a1-ollama ollama pull <modelo> # anadir modelos\n"
|
||||
printf "\n"
|
||||
|
||||
@@ -1,56 +1,48 @@
|
||||
# d0a1 quickstart — IA agéntica local, sin coste, sin VPS
|
||||
# Ejecuta: ./deploy.sh
|
||||
# Abre: http://localhost:3000
|
||||
#
|
||||
# Requisitos: Docker + 8 GB RAM mínimo
|
||||
# Incluye: Ollama (LLM local) + Open WebUI (interfaz web)
|
||||
# Modelo por defecto: llama3.2:3b (~2 GB, corre en 8 GB RAM)
|
||||
services:
|
||||
ollama:
|
||||
# Pin a version estable conocida. Cambiar junto con .env.example / README.
|
||||
image: ollama/ollama:0.11.4
|
||||
container_name: d0a1-ollama
|
||||
image: ollama/ollama:0.30.8
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "127.0.0.1:11434:11434"
|
||||
- "${OLLAMA_PORT:-11434}:11434"
|
||||
volumes:
|
||||
- ollama_data:/root/.ollama
|
||||
environment:
|
||||
OLLAMA_HOST: "0.0.0.0"
|
||||
OLLAMA_KEEP_ALIVE: "5m"
|
||||
OLLAMA_NUM_PARALLEL: "1"
|
||||
- OLLAMA_KEEP_ALIVE=${OLLAMA_KEEP_ALIVE:-5m}
|
||||
healthcheck:
|
||||
test: ["CMD", "ollama", "ps"]
|
||||
interval: 15s
|
||||
test: ["CMD", "ollama", "list"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
retries: 12
|
||||
start_period: 20s
|
||||
# GPU passthrough: descomenta la seccion deploy si tienes GPU NVIDIA.
|
||||
# deploy:
|
||||
# resources:
|
||||
# reservations:
|
||||
# devices:
|
||||
# - driver: nvidia
|
||||
# count: all
|
||||
# capabilities: [gpu]
|
||||
|
||||
openwebui:
|
||||
container_name: d0a1-openwebui
|
||||
image: ghcr.io/open-webui/open-webui:0.9.6
|
||||
open-webui:
|
||||
# Pin a version estable. La imagen :main se rompe sin aviso.
|
||||
image: ghcr.io/open-webui/open-webui:0.6.18
|
||||
container_name: d0a1-open-webui
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:8080"
|
||||
- "${WEBUI_PORT:-3000}:8080"
|
||||
volumes:
|
||||
- openwebui_data:/app/backend/data
|
||||
- open_webui_data:/app/backend/data
|
||||
environment:
|
||||
OLLAMA_BASE_URL: "http://ollama:11434"
|
||||
WEBUI_NAME: "d0a1 quickstart"
|
||||
WEBUI_AUTH: "false"
|
||||
DEFAULT_LOCALE: "es"
|
||||
ENABLE_SIGNUP: "true"
|
||||
ENABLE_WEB_SEARCH: "false"
|
||||
ENABLE_DIRECT_CONNECTIONS: "false"
|
||||
- OLLAMA_BASE_URL=http://ollama:11434
|
||||
- WEBUI_AUTH=${WEBUI_AUTH:-true}
|
||||
- WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:-}
|
||||
- DEFAULT_MODELS=${DEFAULT_MODEL:-llama3.2:3b}
|
||||
depends_on:
|
||||
ollama:
|
||||
condition: service_healthy
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 2G
|
||||
|
||||
volumes:
|
||||
ollama_data:
|
||||
driver: local
|
||||
openwebui_data:
|
||||
driver: local
|
||||
open_webui_data:
|
||||
|
||||
Confirmed clean: the new wording
Mantener en true.removes the misleading inlineWEBUI_AUTH=${...true}reference. The real default still comes fromdocker-compose.ymlvia${WEBUI_AUTH:-true}so the empty value in.env.exampleis intentional and correct. No further action needed in this file.Confirmed clean: the new wording
Mantener en true.removes the misleading inlineWEBUI_AUTH=${...true}reference. The real default still comes fromdocker-compose.ymlvia${WEBUI_AUTH:-true}so the empty value in.env.exampleis intentional and correct. No further action needed in this file.