> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/on-premises/es/configuracion/overleaf-toolkit/redis.md).

# Redis

### Habilitar la autenticación con contraseña

Si está utilizando un servicio Redis externo y necesita proporcionar una contraseña, puede hacerlo configurando las `OVERLEAF_REDIS_PASS` y `REDIS_PASSWORD` variables de entorno en el **config/variables.env** archivo y ejecutando el `bin/up -d` comando para recrear el **sharelatex** contenedor.

Si está ejecutando una instancia local de Redis, deberá configurar el **redis** servicio para que inicie con autenticación por contraseña. Después de establecer las variables de entorno anteriores, también deberá completar estos pasos adicionales:

Cree un **docker-compose.override.yml** archivo en el **config/** directorio con el siguiente contenido:

{% code title="config/docker-compose.override.yml" %}

```yaml
services:
    redis:
        comando: "redis-server --requirepass <YOUR-PASSWORD>"
```

{% endcode %}

{% hint style="warning" %}
Si tiene habilitada la persistencia AOF, deberá añadir `--appendonly yes` al `comando`.
{% endhint %}

Ejecute `bin/up -d` para recrear los contenedores.

### Habilitar la persistencia de archivo solo de anexado

(Original: <https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/redis#enabling-append-only-file-persistence>)

La persistencia AOF (archivo solo de anexado) de Redis proporciona una forma sólida de garantizar la durabilidad de los datos registrando cada operación de escritura recibida por el servidor. A diferencia de las instantáneas RDB, que toman copias del conjunto de datos en un momento dado, AOF mantiene un registro completo de todos los cambios realizados en sus datos.

{% hint style="info" %}
Deshabilitar RDB es opcional. En general, se recomienda usar ambos métodos de persistencia juntos. Antes de hacer cualquier cambio en producción, revise las ventajas y desventajas de ejecutar AOF y RDB juntos.
{% endhint %}

Puede leer más sobre cómo habilitar la persistencia AOF en Redis aquí: <https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/#how-i-can-switch-to-aof-if-im-currently-using-dumprdb-snapshotsarrow-up-right>

1. Programe una ventana de mantenimiento para la actualización.
2. Detenga la instancia usando `bin/stop` y haga una copia de seguridad de los **config/** y **data/** carpetas.
3. Ejecute `bin/up` para iniciar la instancia
4. Ejecute el comando `docker exec -it redis sh`
5. Ejecute el comando `redis-cli` para abrir la interfaz de línea de comandos de Redis
6. En redis-cli, ejecute el comando `config set appendonly yes`
7. Ahora deberá esperar a que la reescritura de AOF termine de persistir los datos. Puede hacerlo escribiendo `INFO persistence` en redis-cli y esperando a que `aof_rewrite_in_progress` y `aof_rewrite_scheduled` estén `0`, y verificando que `aof_last_bgrewrite_status` sea `ok`.
8. Salga de redis-cli escribiendo `exit` y presionando la tecla Intro
9. Salga del contenedor de Redis escribiendo `exit` y presionando la tecla Intro
10. Ejecute el comando `ls ./data/redis` y confirme que puede ver el **appendonly.aof** archivo
11. Edita el **config/overleaf.rc** archivo y cambie la `REDIS_AOF_PERSISTENCE` variable de entorno de `false` a `true`
12. Ejecute `bin/up -d` y asegúrese de que la aplicación funcione (el editor del proyecto y el panel de historial funcionan).


---

# 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://overleaf-pro.ayaka.space/on-premises/es/configuracion/overleaf-toolkit/redis.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.
