Self Hosting

Deploy S3 Portal with Docker and configure the required environment variables.

On this page

Prerequisites

  • Docker installed on your machine. Install Docker
  • A domain or server (optional, for production).

Step 1 - Download

Download compose file

curl -LO https://github.com/mayurG2299/s3-portal/raw/main/docker-compose.yml

Step 2 - Configure

Prepare env file

cp .env.example .env
nano .env
VariableRequiredDescription
DB_PASSWORDrequiredStrong PostgreSQL password
NEXTAUTH_SECRETrequiredopenssl rand -base64 32
ENCRYPTION_KEYrequiredopenssl rand -base64 32
NEXTAUTH_URLrequirede.g. http://localhost:3000
NEXT_PUBLIC_APP_URLrequiredSame as NEXTAUTH_URL
PORToptionalDefault: 3000
LOG_LEVELoptionalDefault: INFO

Step 3 - Start

Start services

docker compose up -d

Step 4 - Run migrations (first time only)

Run migrations

docker compose run --rm app npx prisma migrate deploy

Step 5 - Connect AWS

Useful commands

Operations

# View logs
docker compose logs -f

# Stop
docker compose down

# Update to latest
docker compose pull && docker compose up -d

Updating

Update

docker compose pull
docker compose up -d