> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 2. Crear el namespace y los secretos

> Crea el namespace y los secretos que necesita Ayakaleaf Pro.

Todo va en el namespace `overleaf`:

```bash theme={null}
kubectl create namespace overleaf
```

Ayakaleaf Pro lee sus secretos de variables de entorno. Genéralos una vez y guárdalos en un Secret:

```bash wrap theme={null}
HISTORY=$(openssl rand -hex 32)
kubectl -n overleaf create secret generic overleaf-secrets \
  --from-literal=OVERLEAF_INVITE_TOKEN_SECRET="$(openssl rand -base64 32)" \
  --from-literal=OVERLEAF_SESSION_SECRET="$(openssl rand -hex 32)" \
  --from-literal=WEB_API_PASSWORD="$(openssl rand -hex 32)" \
  --from-literal=STAGING_PASSWORD="$HISTORY" \
  --from-literal=V1_HISTORY_PASSWORD="$HISTORY" \
  --from-literal=CRYPTO_RANDOM="$(openssl rand -hex 32)" \
  --from-literal=OT_JWT_AUTH_KEY="$(openssl rand -hex 32)"
```

| Secreto | Por qué |
| - | - |
| `OVERLEAF_INVITE_TOKEN_SECRET` | Obligatorio. Sin él, el pod se detiene con "Missing required secrets". Cambiarlo invalida las invitaciones a proyectos pendientes. |
| `OVERLEAF_SESSION_SECRET` | Firma las cookies de sesión. Sin él, cada reinicio del pod cierra la sesión de todos los usuarios. |
| `WEB_API_PASSWORD`, `CRYPTO_RANDOM`, `OT_JWT_AUTH_KEY` | Secretos internos. El contenedor los genera en cada arranque cuando faltan; con más de una réplica, todas las réplicas deben compartirlos. |
| `STAGING_PASSWORD` y `V1_HISTORY_PASSWORD` | Secreto interno del historial; ambos deben tener el **mismo** valor. |

> [!WARNING]
>
> Haz una copia de seguridad del Secret (`kubectl -n overleaf get secret overleaf-secrets -o yaml`) junto con tus datos. Las funciones que cifran tokens en MongoDB también necesitan sus propias contraseñas de cifrado en este Secret, por ejemplo `GITHUB_TOKEN_CIPHER_PASSWORD` para la [sincronización con GitHub](https://ayakaleaf-pro.mintlify.site/es/on-premises/configuration/overleaf-toolkit/integrations/github-synchronisation.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.