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
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
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable YouTube Data API v3
- Create OAuth 2.0 credentials (Desktop app)
- Download the JSON file
- Save it as
config/credentials.json
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:- cURL
- JavaScript
- Python
Monitoring and Logs
View Real-time Logs
Health Check
Running in Background
- macOS/Linux
- Windows
Using Using
nohup: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
.env2
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
- Foreground Process
- Background Process
Press
Ctrl+C in the terminalData and Backups
Important Directories
data/- Generated content, thumbnails, and databaselogs/- Application and error logsuploads/- Temporary upload filesconfig/- Credentials and configuration
Backup Recommendations
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