> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dwe.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# dweOS Legacy

<Warning>
  dweOS Legacy ha sido descontinuado en favor de [dweOS
  2.0](/es/dwe-os).
</Warning>

## Instalación

<Tabs>
  <Tab title="Opción 1: Grabar imagen de Raspberry Pi (recomendado)">
    <Steps>
      <Step title="Primer paso">
        Descarga la última imagen [aquí](https://github.com/DeepwaterExploration/dweOS/releases/).
      </Step>

      <Step title="Segundo paso">
        Descarga [Raspberry Pi Imager](https://www.raspberrypi.com/software/) para grabar la imagen en una tarjeta SD.
      </Step>

      <Step title="Seleccionar el dispositivo">
        <video controls={true} autoPlay loop height="300px" className="w-full aspect-video" src="https://cdn.shopify.com/videos/c/o/v/ce746d70d36443e4b5dcbab6a2e89a87.webm" />
      </Step>

      <Step title="Seleccionar la imagen de dweOS">
        <video controls={true} autoPlay loop height="300px" className="w-full aspect-video" src="https://cdn.shopify.com/videos/c/o/v/7cc23a4b35724451886fb1eea783edf8.webm" />
      </Step>

      <Step title="Seleccionar la tarjeta SD">
        <video controls={true} autoPlay loop height="300px" className="w-full aspect-video" src="https://cdn.shopify.com/videos/c/o/v/70b76e866efd4757ac16f1d1cf577395.webm" />
      </Step>

      <Step title="¡Éxito!">
        ![dweOS Success](https://cdn.shopify.com/s/files/1/0575/8785/9626/files/dwe_os_1_step_4.png)
      </Step>
    </Steps>
  </Tab>

  <Tab title="Opción 2: SSH e instalación">
    ## Conexión

    <Card title="Instrucciones SSH" icon="link" href="/es/dwe-os/guides/ssh-rpi">
      Conéctate primero por SSH a tu Raspberry Pi.
    </Card>

    <Steps>
      <Step title="Script de instalación">
        Para instalar en la Raspberry Pi, puedes ejecutar los siguientes comandos:

        ```sh theme={null}
        sudo apt update

        sudo apt upgrade

        curl -fsSL https://raw.githubusercontent.com/DeepwaterExploration/dweOS/main/scripts/install.sh | sudo -E bash -
        ```
      </Step>

      <Step title="Listo.">
        Una vez instalado, el script debería finalizar con el siguiente mensaje:

        ```
        Installation of dweOS was successful.
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Opción 3: Instalación manual">
    <Warning> Sigue esta guía solo si eres un experto. </Warning>

    Puedes instalar manualmente (para `Raspberry Pi` u otros sistemas `ARM`/`x86`) siguiendo las instrucciones individuales del script de instalación a continuación.

    ### Instalar NodeJS 20 y NPM

    ```sh theme={null}
    sudo apt update
    sudo apt upgrade
    curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
    sudo apt install nodejs
    curl -L https://npmjs.org/install.sh | sudo sh
    ```

    ### Instalar las demás dependencias:

    ```sh theme={null}
    sudo apt install libudev-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-bad
    ```

    ### Instalar dweOS:

    ```sh theme={null}
    sudo npm install -g @dwe.ai/dwe-os-1
    ```

    ### Ejecutar dweOS manualmente:

    Escribe lo siguiente en tu shell:

    ```sh theme={null}
    dwe-os-1
    ```

    luego pulsa `Enter`. Añade `--help` al final para ver más opciones.

    ### Inicio automático (RPi)

    Para habilitar el inicio automático (recomendado para Raspberry Pi):

    1. Instala [pm2](https://www.npmjs.com/package/pm2):

    ```sh theme={null}
    sudo npm install -g pm2
    ```

    2. Inicia dwe-os-1 desde pm2:

    ```sh theme={null}
    pm2 start dwe-os-1
    ```

    3. Guarda la lista de procesos:

    ```sh theme={null}
    pm2 save
    ```

    4. Habilita el inicio para pm2 en Raspberry Pi:
       Raspberry Pi:

       ```sh theme={null}
       sudo pm2 startup systemd -u pi --hp /home/pi
       ```

       Sistema personalizado:

       ```sh theme={null}
       sudo pm2 startup systemd -u <your username> --hp /home/<your username>
       ```
  </Tab>
</Tabs>
