# VPS Migratie Handleiding # Server: 217.160.175.202 (Strato) → Nieuwe Server # Laatst bijgewerkt: 2026-07-15 # # Deze handleiding zit in de backup op de NAS (/volume1/VPSBackup/daily/) # Samen met alle bestanden die je nodig hebt. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ## 1. OVERZICHT: WAT DRAAIT ER OP DE VPS? ### Websites & Apps | Service | Port | PM2 Process | Domein | |---------|------|-------------|--------| | Jarvis Dashboard | 3002 | jarvis-dashboard | dashboard.oexmanai.nl | | CV Site | 3000 | cv-site | christiaanoexman.nl | | Minecraft API | 8080 | (systemd) | mc.oexmanai.nl | | OpenClaw Gateway | 18789 | (direct) | oexmanai.nl | ### Minecraft Servers | Server | Port | Path | Systemd | |--------|------|------|---------| | Minecraft Paper | 25565 | /opt/minecraft-paper/ | minecraft.service | | Minecraft Test | 25566 | /opt/minecraft-test/ | minecraft-test.service | | Minecraft API | 8080 | /root/.openclaw/workspace/minecraft-api/ | minecraft-api.service | ### Overige - Nginx (reverse proxy + SSL) - Tailscale VPN (hostname: vps-strato, IP: 100.98.73.48) - OpenClaw 2026.6.11 - Java 25 (OpenJDK) - Node.js v22.22.3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ## 2. BACKUP INHOUD (wat staat op de NAS) De backup staat op: /volume1/VPSBackup/daily/ op de Synology NAS (nasoexies1) | Map | Inhoud | |-----|--------| | minecraft-paper/ | Volledige Minecraft server (world, mods, config) | | minecraft-test/ | Test server | | dashboard/ | Jarvis Dashboard (/root/dashboard/) | | cv-site/ | CV website (/root/cv-site/) | | openclaw-workspace/ | OpenClaw workspace (MEMORY.md, SOUL.md, etc.) | | openclaw-config/ | openclaw.json (hoofdconfiguratie) | | openclaw-agents/ | Agent data (sessies, context) | | openclaw-memory/ | Memory index database (SQLite) | | openclaw-cron/ | Cron jobs config | | openclaw-credentials/ | Credentials (WhatsApp etc.) | | openclaw-identity/ | Identity files | | openclaw-state/ | State files | | openclaw-extensions/ | Extensions | | openclaw-plugins/ | Plugin installs | | openclaw-plugin-skills/ | Custom plugin skills | | openclaw-flows/ | Flow definitions | | openclaw-hooks/ | Hooks (jarvis-notify etc.) | | openclaw-tasks/ | Task data | | openclaw-devices/ | Device pairings | | openclaw-logs/ | Logs | | www/ | /var/www/ (mc.oexmanai.nl frontend) | | nginx-config/ | /etc/nginx/ configuratie | | pm2-config/ | PM2 dump.pm2 | | restic-repo-password/ | Restic password file | | crontab.txt | Crontab inhoud | | sysinfo.txt | Volledige systeem info (OS, versies, packages) | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ## 3. STAP-BY-STAP MIGRATIE ### Stap 1: Nieuwe server voorbereiden ```bash # Ubuntu 24.04 LTS installeren # Log in als root # Systeem updaten apt update && apt upgrade -y # Essentiële packages installeren apt install -y curl git build-essential nginx ufw python3 ``` ### Stap 2: Node.js installeren ```bash # Node.js 22 LTS via NodeSource curl -fsSL https://deb.nodesource.com/setup_22.x | bash - apt install -y nodejs # Verifieer node --version # moet v22.x zijn npm --version ``` ### Stap 3: PM2 en OpenClaw installeren ```bash # PM2 globaal npm install -g pm2 # OpenClaw globaal npm install -g openclaw # Verifieer pm2 --version openclaw --version ``` ### Stap 4: Java installeren (voor Minecraft) ```bash # OpenJDK 25 apt install -y openjdk-25-jdk-headless # Of via SDKMAN voor specifieke versies: # curl -s "https://get.sdkman.io" | bash # sdk install java 25-open java -version ``` ### Stap 5: Tailscale installeren (voor NAS backup) ```bash # Tailscale curl -fsSL https://tailscale.com/install.sh | sh tailscale up --hostname=vps-strato --accept-routes # Verifieer verbinding met NAS tailscale status ping 100.87.134.75 # NAS Tailscale IP ``` ### Stap 6: SSH key voor NAS backup ```bash # Genereer SSH key ssh-keygen -t ed25519 -f /root/.ssh/backup_nas -C "vps-backup@newserver" # Kopieer naar NAS (via Tailscale) ssh-copy-id -i /root/.ssh/backup_nas.pub backup@100.87.134.75 # Test verbinding ssh -i /root/.ssh/backup_nas backup@100.87.134.75 "echo connected" ``` ### Stap 7: Bestanden terugzetten van NAS ```bash # Maak mappen aan mkdir -p /opt /root/dashboard /root/cv-site /var/www /etc/nginx # Alles terughalen via rsync (vanaf NAS) NAS="backup@100.87.134.75" KEY="/root/.ssh/backup_nas" BASE="/volume1/VPSBackup/daily" # Minecraft servers rsync -avz --rsync-path=/usr/bin/rsync -e "ssh -i $KEY" \ $NAS:$BASE/minecraft-paper/ /opt/minecraft-paper/ rsync -avz --rsync-path=/usr/bin/rsync -e "ssh -i $KEY" \ $NAS:$BASE/minecraft-test/ /opt/minecraft-test/ # Dashboard rsync -avz --rsync-path=/usr/bin/rsync -e "ssh -i $KEY" \ $NAS:$BASE/dashboard/ /root/dashboard/ # CV site rsync -avz --rsync-path=/usr/bin/rsync -e "ssh -i $KEY" \ $NAS:$BASE/cv-site/ /root/cv-site/ # Web files rsync -avz --rsync-path=/usr/bin/rsync -e "ssh -i $KEY" \ $NAS:$BASE/www/ /var/www/ # Nginx config rsync -avz --rsync-path=/usr/bin/rsync -e "ssh -i $KEY" \ $NAS:$BASE/nginx-config/ /etc/nginx/ # OpenClaw (ALLE items) for dir in workspace agents memory cron credentials identity state \ extensions plugins plugin-skills flows hooks tasks devices logs; do rsync -avz --rsync-path=/usr/bin/rsync -e "ssh -i $KEY" \ $NAS:$BASE/openclaw-$dir/ /root/.openclaw/$dir/ done # OpenClaw config file rsync -avz --rsync-path=/usr/bin/rsync -e "ssh -i $KEY" \ $NAS:$BASE/openclaw-config /root/.openclaw/openclaw.json # Crontab rsync -avz --rsync-path=/usr/bin/rsync -e "ssh -i $KEY" \ $NAS:$BASE/crontab.txt /tmp/crontab.txt crontab /tmp/crontab.txt # Restic password (voor toekomstige backups) rsync -avz --rsync-path=/usr/bin/rsync -e "ssh -i $KEY" \ $NAS:$BASE/restic-repo-password /root/.restic-repo-password # PM2 config rsync -avz --rsync-path=/usr/bin/rsync -e "ssh -i $KEY" \ $NAS:$BASE/pm2-config /root/.pm2/dump.pm2 ``` ### Stap 8: Nginx configureren ```bash # Nginx config is al teruggezet in stap 7 # Maar SSL certificaten moeten opnieuw worden aangemaakt # Certbot installeren apt install -y certbot python3-certbot-nginx # DNS records aanpassen naar nieuwe server IP voordat je dit doet! # Verifieer dat DNS is bijgewerkt: dig dashboard.oexmanai.nl +short # moet nieuw IP tonen # SSL certificaten aanmaken certbot --nginx -d dashboard.oexmanai.nl certbot --nginx -d christiaanoexman.nl -d www.christiaanoexman.nl certbot --nginx -d mc.oexmanai.nl certbot --nginx -d oexmanai.nl -d www.oexmanai.nl # Nginx herstarten nginx -t && systemctl restart nginx ``` ### Stap 9: Minecraft servers opzetten ```bash # Systemd services aanmaken # --- minecraft-paper.service --- cat > /etc/systemd/system/minecraft.service << 'EOF' [Unit] Description=Minecraft Server After=network.target [Service] Type=simple User=root WorkingDirectory=/opt/minecraft-paper ExecStart=/usr/bin/java -Xms2G -Xmx2G -jar fabric-server-launch.jar nogui Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target EOF # --- minecraft-test.service --- cat > /etc/systemd/system/minecraft-test.service << 'EOF' [Unit] Description=Minecraft Test Server After=network.target [Service] Type=simple User=root WorkingDirectory=/opt/minecraft-test ExecStart=/usr/bin/java -Xms2G -Xmx2G -jar fabric-server-launch.jar nogui Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target EOF # --- minecraft-api.service --- # Bekijk de originele service file in de backup of: cat > /etc/systemd/system/minecraft-api.service << 'EOF' [Unit] Description=Minecraft API Server After=network.target [Service] Type=simple User=root WorkingDirectory=/root/.openclaw/workspace/minecraft-api ExecStart=/usr/bin/node server.js Restart=on-failure RestartSec=10 Environment=PORT=8080 [Install] WantedBy=multi-user.target EOF # Services activeren systemctl daemon-reload systemctl enable minecraft.service minecraft-test.service minecraft-api.service systemctl start minecraft-api.service # Start Minecraft servers wanneer wereld data is teruggezet systemctl start minecraft minecraft-test ``` ### Stap 10: PM2 processes starten ```bash # Dashboard dependencies installeren cd /root/dashboard npm install # CV site dependencies installeren cd /root/cv-site npm install # PM2 processes starten cd /root/dashboard && pm2 start server.js --name jarvis-dashboard cd /root/cv-site && pm2 start server.js --name cv-site # PM2 opslaan (auto-start bij reboot) pm2 save pm2 startup # volg instructies op scherm ``` ### Stap 11: OpenClaw starten ```bash # OpenClaw gateway starten openclaw gateway --port 18789 & # Of als je OpenClaw's eigen service manager wilt gebruiken: # openclaw setup # volg de wizard # Verifieer openclaw status ``` ### Stap 12: Backup script instellen ```bash # Zorg dat het backup script aanwezig is # (zit in de crontab die je hebt teruggezet) ls -la /root/scripts/backup-to-nas.sh # Als het er niet is, haal het uit git of maak het opnieuw # Zie: /root/scripts/backup-to-nas.sh in de backup # Test de backup bash /root/scripts/backup-to-nas.sh ``` ### Stap 13: Firewall (optioneel maar aanbevolen) ```bash ufw allow 22/tcp # SSH ufw allow 80/tcp # HTTP ufw allow 443/tcp # HTTPS ufw allow 25565/tcp # Minecraft ufw allow 25566/tcp # Minecraft test ufw allow 25575/tcp # RCON ufw allow 25576/tcp # RCON test ufw allow 18789/tcp # OpenClaw (alleen via Tailscale!) ufw enable ``` ### Stap 14: Cron jobs verifiëren ```bash crontab -l # Zou moeten bevatten: # */5 * * * * cd /opt/mcpanel-scripts && node sync-cobblemon-dex.js ... # 0 3 * * * /bin/bash /root/scripts/backup-to-nas.sh ... ``` ### Stap 15: Alles testen ```bash # Websites curl -s https://dashboard.oexmanai.nl | head -5 curl -s https://christiaanoexman.nl | head -5 curl -s https://mc.oexmanai.nl | head -5 # Minecraft systemctl status minecraft minecraft-test minecraft-api # PM2 pm2 list # OpenClaw openclaw status # Backup bash /root/scripts/backup-to-nas.sh # Push notificaties # Log in op dashboard.oexmanai.nl en tik op het belletje 🔔 ``` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ## 4. BELANGRIKE GEHEIMEN / WACHTWOORDEN Deze staan NIET in deze handleiding maar wel in de backup: - /root/.openclaw/openclaw.json → bevat API keys en config - /root/.openclaw/credentials/ → bevat WhatsApp credentials - /root/dashboard/data/config.json → bevat dashboard API keys - /root/.restic-repo-password → Restic repo wachtwoord ### Wachtwoorden die je moet weten: - Dashboard login: christiaan / jarvis2024 - CV site admin: ffoJqVyp0uGpfF - NAS backup user: backup / (zie Synology) - RCON Minecraft: staat in /opt/minecraft-paper/rcon_password.txt ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ## 5. DNS RECORDEN DIE JE MOET AANPASSEN Voordat je de migratie doet, pas deze DNS records aan naar het nieuwe server IP: | Record | Type | Domein | Doel | |--------|------|--------|------| | A | dashboard.oexmanai.nl | → nieuw IP | | A | christiaanoexman.nl | → nieuw IP | | A | www.christiaanoexman.nl | → nieuw IP | | A | mc.oexmanai.nl | → nieuw IP | | A | oexmanai.nl | → nieuw IP | | A | www.oexmanai.nl | → nieuw IP | Wacht 24-48u voordat je de oude server uitschakelt (DNS propagatie). ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ## 6. QUICK REFERENCE: DAGELIJKSE OPERATIES ```bash # Status checken pm2 list # PM2 processes systemctl status minecraft # Minecraft server systemctl status minecraft-test # Test server systemctl status minecraft-api # Minecraft API openclaw status # OpenClaw # Logs bekijken pm2 logs jarvis-dashboard --lines 50 pm2 logs cv-site --lines 50 journalctl -u minecraft -f journalctl -u minecraft-test -f tail -f /var/log/vps-backup.log # Backup log # Backup handmatig draaien bash /root/scripts/backup-to-nas.sh # Nginx herstarten (na config wijziging) nginx -t && systemctl restart nginx # SSL certificaat vernieuwen (gebeurt automatisch via certbot) certbot renew --dry-run # test ``` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ## 7. TROUBLESHOOTING ### Dashboard niet bereikbaar? 1. Check: pm2 list (is jarvis-dashboard online?) 2. Check: curl http://localhost:3002 (luistert de app?) 3. Check: nginx -t (nginx config correct?) 4. Check: systemctl status nginx (nginx draait?) ### Minecraft server start niet? 1. Check: java -version (Java geïnstalleerd?) 2. Check: ls /opt/minecraft-paper/fabric-server-launch.jar 3. Check: journalctl -u minecraft -f (logs lezen) ### OpenClaw werkt niet? 1. Check: openclaw status 2. Check: /root/.openclaw/openclaw.json bestaat en is geldig JSON 3. Check: npm list -g openclaw (is OpenClaw geïnstalleerd?) ### Backup faalt? 1. Check: tailscale status (VPN verbinding met NAS?) 2. Check: ssh -i /root/.ssh/backup_nas backup@100.87.134.75 "echo ok" 3. Check: /var/log/vps-backup.log (logs lezen) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Deze handleiding is gegenereerd door Jarvis op 2026-07-15. Na een migratie: werk deze handleiding bij met de nieuwe server details!