Skip to main content

Overview

Deploying to a Virtual Private Server (VPS) enables true 24/7 automation without keeping your personal computer running. This is the recommended option for:
  • Production YouTube channels
  • Consistent daily uploads
  • Multiple channels management
  • Professional operations
VPS deployment costs approximately $5-20/month depending on your provider and resource needs.

VPS Provider Recommendations

DigitalOcean

$6/month - 1 GB RAM, 1 vCPU
  • Easy to use
  • Great documentation
  • 1-click deployments

Linode (Akamai)

$5/month - 1 GB RAM, 1 vCPU
  • Excellent performance
  • Strong network
  • Developer-friendly

Vultr

$6/month - 1 GB RAM, 1 vCPU
  • Global locations
  • High-frequency CPU options
  • Competitive pricing

Hetzner

€4.15/month - 2 GB RAM, 1 vCPU
  • Best price/performance
  • European datacenters
  • Excellent value

Server Requirements

Minimum Specifications

Estimated Costs

$6-8/month total
  • VPS: $5-6/month
  • Google Gemini API: Free
  • 1-2 videos per day
  • Perfect for starting out

Deployment Steps

1

Create VPS Instance

Choose your provider and create a new droplet/instance:DigitalOcean Example:
  1. Sign up at digitalocean.com
  2. Click “Create” → “Droplets”
  3. Choose Ubuntu 22.04 LTS
  4. Select Basic plan ($6/month)
  5. Choose datacenter region (closest to your target audience)
  6. Add SSH key for secure access
  7. Click “Create Droplet”
Save your server’s IP address - you’ll need it for SSH access
2

Connect via SSH

Connect to your VPS:
For Windows users, use PuTTY or Windows Terminal.
3

Update System Packages

4

Install Node.js 18+

Install Node.js using NodeSource:
Verify installation:
5

Install Git

6

Install PM2 Process Manager

PM2 keeps your application running and restarts it if it crashes:
7

Create Application User

For security, don’t run as root:
8

Clone Repository

9

Install Dependencies

The --production flag skips dev dependencies, saving disk space.
10

Configure Environment

Create and edit the environment file:
Update with your credentials:
Save with Ctrl+X, then Y, then Enter
11

Upload YouTube Credentials

Transfer your credentials.json file from local machine to VPS:From your local machine:
Or create it directly on the VPS:
12

Run Initial Setup

This initializes the database and verifies your configuration.
13

Start with PM2

Start the application with PM2:
Also start the scheduler:
Save the PM2 configuration:
14

Configure Auto-Start on Boot

Make PM2 restart on server reboot:
Copy and run the command that PM2 outputs.
15

Configure Firewall

Allow necessary ports:
Make sure to allow SSH (port 22) before enabling the firewall, or you’ll lock yourself out!

Setting Up Nginx Reverse Proxy (Optional)

For production deployments, use Nginx as a reverse proxy:
1

Install Nginx

2

Configure Nginx

Create a new site configuration:
Add this configuration:
3

Enable Site

4

Update Firewall

SSL/HTTPS Setup with Let’s Encrypt (Optional)

Secure your dashboard with HTTPS:

Management Commands

PM2 Commands

System Monitoring

Database Backups

Automate database backups:
1

Create Backup Script

Add:
Make executable:
2

Schedule with Cron

Add daily backup at 3 AM:

Updating the Application

Monitoring and Alerts

Set Up Email Alerts

Install and configure system mail:

PM2 Monitoring

PM2 can send alerts on crashes:

Troubleshooting

Application Won’t Start

High Memory Usage

Database Locked Errors

YouTube API Authentication Issues

Security Best Practices

1

Keep System Updated

2

Use SSH Keys Only

Disable password authentication:
Set:
Restart SSH:
3

Install Fail2Ban

Protect against brute force attacks:
4

Restrict File Permissions

Performance Optimization

Enable Node.js Production Mode

Already set in .env:

Optimize PM2 Settings

Database Optimization

Cost Optimization Tips

Use Gemini API

Free tier handles most workloads

Smaller VPS

1GB RAM sufficient for 1-2 videos/day

Reserved Instances

Some providers offer discounts for annual payment

Optimize Schedules

Reduce frequency if hitting API limits

Next Steps

Cloud Deployment

Scale to cloud platforms for enterprise needs

Monitoring

Set up advanced monitoring and analytics

Configuration

Fine-tune your deployment

API Reference

Integrate with your custom tools