Skip to main content
Toots is a Next.js application backed by PostgreSQL. This section covers different deployment strategies and requirements for running Toots in production.

Deployment options

Toots can be deployed using several approaches:
  • Docker Compose - Recommended for self-hosting and development environments
  • Container orchestration - Deploy on Kubernetes, AWS ECS, or similar platforms
  • Platform-as-a-Service - Deploy to Vercel, Railway, or other Next.js-compatible platforms

Prerequisites

Before deploying Toots, ensure you have:
  • Node.js 20 or higher
  • PostgreSQL 16 or compatible version
  • pnpm package manager
  • Required environment variables configured

Environment variables

Toots requires the following environment variables:
VariableDescriptionRequired
DATABASE_URLPostgreSQL connection stringYes
BETTER_AUTH_SECRETRandom secret for session signingYes
BETTER_AUTH_URLBase URL of your applicationYes
GOOGLE_GENERATIVE_AI_API_KEYGemini API key for AI featuresYes
POSTGRES_USERPostgreSQL username (for Docker)Yes
POSTGRES_PASSWORDPostgreSQL password (for Docker)Yes
POSTGRES_DBPostgreSQL database name (for Docker)Yes

Architecture

Toots uses a monorepo structure with Turborepo:
  • apps/web - Next.js application (App Router)
  • packages/ui - Shared UI components (shadcn/ui)
  • Database - PostgreSQL with Prisma ORM

Build process

The build process includes:
  1. Install dependencies with pnpm
  2. Generate Prisma client
  3. Run database migrations
  4. Build Next.js application
See the Docker deployment guide for a complete setup, or the production best practices for optimization tips.

Build docs developers (and LLMs) love