This guide provides detailed instructions for installing Oracle VirtualBox on Windows 11 and Linux hosts, creating a Kubuntu 24.04 VM (manual or automated), and setting up the Argentquest Development Suite.
- Update and Install Dependencies:
sudo apt update sudo apt install -y software-properties-common wget
- Add Oracle Repository and Key:
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
- Install VirtualBox:
sudo apt update sudo apt install -y virtualbox-7.0
- Download the Windows hosts installer from virtualbox.org.
- Run the installer (
VirtualBox-x.x.x-Win.exe). - Follow the setup wizard.
- Extension Pack: Download "All supported platforms" from the same page and install via File > Tools > Extension Pack Manager.
- Kubuntu 24.04 LTS ISO: Download from kubuntu.org/getkubuntu/.
- Open VirtualBox and click New.
- Name:
Kubuntu 24.04(Type: Linux, Version: Ubuntu 64-bit). - Hardware:
- RAM: At least 8192 MB (8 GB).
- CPU: At least 2 CPUs (4 recommended).
- Hard Disk: 200 GB (VDI, Dynamically Allocated).
- Network (Crucial Step):
- Go to Settings > Network.
- Change "Attached to" to Bridged Adapter.
- Select your active host interface (Ethernet/Wi-Fi).
- Click Finish.
ISO_PATH="/path/to/kubuntu-24.04-desktop-amd64.iso"
VM_NAME="Kubuntu 24.04"
# Create VM
VBoxManage createvm --name "$VM_NAME" --ostype "Ubuntu_64" --register --basefolder "$HOME/VirtualBox VMs"
# Configure Hardware (8GB RAM, 2 CPUs, 128MB VRAM)
VBoxManage modifyvm "$VM_NAME" --memory 8192 --cpus 2 --vram 128 --graphicscontroller vmsvga --accelerate3d on
# Create Hard Disk (200GB)
VBoxManage createhd --filename "$HOME/VirtualBox VMs/$VM_NAME/$VM_NAME.vdi" --size 204800 --format VDI
# Attach Storage
VBoxManage storagectl "$VM_NAME" --name "SATA Controller" --add sata --controller IntelAHCI
VBoxManage storageattach "$VM_NAME" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$HOME/VirtualBox VMs/$VM_NAME/$VM_NAME.vdi"
VBoxManage storagectl "$VM_NAME" --name "IDE Controller" --add ide
VBoxManage storageattach "$VM_NAME" --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive --medium "$ISO_PATH"
echo "VM created. REMEMBER: Manually set Network to 'Bridged Adapter' in Settings > Network."Run as Administrator:
$VmName = "Kubuntu 24.04"
$IsoPath = "C:\Users\YourUser\Downloads\kubuntu-24.04-desktop-amd64.iso"
$VBoxManage = "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
& $VBoxManage createvm --name $VmName --ostype "Ubuntu_64" --register
& $VBoxManage modifyvm $VmName --memory 8192 --cpus 2 --vram 128 --graphicscontroller vmsvga --accelerate3d on
$VmFolder = "$env:USERPROFILE\VirtualBox VMs\$VmName"
& $VBoxManage createhd --filename "$VmFolder\$VmName.vdi" --size 204800 --format VDI
& $VBoxManage storagectl $VmName --name "SATA Controller" --add sata --controller IntelAHCI
& $VBoxManage storageattach $VmName --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$VmFolder\$VmName.vdi"
& $VBoxManage storagectl $VmName --name "IDE Controller" --add ide
& $VBoxManage storageattach $VmName --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive --medium $IsoPath
Write-Host "VM created. REMEMBER: Manually set Network to 'Bridged Adapter' in Settings > Network."- Start the VM and select Try or Install Kubuntu.
- Choose Install Kubuntu, select Language/Keyboard.
- Choose Normal Installation + Third-party software.
- Erase disk and install Kubuntu.
- Create User (Project Standard):
- Your name: Argentquest Dev
- Username:
argentquest<-- IMPORTANT - Password:
argentquest123<-- IMPORTANT - Computer name:
argentquest-vm
- Reboot when finished.
This step converts your fresh Kubuntu installation into a powerful development workstation.
The automated script below will install and configure the following tailored software stack:
- Docker Engine & Compose: The core containerization platform for running the 22-service suite.
- Python 3.13: The latest modern Python, configured with
venvanddevtools for backend development. - Visual Studio Code: The industry-standard IDE, installed with official Microsoft repositories.
- Git: Distributed version control for managing the project codebase.
- System Utilities: Essential tools like
curl,wget,htop, andunzip.
- Postman: Essential for testing expected payloads against the FastAPI endpoints.
- DBeaver: A powerful universal database client to manage PostgreSQL and MongoDB visually.
- LazyDocker: An amazing terminal UI for managing containers without leaving the command line.
Instead of running dozens of manual commands, use this script to install everything at once:
- Open Terminal (
Ctrl+Alt+T) in the VM. - Create
setup_env.sh:nano setup_env.sh
- Paste this content:
#!/bin/bash set -e # --- Standard Sudo Configuration --- echo ">>> Configuring standard sudo rights..." # Ensure current user has passwordless sudo (Standard for Dev VMs) echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/90-argentquest-nopasswd > /dev/null sudo chmod 440 /etc/sudoers.d/90-argentquest-nopasswd echo ">>> Updating system..." sudo apt update && sudo apt upgrade -y echo ">>> Installing Dependencies (curl, git, wget)..." sudo apt install -y software-properties-common curl git wget apt-transport-https ca-certificates gnupg htop unzip echo ">>> Installing Python 3.13..." sudo add-apt-repository ppa:deadsnakes/ppa -y sudo apt update sudo apt install -y python3.13 python3.13-venv python3.13-dev echo ">>> Installing Docker..." sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo usermod -aG docker $USER echo ">>> Installing VS Code..." wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list' rm -f packages.microsoft.gpg sudo apt update sudo apt install -y code echo ">>> Installing Power Tools (Postman, DBeaver, LazyDocker)..." # 1. Postman (API Testing) echo ">>> Installing Postman..." sudo snap install postman # 2. DBeaver (Universal Database Client) echo ">>> Installing DBeaver..." sudo snap install dbeaver-ce # 3. LazyDocker (Terminal UI for Docker) echo ">>> Installing LazyDocker..." curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash echo ">>> Done! Software stack installed. Please REBOOT now."
- Run it:
chmod +x setup_env.sh ./setup_env.sh
# Clone the repository
git clone <your-repo-url> argentquest-suite
cd argentquest-suite
# Set up environment configuration
cp .env.template .env
nano .env # Edit with your API keys and settings
# π DEPLOYMENT (The Standard Way)
# We use a 2-step process to ensure a clean, reliable state every time.
# 1. Nuclear Reset (Cleans Docker, Cache, & Old Data)
chmod +x reset_all.sh setup.sh
./reset_all.sh
# 2. Automated Setup (Builds, Launches & Configures)
./setup.shNote: The setup.sh script automatically handles:
- Building images with BuildKit
- Launching all 21 containers
- Waiting for healthy services
- Configuring the Nginx Proxy Manager
- Populating the Heimdall Dashboard
Since we rely on these two scripts, here is exactly what they do under the hood:
Think of this as a "Factory Reset" for your Docker environment. It fixes 99% of issues by clearing out corrupted state.
- Stops & Removes all project containers.
- Prunes all Docker system data (images, volumes, networks) to free disk space.
- Cleans project artifacts (
.venv,__pycache__, old logs). - Reclaims disk space (often freeing 5-10GB).
- Ensures a completely clean slate for the next build.
This is the intelligent installer that replaces manual configuration.
- Environment Check: Verifies Sudo rights, Docker status, and Port availability.
- Config Generation: Creates default
.envfiles if they are missing. - Sequential Build: Builds the core
app-devimage first to prevent Docker engine hangs. - Launch: Starts all 21 containers with
docker compose up. - Smart Wait: Polls the Nginx Proxy Manager API until it is healthy (instead of a fixed sleep timer).
- Auto-Configuration:
- Configures NPM proxy hosts via API.
- Sets up Heimdall dashboard links.
- Runs final system health checks.
You might notice containers like aq-devsuite-npm-setup and aq-devsuite-beszel-setup in your list.
- Purpose: These are temporary "worker" containers.
- Lifecycle: They run once to perform API configurations (like setting up proxy hosts) and then automatically exit.
- Cleanup: One the stack is healthy, these containers are stopped and no longer consume resources. They are kept only for logs/debugging.
For optimal performance with the 20-container stack:
| Component | Minimum | Recommended | Notes |
|---|---|---|---|
| RAM | 8GB | 16GB | 20 containers require significant memory |
| CPU Cores | 1 | 4 | Multiple services benefit from parallel processing |
| Storage | 100GB | 200GB | Docker images, volumes, and logs |
| Network | Bridged | Bridged | Required for external access to services |
Once deployed, you can access services from your host machine:
Update your host machine's hosts file:
Windows (Run as Administrator):
notepad C:\Windows\System32\drivers\etc\hostsLinux/macOS:
sudo nano /etc/hostsAdd these lines (replace VM_IP with your VM's IP address):
# Argentquest Development Suite in VM
VM_IP pocmaster.argentquest.com
VM_IP api.pocmaster.argentquest.com
VM_IP api-dev.pocmaster.argentquest.com
VM_IP pgadmin.pocmaster.argentquest.com
VM_IP portainer.pocmaster.argentquest.com
VM_IP heimdall.pocmaster.argentquest.com
VM_IP code.pocmaster.argentquest.com
The VM deployment uses the same environment file structure:
.env: Main configuration for local VM development.env.dev: Development container settings (debug mode).env.prod: Production container settings (performance mode)
Database connections in VM:
- PostgreSQL:
postgres:5432(internal) /VM_IP:5432(external) - MongoDB:
mongodb:27017(internal) /VM_IP:27017(external) - pgAdmin:
http://VM_IP:5050orhttp://pgadmin.pocmaster.argentquest.com
Firewall Configuration:
sudo ufw allow 80/tcp # HTTP
sudo ufw allow 443/tcp # HTTPS
sudo ufw allow 81/tcp # NPM Admin
sudo ufw allow 5050/tcp # pgAdmin direct access
sudo ufw --force enablePerformance Monitoring:
- System Monitor:
http://pocmaster.argentquest.com(after NPM setup) - Beszel Monitoring:
http://beszel.pocmaster.argentquest.com - Container Stats:
docker-compose psanddocker stats
VM Management Tips:
- Use VM snapshots before major changes
- Monitor VM resource usage with
htopanddocker stats - Regular backups of VM disk and configuration files
- Consider VM pausing/resuming for resource management
Even when running in a VM, the hot-reload functionality is preserved:
- Code Editing: Edit code on your host machine using VS Code
- File Sync: Use shared folders or Git to sync changes to VM
- Auto-Reload: The
app-devcontainer automatically detects changes - Testing: Access development API at
http://api-dev.pocmaster.argentquest.com
For seamless development, set up VirtualBox shared folders:
- VM Settings β Shared Folders β Add Folder
- Folder Path: Your local project directory
- Folder Name:
argentquest-suite - Auto-mount: β Enable
- Make Permanent: β Enable
Inside the VM:
# Install Guest Additions (if not already installed)
sudo apt install virtualbox-guest-additions-iso
# Mount shared folder
sudo mkdir -p /mnt/shared
sudo mount -t vboxsf argentquest-suite /mnt/shared
# Create symlink for easier access
ln -s /mnt/shared ~/argentquest-suiteFor better version control and isolation:
- Host Machine: Develop and commit changes
- VM: Pull latest changes with
git pull - Docker: Hot-reload automatically picks up changes
- Testing: Validate in VM environment before pushing
Create Snapshots:
- Before major changes
- After successful deployments
- Before system updates
Snapshot Strategy:
- Clean State: After initial setup
- Working State: After successful deployment
- Pre-Update: Before system or Docker updates
# Check VM resource usage
htop
docker stats
# Monitor disk space
df -h
docker system df
# Check container health
docker-compose ps
python3 health-check.py
# View service logs
docker-compose logs -f app-dev
docker-compose logs -f postgres
# Database validation
./validate-database-setup.sh
# Restart services
docker-compose restart app-dev app-prod
docker-compose down && docker-compose up -d# Check VM IP address
ip addr show
# Test Docker network connectivity
docker exec aq-devsuite-app-dev ping postgres
docker exec aq-devsuite-app-dev ping mongodb
# Check port accessibility from host
telnet VM_IP 80 # NPM
telnet VM_IP 5050 # pgAdmin# View environment configurations
cat .env # Main configuration
cat .env.dev # Development settings
cat .env.prod # Production settings
# Update environment variables
nano .env.dev
docker-compose restart app-dev
# Check environment variables in containers
docker exec aq-devsuite-app-dev env | grep DATABASE_URL
docker exec aq-devsuite-app-prod env | grep DATABASE_URL- Oracle VirtualBox Official Website: https://www.virtualbox.org/
- Ubuntu Official Website: https://ubuntu.com/
- Install VirtualBox on Windows 11: https://www.youtube.com/watch?v=S-p23428_yM
- Install VirtualBox on macOS: https://www.youtube.com/watch?v=3-h3_4a2-js
- Install Ubuntu Server 24.04 LTS: https://www.youtube.com/watch?v=...
- Connect to a VM with Putty: https://www.youtube.com/watch?v=...
- Connect to a VM with SSH on macOS: https://www.youtube.com/watch?v=...