Server Migration Summary: MacBook Pro (.44) to Mac Mini (.9)
Initial Setup
- Source: MacBook Pro running Ubuntu (192.168.1.44)
- Destination: 2018 Mac Mini running Ubuntu (192.168.1.9)
- Architecture: Proxy server (.26) routes all traffic via SSL termination
- Challenge: Original documentation mentioned Apache, but actual setup was pure Nginx
Step 1: Network Configuration
-
Assigned static IP 192.168.1.9 to Mac Mini in router
-
Configured firewall on .9:
- Allowed ports 80, 443, 8080, 9002 from proxy server (.26)
sudo ufw allow from 192.168.1.26 to any port 8080sudo ufw allow from 192.168.1.26 to any port 9002
Step 2: Database Migration
-
MySQL setup on .9:
- Set root password
- Created admin user
spiffy-rootwith same password - Avoided auth_socket to prevent lockouts
-
Matomo database:
- Created database:
matomo_db - Created user:
matomo_user - Password:
H0m0-Mat0m0!(matched config file) - Exported from .44:
mysqldump -u matomo_user -p matomo_db > matomo.sql - Imported to .9:
mysql -u matomo_user -p matomo_db < matomo.sql
- Created database:
-
WordPress database:
- Skipped migration – did fresh install instead
Step 3: File Transfer
- Created tarball on .44:
sudo tar -czf /tmp/www-backup.tar.gz -C /var/www/html . - Transferred to .9:
scp /tmp/www-backup.tar.gz spiffy-root@192.168.1.9:/tmp/ - Extracted:
sudo tar -xzf www-backup.tar.gz -C /var/www/html/ - Set permissions:
sudo chown -R www-data:www-data /var/www/html/
Step 4: Web Server Configuration (Critical Discovery)
Key realization: .44 uses pure Nginx, NOT Apache+Nginx hybrid
-
Removed Apache from .9:
sudo systemctl stop apache2sudo systemctl disable apache2
-
Configured Nginx on .9:
-
Copied all nginx configs from .44 to .9
-
Three sites on Nginx:
- Matomo: port 80
- wp-flap: port 8080
- flap: port 8080
-
Removed default site to prevent conflicts
-
Enabled PHP-FPM:
sudo a2enconf php8.3-fpm(wait, this is Apache command but we’re using Nginx – the config just routes PHP to FPM socket)
-
-
PHP-FPM configuration:
- Service:
php8.3-fpm - Socket:
/run/php/php8.3-fpm.sock - All nginx sites use fastcgi_pass to this socket
- Service:
-
Fixed Matomo security issue:
- Original config blocked index.php from non-localhost
- Caused 500 errors from proxy server
- Removed restrictive location block
Step 5: Proxy Server Updates (.26)
Changed all proxy_pass directives from .44 to .9:
-
flap.shawns-machine.com:
- From:
http://192.168.1.44:8080 - To:
http://192.168.1.9:8080
- From:
-
wp-flap.shawns-machine.com:
- From:
http://192.168.1.44:8080 - To:
http://192.168.1.9:8080
- From:
-
matomo.shawns-machine.com:
- From:
http://192.168.1.44:80 - To:
http://192.168.1.9:80(or just IP without port)
- From:
-
After each change:
sudo nginx -t && sudo systemctl reload nginx
Step 6: Linear Webhook Migration
-
Transferred files:
tar -czf /tmp/linear-webhook-backup.tar.gz /home/spiffy/linear-webhook/- Extracted to
/home/spiffy-root/linear-webhook/on .9
-
Recreated Python environment:
sudo apt install python3.12-venvpython3 -m venv .venvsource .venv/bin/activatepip install flask gunicorn
-
Created systemd service at
/etc/systemd/system/linear-webhook.service:- Changed User from
spiffytospiffy-root - Changed all paths from
/home/spiffy/to/home/spiffy-root/ - Port: 9002
- Token and other env vars stayed the same
- Changed User from
-
Started service:
sudo systemctl daemon-reloadsudo systemctl enable linear-webhooksudo systemctl start linear-webhook
-
Updated proxy for Linear:
- From:
http://192.168.1.44:9002 - To:
http://192.168.1.9:9002
- From:
Critical Lessons for Production Setup
- Verify actual architecture first – Documentation may be outdated
- User consistency matters – .44 used
spiffy, .9 usesspiffy-root - Firewall rules essential – Proxy can’t reach backend without them
- Python venvs don’t transfer – Rebuild from scratch
- Database passwords – Must match between config files and MySQL users
- Test locally first – Use curl with Host headers before updating proxy
- Remove default sites – They catch requests meant for virtual hosts
Production Migration Simplified Steps
For your new Ryzen5 production server:
- Set static IP and configure firewall
- Install Nginx + PHP-FPM (skip Apache entirely)
- Transfer web files via tarball
- Export/import databases with correct passwords
- Copy nginx configs (update any IP/hostname references)
- Recreate Linear webhook venv
- Create systemd service for webhook
- Update proxy server routing
- Test each site before decommissioning old server
The production migration should be faster since you now know:
- Pure Nginx architecture (no Apache confusion)
- Firewall requirements upfront
- Database password matching importance
- Python venv recreation process
