Rawdoq VPS Server: The Ultimate Developer Setup
If you're tired of dealing with unreliable hosting providers, confusing pricing models, and servers that can't handle your development needs, it's time to talk about Rawdoq.
In this guide, I'll walk you through setting up a VPS server that's perfect for developers, from initial configuration to deployment automation.
Why Rawdoq?
Before we dive into the setup, let's talk about why Rawdoq stands out in the crowded VPS market:
1. Developer-First Approach
- Pre-configured development environments
- One-click application deployments
- Git integration out of the box
- Built-in CI/CD pipelines
2. Transparent Pricing
- No hidden fees
- Predictable monthly costs
- Resource scaling without surprises
- Free tier for experimentation
3. Performance
- NVMe SSD storage
- High-bandwidth connections
- Global data centers
- 99.9% uptime SLA
Initial Server Setup
Step 1: Choose Your Configuration
For most development workloads, I recommend starting with:
CPU: 2 vCPUs
RAM: 4GB
Storage: 80GB NVMe SSD
Bandwidth: 4TB
Location: Choose closest to your users
Step 2: Operating System Selection
I prefer Ubuntu 22.04 LTS for its stability and extensive package support:
# Update the system
sudo apt update && sudo apt upgrade -y
# Install essential packages
sudo apt install -y curl wget git vim htop ufw fail2ban
Step 3: Security Hardening
Security should be your first priority:
# Create a new user (replace 'yourusername')
sudo adduser yourusername
sudo usermod -aG sudo yourusername
# Disable root login and password authentication
sudo vim /etc/ssh/sshd_config
Edit these lines:
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
# Restart SSH service
sudo systemctl restart ssh
# Configure firewall
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow 80
sudo ufw allow 443
sudo ufw enable
Development Environment Setup
Node.js & NPM
# Install Node.js via NodeSource repository
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify installation
node --version
npm --version
Docker & Docker Compose
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add user to docker group
sudo usermod -aG docker $USER
# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Nginx & SSL
# Install Nginx
sudo apt install nginx -y
# Install Certbot for SSL
sudo apt install certbot python3-certbot-nginx -y
# Start and enable Nginx
sudo systemctl start nginx
sudo systemctl enable nginx
Database Setup
PostgreSQL
# Install PostgreSQL
sudo apt install postgresql postgresql-contrib -y
# Create database and user
sudo -u postgres psql
CREATE DATABASE myapp_production;
CREATE USER myapp_user WITH PASSWORD 'secure_password';
GRANT ALL PRIVILEGES ON DATABASE myapp_production TO myapp_user;
\q
Redis (for caching)
# Install Redis
sudo apt install redis-server -y
# Configure Redis for production
sudo vim /etc/redis/redis.conf
Update these settings:
supervised systemd
maxmemory 256mb
maxmemory-policy allkeys-lru
Deployment Automation
PM2 for Node.js Applications
# Install PM2 globally
npm install -g pm2
# Create ecosystem file
vim ecosystem.config.js
module.exports = {
apps: [{
name: 'myapp',
script: './dist/index.js',
instances: 'max',
exec_mode: 'cluster',
env: {
NODE_ENV: 'production',
PORT: 3000
}
}]
}
GitHub Actions Deployment
Create .github/workflows/deploy.yml:
name: Deploy to Rawdoq VPS
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Deploy to server
uses: appleboy/ssh-action@v0.1.5
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd /var/www/myapp
git pull origin main
npm install --production
npm run build
pm2 reload myapp
Monitoring & Maintenance
System Monitoring
# Install htop for system monitoring
sudo apt install htop -y
# Install netdata for web-based monitoring
bash <(curl -Ss https://my-netdata.io/kickstart.sh)
Log Management
# Configure log rotation
sudo vim /etc/logrotate.d/myapp
/var/log/myapp/*.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
create 644 myapp myapp
postrotate
pm2 reload myapp
endscript
}
Automated Backups
# Create backup script
vim /home/yourusername/backup.sh
#!/bin/bash
DATE=$(date +%Y%m%d_%H%M%S)
BACKUP_DIR="/backups"
# Database backup
pg_dump -U myapp_user myapp_production > $BACKUP_DIR/db_$DATE.sql
# File backup
tar -czf $BACKUP_DIR/files_$DATE.tar.gz /var/www/myapp
# Clean old backups (keep last 7 days)
find $BACKUP_DIR -name "*.sql" -mtime +7 -delete
find $BACKUP_DIR -name "*.tar.gz" -mtime +7 -delete
# Make it executable and add to cron
chmod +x /home/yourusername/backup.sh
crontab -e
Add: 0 2 * * * /home/yourusername/backup.sh
Performance Optimization
Nginx Configuration
server {
listen 80;
server_name yourdomain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name yourdomain.com;
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
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_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;
proxy_cache_bypass $http_upgrade;
}
}
System Optimization
# Optimize kernel parameters
sudo vim /etc/sysctl.conf
Add:
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 12582912 16777216
net.ipv4.tcp_wmem = 4096 12582912 16777216
Troubleshooting Common Issues
High Memory Usage
# Check memory usage
free -h
# Find memory-hungry processes
ps aux --sort=-%mem | head
Disk Space Issues
# Check disk usage
df -h
# Find large files
du -sh /* | sort -rh | head -10
Network Connectivity
# Test network connectivity
ping google.com
# Check open ports
netstat -tulpn
Conclusion
Setting up a Rawdoq VPS server might seem daunting at first, but following this guide gives you a production-ready environment that can handle serious workloads.
Remember:
- Security first - always harden your server
- Automate everything you can
- Monitor your resources
- Keep backups current
- Document your setup
With this configuration, you'll have a robust, scalable server that grows with your projects.
Have questions about VPS setup or ran into issues? Drop a comment below or reach out on Twitter. I'm always happy to help fellow developers!
