Deployment guide
Bot migration checklist
Use this before moving VIRCON to a new host or after major updates.
Prerequisites
- Node.js v18+
- PM2 process manager
- Discord bot token
- VRChat credentials
- Server with 1GB RAM recommended
Files to transfer
- package.json and package-lock.json
- .env (create from .env.example)
- ecosystem.config.js
- src/ source code
- data/bot.db
- data/backups (recent files)
- watchdog.js
Migration steps
- Stop the bot and create a final backup.
- Transfer code, database, and backups to the server.
- Install dependencies with npm install.
- Create .env and set required keys.
- Run node check-db.js to verify integrity.
- Start services with pm2 start ecosystem.config.js.
- Save PM2 config and enable startup.
Verification
- Bot appears online in Discord.
- pm2 list shows all services online.
- Registration count matches expectations.
- Error log channel receives alerts.
- Hourly backups appear in data/backups.
PM2 commands
pm2 list
pm2 logs vrchat-logger-bot --lines 50
pm2 logs bot-watchdog --lines 50
pm2 restart vrchat-logger-bot
pm2 stop all