bashsupply // automation-engine
This document details the end-to-end deployment of a local Ubuntu automation engine utilizing your existing Hyper-V infrastructure. It is designed for precise, sequential execution. Follow each step exactly as written.
Phase 1: Hyper-V Environment Provisioning
1. Download the OS Image
- Navigate to
ubuntu.com/download/serverin your web browser. - Download the Ubuntu Server 24.04 LTS (or 22.04 LTS) ISO file (it will be roughly 2GB).
2. Create the Virtual Machine
- Open the Windows Start Menu, type Hyper-V Manager, and open it.
- On the right-hand panel under “Actions”, click New > Virtual Machine…
- Name: Enter
bashsupply-n8nand click Next. - Generation: Select Generation 2 and click Next.
- Memory: Enter
2048. Uncheck “Use Dynamic Memory for this virtual machine.” Click Next. - Networking: From the dropdown, select EXTERNAL SWITCH. This bridges the VM directly to your local network (192.168.1.x). Click Next.
- Virtual Hard Disk: Leave defaults (create new, 30GB is plenty). Click Next.
- Installation Options: Choose “Install an operating system from a bootable image file”. Click “Browse” and select the Ubuntu ISO file you downloaded. Click Next, then Finish.
3. Bypass Secure Boot Restriction
Ubuntu requires a specific security certificate to boot in a Gen 2 Hyper-V VM.
- Right-click
bashsupply-n8nin your Hyper-V list and select Settings. - Click on Security on the left.
- Under Secure Boot, change the Template from “Microsoft Windows” to Microsoft UEFI Certificate Authority.
- Click Apply, then OK.
Phase 2: Ubuntu OS Installation
- Right-click the VM and select Connect…, then click the Start button in the window that opens.
- Press Enter on “Try or Install Ubuntu Server”.
- Language & Keyboard: Select English / UK.
- Network Connections: The screen will show your network interface. Because we used EXTERNAL SWITCH, it will automatically obtain an IP address like
192.168.1.Xfrom your gateway (192.168.1.254). Write this IP address down. You will need it. - Storage: Leave everything as default (“Use an entire disk”). Arrow down to “Done” and press Enter. Confirm the destructive action.
- Profile Setup:
- Your name:
admin - Server name:
bashsupply-auto - Username:
sysadmin - Password: Create a secure password and remember it.
- Your name:
- SSH Setup: This is critical. Check the box that says “Install OpenSSH server”.
- Featured Snaps: Do not select anything here. We want a clean build. Arrow down to Done.
- Wait for the installation to finish (it will say “Install complete!”). Select Reboot Now.
Phase 3: Docker & n8n Deployment
You will now abandon the Hyper-V console window. We will control the server purely through a terminal interface, which is the industry standard.
1. Establish SSH Connection
- Open your Windows Start Menu, type cmd, and hit Enter.
- Type the following command (replace the IP with the one you wrote down earlier) and hit Enter:
Type yes to accept the fingerprint, then enter your password.
2. Install Docker
Copy and paste the following commands one by one into your SSH terminal. Right-click inside the command prompt to paste.
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
3. Configure the n8n Container
We will create a directory and a Docker Compose file to orchestrate the automation engine.
nano docker-compose.yml
The nano editor will open. Paste the exact configuration below:
services:
n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
ports:
– “5678:5678”
environment:
– N8N_HOST=0.0.0.0
– N8N_PORT=5678
– N8N_PROTOCOL=http
– NODE_ENV=production
– WEBHOOK_URL=http://192.168.1.X:5678/ # REPLACE WITH YOUR VM IP
volumes:
– n8n_data:/home/node/.n8n
volumes:
n8n_data:
Press Ctrl+X, then type Y, and press Enter to save the file.
4. Ignite the Engine
Docker will now download the n8n application and boot it in the background.
Phase 4: Linking WooCommerce to n8n
1. Access the n8n Canvas
- Open a web browser on your Windows machine.
- Navigate to
http://192.168.1.X:5678(using your VM’s IP). - Create your admin account. This runs locally on your network, so no monthly fees apply.
2. Generate WooCommerce API Credentials
- Log into your WordPress dashboard at
https://bashsupply.co.uk/wp-admin. - Navigate to WooCommerce > Settings > Advanced tab > REST API.
- Click Add key.
- Description:
n8n Automation Engine - Permissions: Select Read/Write.
- Click Generate API key. Leave this page open; you need these keys immediately.
3. Build the Bridge
- Return to your n8n browser tab.
- On the left sidebar, click Credentials > Add Credential.
- Search for WooCommerce API.
- Enter your Consumer Key and Consumer Secret from WordPress.
- Set the Environment to WP REST API and enter your base URL:
https://bashsupply.co.uk - Click Save.