Skip to main content
Environment variables control the behavior of the YouTube Automation Agent. Configure them in a .env file in the project root.

Setup

1

Copy Example File

2

Edit Configuration

Open .env in your text editor and fill in the required values.
3

Verify Settings


Required Variables

These variables must be set for the system to function:

OpenAI Configuration

Required for content generation, DALL-E image creation, and text-to-speech features.
Get your key from OpenAI Platform.

Application Settings

Control the core behavior of the application:

Node Environment

  • development - Enables verbose logging and debug features
  • production - Optimized for deployment
  • test - For running tests

Server Port

The port where the web interface will be accessible. Default: 3456

Logging Level

  • error - Only errors
  • warn - Warnings and errors
  • info - General information (recommended)
  • debug - Detailed debugging information
  • verbose - Everything including API calls

Channel Settings

Configure your YouTube channel identity:
Examples:

YouTube Settings

Control YouTube-specific behavior:

Region

Two-letter country code for content trending and recommendations.
  • US - United States
  • GB - United Kingdom
  • CA - Canada
  • AU - Australia
  • IN - India
  • DE - Germany
  • FR - France
  • JP - Japan

Default Privacy Status

Videos are visible to everyone and appear in search results and recommendations.

Content Settings

Control how content is processed and formatted:

Content Processing

Image Processing


Rate Limiting

Prevent API quota exhaustion:
YouTube API has strict quota limits. Exceeding them will result in temporary suspension of API access.

Text-to-Speech Settings

Female Voices:
  • en-US-JennyNeural - Friendly, professional
  • en-US-AriaNeural - Clear, expressive
  • en-US-AmberNeural - Warm, conversational
Male Voices:
  • en-US-GuyNeural - Professional, authoritative
  • en-US-DavisNeural - Clear, trustworthy
  • en-US-TonyNeural - News-style delivery

Security

Generate a strong, random secret for JWT token signing. Never use the default value in production.
Generate a secure secret:

Analytics & Monitoring


File Upload Settings

YouTube supports videos up to 256GB, but initial uploads are limited to 15 minutes (or 128GB for verified accounts).

Error Handling


Automation Settings

These are generated by the setup script but can be manually configured:
DAILY_CONTENT_ENABLEDEnable daily content generation pipeline.CONTENT_BUFFER_DAYSNumber of days of content to keep in the buffer (queue).MAX_DAILY_POSTSMaximum number of videos to publish per day.

Notification Settings

Enable console notifications for important events (uploads, errors, milestones).

Debug Settings

Only enable debug settings during development. They generate large log files and slow down the system.

Optional API Keys

These can be set as environment variables instead of in credentials.json:

Example Complete Configuration

Next Steps

AI Providers

Configure OpenAI, Gemini, and other AI services

YouTube Setup

Complete YouTube API configuration and authentication