This section will guide you on how to deploy ParadeDB to an AWS instance. You need to have an AWS account, and optionally the AWS CLI installed.

Step-by-Step Guide

Selecting an AWS EC2 Instance

Instance Type

The first step is to launch an EC2 instance. If you are looking for a production ready setup, we recommend storage-optimized instances like the i3 or d3 families. If you are only testing or need a development setup, you can use a general-purpose instance like the t3 or m5 family.

Storage

We recommend you add storage to your instance using EBS volumes. Generally, for indexing and search it is recommended to use fast SSD storage. For starting out, general purpose storage will serve fine. However, if you are looking for a more performant setup, you can use provisioned iops volumes like io1 and io2. The instance needs at least 16GB of storage to install ParadeDB, in addition to any amount of storage you expect to store within your PostgreSQL database.

AMI

You can use any AMI, as long as you can install Docker and Docker-compose to it. We recommend using the latest Ubuntu LTS AMI.

After you have selected the right instance for your needs, you can launch an instance via the console using the “Launch instance” button, or you can use the AWS CLI to do so.

Networking

Create an EC2 Security Group with an ingress rule on the port where ParadeDB will be exposed, by default 5432.

Installing ParadeDB

Step 1: Connect to the Instance

Open your terminal or command prompt and navigate to the directory where you saved the *.pem file associated with your EC2 instance. Connect to the instance using SSH:

ssh -i "your-key-file.pem" ubbuntu@your-instance-public-ip

Step 2: Install Docker Engine on the Instance

The instructions below assume you are on a Debian-based image. If you picked a different AMI, you will need to use the appropriate package manager (i.e. yum, etc.). Update the installed packages and add the Docker repository:

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Install Docker:

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Allow usage for non-root users:

sudo groupadd docker
sudo usermod -aG docker $USER

# Activate changes on groups
newgrp docker

After adding the user to the Docker group, it’s recommended to log out and log back in for the changes to take effect.

Step 3: Run the ParadeDB image

Pull and run the ParadeDB Docker image:

docker run \
  --name paradedb \
  -e POSTGRESQL_USERNAME=<user> \
  -e POSTGRESQL_PASSWORD=<password> \
  -e POSTGRESQL_DATABASE=<dbname> \
  -e POSTGRESQL_POSTGRES_PASSWORD=<superuser_password> \
  -v paradedb_data:/bitnami/postgresql \
  -p 5432:5432 \
  -d \
  paradedb/paradedb:latest

Verify that the PostgreSQL server is running:

psql postgresql://your-user:your-password@your-instance-ip:5432/your-db

Make sure that your instance can accept connections on the TCP port where PostgreSQL is running.

That’s it! You can now connect to your ParadeDB instance and start writing queries.