> ## 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 has been phased out in favor of [dweOS
  2.0](/dwe-os).
</Warning>

## Installation

<Tabs>
  <Tab title="Option 1: Burn Raspberry Pi Image (Recommended)">
    <Steps>
      <Step title="First Step">
        Download the latest image [here](https://github.com/DeepwaterExploration/dweOS/releases/).
      </Step>

      <Step title="Second Step">
        Download [Raspberry Pi Imager](https://www.raspberrypi.com/software/) to flash the image to an SD card.
      </Step>

      <Step title="Select Device">
        <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="Select the dweOS Image">
        <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="Select the SD Card">
        <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="Success!">
        ![dweOS Success](https://cdn.shopify.com/s/files/1/0575/8785/9626/files/dwe_os_1_step_4.png)
      </Step>
    </Steps>
  </Tab>

  <Tab title="Option 2: SSH and Install">
    ## Connecting

    <Card title="SSH Instructions" icon="link" href="/dwe-os/guides/ssh-rpi">
      SSH into your Raspberry Pi first.
    </Card>

    <Steps>
      <Step title="Installation Script">
        To install for the Raspberry Pi, you can execute the following commands:

        ```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="Done.">
        Once installed, the script should exit with the following message:

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

  <Tab title="Option 3: Manual Install">
    <Warning> Please follow this guide only if you are an expert. </Warning>

    You can install manually (for `Raspberry Pi` or other `ARM`/`x86` systems) by following the individual instructions in the install script below.

    ### Install NodeJS 20 and 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
    ```

    ### Install Other Dependencies:

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

    ### Install dweOS:

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

    ### Run dweOS Manually:

    Type the following into your shell:

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

    then press `Enter`. Append `--help` at the end, to see more options.

    ### Auto Launch (RPi)

    To enable auto-launch (recommended for Raspberry Pi):

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

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

    2. Start dwe-os-1 from pm2:

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

    3. Save the process list:

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

    4. Enable startup for pm2 on Raspberry Pi:
       Raspberry Pi:

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

       Custom System:

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