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

# Deploy with Digital Ocean

> Deploy RAGenius on Digital Ocean

1. Go to [Digital Ocean](https://www.digitalocean.com/) and create an account.
2. Create a new Droplet.
3. Choose the Docker image from the Marketplace.

![2024-04-22-21-49-27.png](https://mintlify.s3-us-west-1.amazonaws.com/ensam/images/2024-04-22-21-49-27.png)

4. Choose the Standard Droplet plan.

We recommended the \$48/month plan for the best performance with 4 vCPUs, 8GB RAM, and 160GB SSD.

5. Wait for the Droplet to be created.

6. SSH into your Droplet.

```bash
ssh root@your-droplet-ip
```

7. Clone the RAGenius repository.

```bash
git clone https://github.com/yyassif/ragenius-ai.git RAGenius-AI && cd RAGenius-AI
```

8. Copy the `.env.example` file.

```bash
cp .env.example .env
```

9. Update the `.env` file.

```bash
vim .env
```

* Update the `OPENAI_API_KEY`
* Update the `NEXT_PUBLIC_BACKEND_URL` with your Droplet IP -> `http://your-droplet-ip:5050`
* UPDATE the `NEXT_PUBLIC_SUPABASE_URL` with your Droplet IP -> `http://your-droplet-ip:54321`
* Update the `NEXT_PUBLIC_FRONTEND_URL` with your Droplet IP -> `http://your-droplet-ip:3000`

10. Install Supabase

```bash
apt install npm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install 20
nvm use 20
cd backend
npx supabase start
cd ../
```

11. Allow the firewall

```bash
ufw allow 54321
```

12. Launch the project

```bash
docker compose pull
docker compose up
```

It needs at least 5 minutes to build the frontend and pulling the Docker images.

13. Access the RAGenius app

```bash
http://your-droplet-ip:3000
```
