Deploy Production-Ready Drupal on Digital Ocean in Minutes with Simple VPS Provisioner

The Problem: VPS Setup is Time-Consuming and Error-Prone
If you've ever deployed a Drupal site to a Virtual Private Server (VPS), you know the drill. Hours of work lie ahead: updating packages, configuring Nginx, installing PHP-FPM with the right extensions, securing MariaDB, setting up SSL certificates, configuring firewall rules, managing file permissions, and then finally—finally—installing Drupal.
Miss one configuration detail, and you'll spend even more time troubleshooting 502 errors, database connection failures, or permission issues. And that's just for one site. Need staging and production environments? Multiply that time investment.
The Solution: Simple VPS Provisioner
Simple VPS Provisioner (svp) is a command-line tool that automates the entire LAMP stack setup process for Drupal and WordPress. It transforms a fresh Debian or Ubuntu VPS into a production-ready environment in 5-15 minutes.
What Makes It Perfect for Digital Ocean?
Digital Ocean's droplets ship with clean Debian or Ubuntu installations—exactly what svp is designed for. Whether you're spinning up a $6/month basic droplet or a high-performance production server, svp handles all the provisioning complexity for you.
Real-World Use Case: From Zero to Production Drupal
Let's walk through a realistic scenario: deploying a production Drupal site with staging environment on Digital Ocean.
Prerequisites
Before you begin, you'll need:
- A Digital Ocean account with a fresh droplet (Debian 11-13 or Ubuntu 20.04-24.04 LTS)
- Root SSH access to your droplet
- A domain name with DNS configured to point to your droplet's IP address
- 5-10 minutes of your time
Step 1: Create Your Digital Ocean Droplet
- Log into your Digital Ocean dashboard
- Click "Create" → "Droplets"
- Choose your image: Debian 12 or Ubuntu 24.04 LTS
- Select your droplet size (minimum $6/month recommended for Drupal)
- Choose your datacenter region
- Add your SSH key for secure access
- Click "Create Droplet"
Wait 1-2 minutes for your droplet to provision. Note the IP address assigned.
Step 2: Configure DNS
Point your domain to your droplet:
A example.com YOUR_DROPLET_IP
A www.example.com YOUR_DROPLET_IPDNS propagation typically takes 5-30 minutes. You can check status with:
dig +short example.comStep 3: SSH Into Your Droplet
ssh root@YOUR_DROPLET_IPStep 4: Install Simple VPS Provisioner
Run the one-line installer:
curl -fsSL https://raw.githubusercontent.com/willjackson/simple-vps-provisioner/main/install-from-github.sh | sudo bashThis downloads and installs the latest version of svp. Verify installation:
sudo svp --versionStep 5: Deploy Your Drupal Site
Now for the magic. Run a single command:
sudo svp setup example.com \
--cms drupal \
--le-email admin@example.comThat's it. Seriously.
What Just Happened?
In the next 10-15 minutes, svp automatically:
- ✅ Updates system packages - Ensures your droplet has the latest security patches
- ✅ Installs and configures Nginx - Optimized web server configuration
- ✅ Installs PHP 8.4 with FPM - Latest PHP with all required Drupal extensions
- ✅ Installs and secures MariaDB - Database server with secure random credentials
- ✅ Creates isolated PHP-FPM pool - Dedicated pool for your domain
- ✅ Installs Composer - PHP dependency manager
- ✅ Installs Drupal 10 - Latest stable Drupal using Composer
- ✅ Configures SSL/HTTPS - Let's Encrypt certificate with auto-renewal
- ✅ Sets up UFW firewall - Configures ports 22, 80, and 443
- ✅ Installs Drush - Creates domain-specific Drush alias
- ✅ Sets proper permissions - Secure file ownership and permissions
- ✅ Generates login link - One-time admin login for immediate access
Step 6: Access Your Site
Once complete, you'll see output including:
✓ Site setup completed successfully!
Site URL: https://example.com
Database credentials: /etc/svp/sites/example.com.db.txt
Admin login: https://example.com/user/reset/1/...
Click the admin login link to set your password. Your Drupal site is live!Advanced Deployment Scenarios
Scenario 1: Deploy Existing Drupal Site from GitHub
If you have an existing Drupal site in a Git repository:
sudo svp setup example.com \
--cms drupal \
--git-repo git@github.com:yourcompany/yoursite.git \
--git-branch main \
--le-email admin@example.comWhat this does:
- Clones your repository to /var/www/example.com
- Runs composer install to install all dependencies
- Creates and configures a database
- Sets up Nginx and PHP-FPM
- Obtains SSL certificate
- Your site is deployed and running
Required repository structure:
yoursite/
├── composer.json # Required
├── web/ # Document root
│ ├── index.php
│ ├── sites/default/
│ ├── core/
│ ├── modules/
│ └── themes/
└── config/sync/ # Configuration managementScenario 2: Migrate Existing Site with Database
Moving from shared hosting or another server? Import your database during setup:
# First, upload your database backup to the droplet
scp mysite-backup.sql.gz root@YOUR_DROPLET_IP:/root/# Then provision with database import
sudo svp setup example.com \
--cms drupal \
--git-repo git@github.com:yourcompany/yoursite.git \
--db /root/mysite-backup.sql.gz \
--le-email admin@example.comDon't forget to sync your files:
rsync -avz /path/to/old/files/ /var/www/example.com/web/sites/default/files/
sudo chown -R admin:www-data /var/www/example.com/web/sites/default/files/
sudo chmod -R 775 /var/www/example.com/web/sites/default/files/Scenario 3: Multi-Environment Setup (Production + Staging)
Professional development workflow with separate environments:
# Production environment
sudo svp setup example.com \
--cms drupal \
--git-repo git@github.com:yourcompany/yoursite.git \
--git-branch main \
--le-email admin@example.com# Staging environment (separate domain)
sudo svp setup staging.example.com \
--cms drupal \
--git-repo git@github.com:yourcompany/yoursite.git \
--git-branch develop \
--le-email admin@example.com# Password-protect staging from public access
sudo svp auth staging.example.com enable \
--username team \
--password secure_staging_passWhat you get:
- example.com - Production site (main branch)
- staging.example.com - Staging site (develop branch)
- Each environment has:
- ✅ Separate database
- ✅ Isolated PHP-FPM pool
- ✅ Individual SSL certificate
- ✅ Independent file storage
Alternatively, use the --extra-domains flag:
sudo svp setup example.com \
--cms drupal \
--extra-domains "staging.example.com,dev.example.com" \
--git-repo git@github.com:yourcompany/yoursite.git \
--le-email admin@example.comThis creates three fully isolated environments on one droplet!
Scenario 4: Start Without SSL, Add It Later
Testing or not ready for SSL? Start with HTTP only:
# Initial setup without SSL (omit --le-email)
sudo svp setup example.com --cms drupalYour site runs on http://example.com. When ready to add SSL:
# Enable SSL later
sudo svp update-ssl example.com enable --le-email admin@example.comCertificates auto-renew via cron. Check status anytime:
sudo svp update-ssl example.com checkScenario 5: Custom PHP Version
Need a specific PHP version for compatibility?
sudo svp setup example.com \
--cms drupal \
--php-version 8.3 \
--le-email admin@example.comSupported versions: 8.1, 8.2, 8.3, 8.4
Need to upgrade later?
sudo svp php-update example.com --php-version 8.4
This safely transitions your site to the new PHP version with zero downtime.
Day-to-Day Operations
Managing Your Drupal Site
Once deployed, you'll use standard Drupal tools:
Using Drush (domain-specific alias):
# Clear cache
drush-example.com cr
# Get one-time login link
drush-example.com uli
# Run database updates
drush-example.com updb
# Import configuration
drush-example.com cim
# Export configuration
drush-example.com cex
# Check site status
drush-example.com statusUpdate Drupal core and modules:
cd /var/www/example.com
sudo -u admin composer update drupal/core-recommended --with-dependencies
drush-example.com updb
drush-example.com crInstall a new module:
cd /var/www/example.com
sudo -u admin composer require drupal/admin_toolbar
drush-example.com en admin_toolbar -y
drush-example.com crDeploying Code Updates
If using Git deployment:
cd /var/www/example.com
sudo -u admin git pull
sudo -u admin composer install
drush-example.com updb
drush-example.com cim
drush-example.com crDatabase Backups
Create a backup:
drush-example.com sql-dump --gzip > backup-$(date +%Y%m%d).sql.gzRestore a backup:
cd /var/www/example.com
zcat backup-20250114.sql.gz | drush-example.com sql-cli
drush-example.com crView Database Credentials
sudo cat /etc/svp/sites/example.com.db.txtOutput:
Database: drupal_example_com
Username: drupal_example_com
Password: [secure-random-password]
Host: localhost
Port: 3306Security Features
svp implements security best practices automatically:
1. Firewall Configuration
- UFW firewall enabled by default
- Only ports 22 (SSH), 80 (HTTP), and 443 (HTTPS) open
- IPv4 and IPv6 protected
2. Database Security
- Random, strong passwords for each database user
- Isolated database per domain
- No remote database access (localhost only)
- Credentials stored in root-only readable files
3. File Permissions
- Web files owned by admin:www-data
- Settings files set to read-only
- Database credential files (settings.svp.php) restricted to owner-only (400)
- Files directory properly configured (775)
4. PHP-FPM Isolation
- Dedicated PHP-FPM pool per domain
- Isolated process management
- Domain-specific error logging
- Resource limits configured
5. SSL/HTTPS
- Let's Encrypt certificates with automatic renewal
- HTTPS-only redirect when SSL enabled
- Modern TLS configuration
6. Basic Authentication
- Password-protect staging/dev sites
- Bcrypt-hashed credentials
- Quick enable/disable without removing credentials
# Protect a development site
sudo svp auth dev.example.com enable \
--username developer \
--password devpass123# Check status
sudo svp auth dev.example.com check# Remove protection
sudo svp auth dev.example.com disableCost Optimization on Digital Ocean
Recommended Droplet Sizes
For Testing/Development:
- Basic Droplet: $6/month (1 GB RAM, 1 vCPU, 25 GB SSD)
- Perfect for: Development sites, feature testing, personal projects
For Small Production Sites:
- Regular Droplet: $12/month (2 GB RAM, 1 vCPU, 50 GB SSD)
- Perfect for: Small business sites, blogs, portfolio sites
- Handles: ~100k monthly pageviews
For Medium Production Sites:
- Professional Droplet: $24/month (4 GB RAM, 2 vCPUs, 80 GB SSD)
- Perfect for: Growing businesses, e-commerce, high-traffic sites
- Handles: ~500k+ monthly pageviews
Pro tip: Start small and scale up as needed. Digital Ocean makes it easy to resize droplets.
Multi-Site Cost Savings
Instead of separate droplets for each environment:
Traditional approach:
- Production droplet: $12/month
- Staging droplet: $12/month
- Total: $24/month
With svp multi-domain:
- Single droplet: $18/month (2 GB RAM)
- Hosts production + staging + dev
- Total: $18/month (save $6/month, $72/year)
sudo svp setup example.com \
--cms drupal \
--extra-domains "staging.example.com,dev.example.com" \
--git-repo git@github.com:yourcompany/site.git \
--le-email admin@example.comTroubleshooting Common Issues
Issue 1: DNS Not Configured
Error message:
[!] DNS mismatch detected!
Solution: Configure your DNS A record and wait for propagation (5-30 minutes):
dig +short example.com# Should return your droplet IP
Issue 2: SSL Certificate Failed
Common causes:
- DNS not pointing to server yet
- Port 80/443 blocked
- Let's Encrypt rate limit (5 certs per week)
Solution: Start without SSL, add it later:
# Setup without SSL first
sudo svp setup example.com --cms drupal# Test that site works
curl -I http://example.com# Add SSL when DNS is confirmed
sudo svp update-ssl example.com enable --le-email admin@example.comIssue 3: Site Returns 502 Bad Gateway
Check PHP-FPM status:
sudo systemctl status php8.4-fpmCheck PHP-FPM logs:
sudo tail -f /var/log/php8.4-fpm-example.com-error.logRestart PHP-FPM:
sudo systemctl restart php8.4-fpmIssue 4: Database Connection Failed
Verify database exists:
sudo mysql -e "SHOW DATABASES LIKE 'drupal_example_com';"Check credentials:
sudo cat /etc/svp/sites/example.com.db.txtTest database connection:
mysql -u drupal_example_com -p# Enter password from credentials file
Issue 5: Permission Issues
Fix file permissions:
cd /var/www/example.com
sudo chown -R admin:www-data .
sudo chmod -R 755 .
sudo chmod -R 775 web/sites/default/files/Maintenance and Updates
Update Simple VPS Provisioner
Check for svp updates regularly:
sudo svp updateThis checks GitHub releases and installs the latest version.
System Updates
Keep your droplet updated:
sudo apt update
sudo apt upgrade -ySSL Certificate Renewal
Certificates auto-renew via cron. Check status:
sudo svp update-ssl example.com checkManually renew if needed:
sudo svp update-ssl example.com renewVerify Configuration
Audit your server configuration:
sudo svp verifyThis checks all services, configurations, and certificates.
Why Choose SVP for Digital Ocean Drupal Hosting?
1. Time Savings
- Manual setup: 2-4 hours
- With svp: 10-15 minutes
- ROI: 8-24x faster deployment
2. Consistency
- Every deployment identical
- No missed configuration steps
- Reproducible environments
3. Best Practices Built-In
- Security hardening automatic
- Optimized performance settings
- Industry-standard directory structure
4. Flexibility
- Multiple environments on one droplet
- Easy PHP version management
- Git-based deployment workflow
5. Cost-Effective
- Open source and free
- Run multiple sites per droplet
- No proprietary hosting fees
6. Full Control
- Root access to your droplet
- No vendor lock-in
- Direct SSH access
- Complete transparency
Getting Started Checklist
Ready to deploy Drupal on Digital Ocean with svp? Follow this checklist:
Create Digital Ocean account
Spin up Debian 12 or Ubuntu 24.04 droplet
Configure DNS A records for your domain
SSH into droplet as root
Install svp:
curl -fsSL https://raw.githubusercontent.com/willjackson/simple-vps-provisioner/main/install-from-github.sh | bash
Run setup:
sudo svp setup yourdomain.com --cms drupal --le-email your@email.com
Wait 10-15 minutes
Access your site and set admin password
Configure your Drupal site
Deploy!
Conclusion
Deploying production Drupal sites on Digital Ocean doesn't have to be complex or time-consuming. Simple VPS Provisioner eliminates the tedious server setup process, letting you focus on building great Drupal experiences instead of configuring servers.
Whether you're deploying a single site or managing multiple environments, svp provides a fast, secure, and cost-effective solution that puts you in full control of your infrastructure.
Ready to get started? Spin up a Digital Ocean droplet and deploy your first Drupal site in the next 15 minutes.
Resources
- 📚 Full Documentation: https://willjackson.github.io/simple-vps-provisioner/
- 🐙 GitHub Repository: https://github.com/willjackson/simple-vps-provisioner
- 💬 Get Help: GitHub Issues
- 🌊 Digital Ocean: Get $200 credit for 60 days
About Simple VPS Provisioner: An open-source, MIT-licensed tool built for the Drupal and WordPress communities. Contributions welcome!
Related Content

Simple VPS Provisioner
Simple VPS Provisioner (SVP) is a Go-based command-line utility that automates the provisioning of Debian 13 (Trixie) servers into fully configured, production-ready LAMP environments for Drupal or WordPress. With a single command, it installs and configures Nginx, PHP-FPM, MariaDB, Composer, and Certbot. Additionally, install per-domain PHP-FPM pools, UFW firewall rules, and secure SSL certificates. SVP emphasizes speed, idempotency, and security, offering reproducible setups you can trust to run multiple times without breaking existing configurations.

Drupal Recipes: A Smarter Way to Assemble Site Features
Drupal Recipes let you assemble site features quickly, predictably, and without the usual configuration grind, offering a cleaner and more efficient way to build.

How to Configure Drupal MCP with Claude Desktop
Configure Drupal MCP for secure, local development and connect it to Claude Desktop so you can use AI-powered tools to manage and interact with your Drupal site.