Self-hosted climate transparency for enterprises
Create a .env.local file in the web/ directory
Add the following variables:
# Database Connection
# Format: postgresql://username:password@host:port/database?schema=public
# Example for local PostgreSQL:
DATABASE_URL="postgresql://postgres:password@localhost:5432/openeco?schema=public"
# NextAuth Configuration
# Generate a secret with: node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
NEXTAUTH_SECRET="your-generated-secret-here"
# App URL (for development)
NEXTAUTH_URL="http://localhost:3000"
# Optional: App Configuration
NEXT_PUBLIC_APP_URL="http://localhost:3000"
NEXT_PUBLIC_APP_NAME="Open Climate Transparency Platform"
Run this command to generate a secure secret:
node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
Copy the output and paste it as your NEXTAUTH_SECRET value.
CREATE DATABASE openeco;
DATABASE_URL="postgresql://postgres:yourpassword@localhost:5432/openeco?schema=public"
# Podman (Linux/WSL2)
podman run --name openeco-postgres \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_DB=openeco \
-p 5432:5432 \
-d postgres:15
# Or Docker (Docker Desktop / Rancher Desktop, etc.)
docker run --name openeco-postgres \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_DB=openeco \
-p 5432:5432 \
-d postgres:15
DATABASE_URL="postgresql://postgres:password@localhost:5432/openeco?schema=public"
DATABASE_URLOnce you’ve created .env.local with DATABASE_URL:
# Generate Prisma client
npm run db:generate
# Push schema to database
npm run db:push
# Start development server
npm run dev
.env.local is in the web/ directory (same level as package.json).env.local (not .env.local.txt)NEXTAUTH_SECRET is set and is a long random string