Welcome, partner! I am your AI Business Consultant and Master of Business. Combining management strategies learned from my MBA with practical field experience, I will present the optimal roadmap for building your excellent "AI Automated Blog + YouTube Shorts Factory", which you have planned, on an Amazon Lightsail (AWS Lightsail) Ubuntu server.
The proposal you provided targets the clear niche markets of 'Investment/Financial Tech' and 'AI Cooking', indicating strong market potential. While using a cloud SaaS (n8n Cloud) would be convenient, building a self-hosted server for cost leadership and data control is an excellent business decision.
Now, let's build the "Digital Factory (Ubuntu Server)" to bring this plan to life.
📑 Table of Contents
🏗️ Step 1: Server Infrastructure Selection (AWS Lightsail)
Building stable server infrastructure with AWS Lightsail
To run n8n and Docker stably, a minimum specification is required. In the "Monthly Cost Estimation" section of the proposal, you've budgeted in the range of $26~$183, but let's minimize costs with a self-hosted server.
- Recommended OS: Ubuntu 22.04 LTS or 24.04 LTS
- Recommended Specifications: Minimum 2GB RAM (approx. $10/month plan)
- Reason: n8n is Node.js-based and uses a fair amount of memory. Especially with 1GB RAM, there's a high risk of the server crashing (OOM Kill) during AI processing. For stable "24/7 factory operation", 2GB is strongly recommended.
- Static IP: Be sure to create a static IP in the Lightsail console and attach it to your instance. (For domain connection and API callbacks)
🛠️ Step 2: Ubuntu Server Foundation Work (Terminal Access)
Building a server environment with Docker
Once you've created the server, connect via SSH to proceed with the foundation work. The easiest way to manage n8n is by using Docker.
1. Essential Package Update and Docker Installation
Enter the following commands in the terminal in order.
# System update
sudo apt update && sudo apt upgrade -y
# Docker installation (using the official script is the simplest)
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add current user to docker group (run docker without sudo)
sudo usermod -aG docker $USER
(After entering the commands, you need to log out and log back in for the group settings to apply)
⚙️ Step 3: Deploying the n8n Automation Engine
Building automation workflows with n8n
Now, let's install your core asset, n8n. All the "Cron Trigger", "OpenAI Node", and "YouTube API Node" from your proposal will be managed here.
1. Create Directory and Configuration File
# Create a folder to store n8n data
mkdir -p ~/n8n-docker
cd ~/n8n-docker
2. Create Docker Compose File
Create a docker-compose.yml file to define container settings.
nano docker-compose.yml
Copy and paste the content below. (Connecting a domain later is essential for smooth webhook/API integration.)
version: "3"
services:
n8n:
image: n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin # Change to your desired ID
- N8N_BASIC_AUTH_PASSWORD=password # Change to your desired password!
- N8N_HOST=your-domain.com # Domain to be purchased later (leave blank or use IP if none)
- WEBHOOK_URL=https://your-domain.com/ # Important: HTTPS is required for YouTube API integration
- GENERIC_TIMEZONE=Asia/Seoul
volumes:
- ./n8n_data:/home/node/.n8n
(Press Ctrl + X, Y, Enter to save and exit.)
3. Start the Factory (Run n8n)
docker compose up -d
Now, if you enter http://(Your_Server_Public_IP):5678 in your browser's address bar,
the n8n login screen will appear.
🔗 Step 4: Connecting to the Outside World (Domain & SSL)
To properly use the "YouTube API Node" and "Blog API Node" from your proposal, Google and WordPress must be able to trust your server. For this, HTTPS (secure connection) is essential.
- Domain Purchase: Buy an affordable domain from Gabia or AWS Route53 (e.g.,
my-ai-factory.com). - DNS Configuration: Set the domain's A record to your Lightsail static IP.
- Automatic HTTPS with Caddy (Recommended): It's much easier to configure than Nginx. Adding Caddy to your
docker-compose.ymlwill automatically issue an SSL certificate.
🤖 Step 5: Implementing the Workflow from the Proposal (n8n Internal Settings)
AI-based Content Automatic Generation Pipeline
Now it's time to actually implement your proposal on the n8n canvas.
1. Node Configuration Strategy (Based on Proposal)
Transfer the "Overall Workflow Structure" from the proposal as is.
- Trigger: Use the
Schedule Triggernode and set it to "Every day at 09:00 AM". - Step 1 (Topic Selection): Connect a
Google Sheetsnode to read the pre-arranged "Investment/AI Cooking Keywords". - Step 2 (Content Generation): Connect an
OpenAInode.- Model:
gpt-4oorgpt-4-turborecommended. - System Prompt: "You are a professional investment analyst and culinary researcher..."
- Model:
- Step 3 (Voice Generation): Use an
HTTP Requestnode to call the ElevenLabs API. (Audio file download) - Step 4 (Video Generation


