Environment Variables
All configuration is done through environment variables. Copy .env.local.example to .env.local and customize as needed.
Quick Setup
cp .env.local.example .env.localThe example file includes sensible defaults for local development. You only need to update a few values for production.
All Variables
MONGODB_URIRequiredMongoDB connection string for your database.
mongodb://localhost:27017/scanlationNEXT_PUBLIC_SITE_URLRequiredThe public URL of your site. Used for generating links and SEO.
http://localhost:3000NEXT_PUBLIC_SITE_NAMEOptionalThe name of your scanlation group/site. Shown in the header and titles.
ScanlationS3_ENDPOINTOptionalS3-compatible storage endpoint. Use MinIO for local development.
http://localhost:9000S3_BUCKETOptionalThe S3 bucket name for storing manga images.
scanlationS3_ACCESS_KEYOptionalAccess key for S3 authentication.
minioadminS3_SECRET_KEYOptionalSecret key for S3 authentication.
minioadminNEXTAUTH_SECRETRequiredSecret for NextAuth.js session encryption. Generate with `openssl rand -base64 32`.
(generate a random string)NEXTAUTH_URLOptionalThe canonical URL for authentication. Usually same as SITE_URL.
http://localhost:3000DISCORD_CLIENT_IDOptionalDiscord OAuth client ID for social login.
DISCORD_CLIENT_SECRETOptionalDiscord OAuth client secret.
Production Checklist
Important: Before deploying to production, make sure to update these critical settings.
- Generate a strong NEXTAUTH_SECRET
- Set NEXT_PUBLIC_SITE_URL to your domain
- Use a production MongoDB instance
- Configure real S3 or cloud storage
- Set up SSL/HTTPS
Generate NEXTAUTH_SECRET
Use this command to generate a secure random secret:
openssl rand -base64 32On Windows, you can use node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"