Skip to main content

Overview

Local deployment is the simplest way to get started with the YouTube Automation Agent. This option is perfect for:
  • Testing and development
  • Running automation on your personal computer
  • Small-scale operations (1-2 videos per day)
  • Learning how the system works
Local deployment is completely free but requires your computer to be running for automation to work.

Prerequisites

Node.js 18+

Download from nodejs.org

Google Account

For YouTube API access

AI Provider

OpenAI or Google Gemini account

10 Minutes

For initial setup and configuration

System Requirements

Installation Steps

1

Install Node.js

Download and install Node.js 18 or higher from nodejs.orgVerify installation:
2

Clone the Repository

3

Install Dependencies

Install all required npm packages:
This will install:
  • Express server (port 3456)
  • Google APIs for YouTube
  • AI libraries (OpenAI, Google Generative AI)
  • Database (SQLite3)
  • Automation schedulers (node-cron)
  • And all other dependencies
4

Configure Environment Variables

Copy the example environment file:
Edit .env with your preferred text editor and fill in:
5

Set Up YouTube API Credentials

  1. Go to Google Cloud Console
  2. Create a new project or select existing one
  3. Enable YouTube Data API v3
  4. Create OAuth 2.0 credentials (Desktop app)
  5. Download the JSON file
  6. Save it as config/credentials.json
Keep your credentials.json file secure and never commit it to version control!
6

Run Interactive Setup

The setup wizard will guide you through configuration:
This will:
  • Verify your credentials
  • Initialize the database
  • Configure your channel preferences
  • Set up automation schedules
7

Start the Agent

Start the main application:
You should see:
8

Access the Dashboard

Open your browser and navigate to:
The dashboard provides:
  • Real-time automation status
  • Content generation controls
  • Analytics and performance metrics
  • Publishing schedule management

Available NPM Scripts

Core Commands

Agent Commands

Run individual agents manually:

Database Commands

Automation Schedule

Once running, the agent operates on this schedule:
All times are based on your system’s local timezone.

Manual Content Generation

Generate content on-demand using the API:

Monitoring and Logs

View Real-time Logs

Health Check

Expected response:

Running in Background

Using nohup:
Using screen:

Troubleshooting

Port Already in Use

If port 3456 is already in use:

YouTube API Quota Exceeded

  • Check Google Cloud Console quotas
  • Default limit: 10,000 units/day (sufficient for most use cases)
  • Implement rate limiting by adjusting schedule frequency

AI Service Connection Failed

1

Verify API Key

Check that your API key is correct in .env
2

Check Credits

For OpenAI: Ensure you have available credits For Gemini: Verify API is enabled
3

Test Connection

Database Errors

Reinitialize the database:

Stopping the Agent

Press Ctrl+C in the terminal

Data and Backups

Important Directories

  • data/ - Generated content, thumbnails, and database
  • logs/ - Application and error logs
  • uploads/ - Temporary upload files
  • config/ - Credentials and configuration

Backup Recommendations

Always backup before major updates or configuration changes!

Next Steps

VPS Deployment

Deploy to a VPS for 24/7 operation

Cloud Deployment

Scale with cloud platforms

Configuration

Advanced configuration options

API Reference

Explore API endpoints