Prerequisites
Before starting, ensure you have:
Server Requirements
- • RamNode VPS with Ubuntu 22.04/24.04
- • Minimum 2GB RAM (4GB+ recommended)
- • 20GB+ SSD storage
- • Root or sudo access
Additional Requirements
- • SSH access credentials
- • Bolt.diy app ready for deployment
- • Domain name (optional but recommended)
- • Basic Linux command knowledge
Initial Server Setup
Connect to your RamNode VPS and update the system:
ssh root@your-vps-ip-addressapt update && apt upgrade -yCreate a non-root user for security:
adduser boltapp
usermod -aG sudo boltapp
su - boltapp💡 Tip: Replace "your-vps-ip-address" with your actual RamNode VPS IP address.
Install Node.js and Dependencies
Install Node.js LTS version (20.x):
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejsnode --version
npm --versionv20.x.x
10.x.xInstall Git for repository management:
sudo apt install -y git✅ Node.js and Git are now installed and ready.
Install and Configure Nginx
Install Nginx web server:
sudo apt install -y nginxsudo ufw allow 'Nginx Full'
sudo ufw allow OpenSSH
sudo ufw enablesudo systemctl status nginx⚠️ Important: Make sure OpenSSH is allowed before enabling UFW to prevent losing SSH access!
Deploy Your Bolt.diy App
Clone your Bolt.diy application from Git:
cd ~
git clone https://github.com/yourusername/your-bolt-app.git
cd your-bolt-appAlternatively, upload via SCP from your local machine:
scp -r /path/to/your-bolt-app boltapp@your-vps-ip:~/Install dependencies and build your app:
npm install
npm run buildConfigure environment variables:
nano .envNODE_ENV=production
PORT=3000
# Add other app-specific variables here💡 Tip: Add all necessary API keys and configuration variables to your .env file.
Set Up PM2 Process Manager
Install PM2 to manage your Node.js application:
sudo npm install -g pm2pm2 start npm --name "bolt-app" -- startpm2 startup systemd
pm2 saveUseful PM2 commands for managing your app:
pm2 status # Check app status
pm2 logs bolt-app # View logs
pm2 restart bolt-app # Restart app
pm2 stop bolt-app # Stop app
pm2 delete bolt-app # Remove from PM2🚀 Your Bolt.diy app is now running with PM2!
Configure Nginx Reverse Proxy
Create an Nginx configuration file for your app:
sudo nano /etc/nginx/sites-available/bolt-appserver {
listen 80;
server_name your-domain.com www.your-domain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}Enable the site and restart Nginx:
sudo ln -s /etc/nginx/sites-available/bolt-app /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx💡 Tip: Replace "your-domain.com" with your actual domain name.
Set Up SSL with Let's Encrypt
Install Certbot for SSL certificate management:
sudo apt install -y certbot python3-certbot-nginxsudo certbot --nginx -d your-domain.com -d www.your-domain.comFollow the prompts and Certbot will automatically configure SSL for your domain.
sudo certbot renew --dry-run🔒 Your site is now secured with HTTPS! Certificates will auto-renew.
Monitoring and Logging
Monitor your application and server health:
pm2 logs bolt-app --lines 100sudo tail -f /var/log/nginx/access.log
sudo tail -f /var/log/nginx/error.loghtop # Install: sudo apt install htop
pm2 monit # PM2's built-in monitorSet up PM2 monitoring dashboard (optional):
pm2 monitor💡 Tip: Regularly check logs to identify and resolve issues quickly.
Troubleshooting
Common issues and solutions:
🎉 Deployment Complete!
Your Bolt.diy application is now live on RamNode VPS with SSL, process management, and monitoring in place. Your AI-powered development platform is ready to serve users securely and efficiently.
