Self-host Edgen AI

Self Hosting

Database

We use Supabase as our database.

If you need a random string, you can use openssl rand -base64 15 to generate 15 real entropy characters.

Hardware

Bare metal

SpecsMinimumRecommended
Cores24
RAM8Gb16Gb
Disk25Gb50Gb

Cloud providers

Cloud ProviderMinimumRecommended
AzureStandard B2msStandard B4ms
AWSt3.smallt3.xlarge
GCPn4-standard-2n4-standard-4

Requirements

Docker

Installation

# Get the code
git clone --depth 1 https://github.com/supabase/supabase
 
# Go to the docker folder
cd supabase/docker
 
# Copy the fake env vars
cp .env.example .env
 
# Pull the latest images
docker compose pull
 
# Start the services (in detached mode)
docker compose up -d

After all the services have started you can see them running in the background:

docker compose ps

All of the services should have a status running (healthy). If you see a status like created but not running, try starting that service manually with docker compose start <service-name>.

You can go to your DB admin going to http://<your-ip>:8000.

You probably need to open the firewall on that port.

In this page you will be prompted for a username and password. By default, the credentials are:

  • Username: supabase
  • Password: this_password_is_insecure_and_should_be_updated

You should change these credentials as soon as possible in ./docker/.env file:

  • ANON_KEY - replace with an anon key
  • SERVICE_ROLE_KEY - replace with a service key.

Configuring an email server

You will need to use a production-ready SMTP server for sending emails. You can configure the SMTP server by updating the following environment variables in ./docker/.env file:

SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASS=
SMTP_SENDER_NAME=

We recommend using AWS SES. It’s extremely cheap and reliable. Restart all services to pick up the new configuration.

If you do not need email you can set ENABLE_EMAIL_AUTOCONFIRM=true and forget about the others.

Edgen Base

  1. You’ll first need the .env file, ask the team!
  2. Clone the repo base
  3. Docker self hosting supabase, how to [Self Hosting Database](# Database)
  4. Change in .env NEXT_PUBLIC_SUPABASE_URL=http://kong:8000
  5. Go to supabase\docker in the superbase repo and copy the ANON_KEY in the .env file and paste it in this repo .env NEXT_PUBLIC_SUPABASE_ANON_KEY
  6. Build docker imagen docker build -t base .
  7. Run imagen and add to superbase network docker run -p 3000:3000 --network supabase_default base or run docker-compose up -d
  8. open http://localhost:3000/ on the browser or the one returned in your case
  9. you can enter superbase here http://localhost:8000/