Skip to content

willjackson/simple-vps-provisioner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

89 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Simple VPS Provisioner (svp)

Automate your VPS setup in minutes with a single command.

Simple VPS Provisioner is a command-line tool that transforms a fresh Debian or Ubuntu VPS into a production-ready LAMP environment for Drupal or WordPress.

⚠️ Intended Use

This tool is designed for fresh VPS installations running the latest versions of:

  • Debian (11, 12, or 13 Trixie)
  • Ubuntu LTS (20.04, 22.04, or 24.04)

Important: Run svp on a newly provisioned VPS before installing other software. Running on a system with existing web server, database, or PHP configurations may cause conflicts. For best results, start with a clean OS installation.

License: MIT Go Version

πŸ“š Full Documentation


Features

  • βœ… Complete LAMP Stack - Nginx, PHP-FPM, MariaDB, optional SSL
  • βœ… One Command Setup - From fresh VPS to running site in minutes
  • βœ… Multi-CMS - Drupal and WordPress support
  • βœ… Multi-Domain - Multiple sites on one server
  • βœ… Git Deployment - Clone and deploy from repositories
  • βœ… Optional SSL - Let's Encrypt with auto-renewal (opt-in via --le-email)
  • βœ… Basic Authentication - Password-protect sites with HTTP basic auth
  • βœ… Security First - Firewall, hardening, isolation
  • βœ… Idempotent - Safe to run multiple times

Quick Start

1. Install svp

curl -fsSL https://raw.githubusercontent.com/willjackson/simple-vps-provisioner/main/install-from-github.sh | sudo bash

2. Provision Your Site

Drupal:

sudo svp setup example.com --cms drupal --le-email admin@example.com

WordPress:

sudo svp setup example.com --cms wordpress --le-email admin@example.com

That's it! Visit https://example.com (HTTPS enabled with --le-email) πŸŽ‰

HTTP-only setup (no SSL):

sudo svp setup example.com --cms drupal

Visit http://example.com


System Requirements

  • OS: Debian 11-13 or Ubuntu 20.04-24.04 LTS
  • Access: Root/sudo privileges

Common Use Cases

Deploy from Git Repository

sudo svp setup example.com \
  --cms drupal \
  --git-repo https://github.com/yourorg/yoursite.git \
  --le-email admin@example.com

Multiple Environments

sudo svp setup example.com \
  --cms drupal \
  --extra-domains "staging.example.com,dev.example.com" \
  --le-email admin@example.com

Import Existing Database

sudo svp setup example.com \
  --cms drupal \
  --db /path/to/backup.sql.gz \
  --le-email admin@example.com

Update PHP Version

sudo svp php-update example.com --php-version 8.4

Essential Commands

# Check version
svp --version

# Verify configuration
sudo svp verify

# Update svp
sudo svp update

# Update SSL certificates (check renewal or enable SSL)
sudo svp update-ssl example.com check

# Check basic authentication status
sudo svp auth example.com check

# View help
svp

What Gets Installed

For each site, svp configures:

Component Description
Nginx Web server with optimized config
PHP-FPM Isolated per-domain pools
MariaDB Database with secure credentials
SSL/HTTPS Let's Encrypt certificates (optional, enabled via --le-email)
Firewall UFW configured (SSH, HTTP, HTTPS)
Composer PHP dependency manager
Drush/WP-CLI CMS-specific tools

Note: SSL is disabled by default. To enable HTTPS, provide --le-email during setup or use svp update-ssl after initial setup.


Key Configuration Flags

Flag Description Default
--cms drupal or wordpress drupal
--domain Primary domain (required) -
--php-version PHP version 8.4
--le-email Let's Encrypt email (enables SSL when provided) -
--git-repo Git repository URL -
--git-branch Git branch (uses default if not specified) -
--db Database file to import -

SSL Behavior: SSL is disabled by default. When you provide --le-email, SSL is automatically enabled with Let's Encrypt certificates.

View all flags β†’


SSL Management

Enable SSL After Initial Setup

If you initially set up a site without SSL, you can enable it later:

# Enable SSL for an existing site
sudo svp update-ssl example.com --le-email admin@example.com

Check SSL Certificate Status

# Check certificate renewal status
sudo svp update-ssl example.com check

SSL During Initial Setup

# Enable SSL during setup (recommended)
sudo svp setup example.com --cms drupal --le-email admin@example.com

Certificates are automatically renewed via a cron job.


Basic Authentication

Password-Protect Your Site

Add an extra layer of security by requiring username/password authentication to access your site. This is useful for staging environments, development sites, or restricting access to specific content.

Enable Authentication

# Enable with interactive prompts
sudo svp auth example.com enable

# Or provide credentials via flags
sudo svp auth example.com enable --username admin --password securepass123

The auth command automatically installs apache2-utils (htpasswd) if not already present. Changes take effect immediately.

Check Authentication Status

# View current authentication status
sudo svp auth example.com check

This shows whether authentication is enabled and which username is configured.

Update Credentials

To change the username or password, simply enable authentication again with new credentials:

# Replace existing credentials
sudo svp auth example.com enable --username newuser --password newpass456

This replaces the existing authentication configuration. Only one username/password pair is supported per domain.

Disable Authentication

# Remove authentication requirement
sudo svp auth example.com disable

This removes the password protection and makes the site publicly accessible again.

Important Notes

  • Only one username/password combination per domain
  • Credentials can be provided via --username and --password flags or entered interactively
  • Changes take effect immediately (no server restart required)
  • Re-enabling authentication replaces existing credentials
  • Works with both HTTP and HTTPS sites

Documentation

πŸ“– Full documentation available at: willjackson.github.io/simple-vps-provisioner

Quick Links


Installation Methods

Quick Install (Recommended)

Installs the latest stable release:

curl -fsSL https://raw.githubusercontent.com/willjackson/simple-vps-provisioner/main/install-from-github.sh | sudo bash

Manual Download

VERSION="1.0.35"  # Check releases for latest
wget https://github.com/willjackson/simple-vps-provisioner/releases/download/v${VERSION}/svp-linux-amd64
chmod +x svp-linux-amd64
sudo mv svp-linux-amd64 /usr/local/bin/svp

Build from Source

For development:

git clone https://github.com/willjackson/simple-vps-provisioner.git
cd simple-vps-provisioner
sudo bash install.sh

More installation options β†’


Support & Contributing


License

MIT License - see LICENSE file for details.


Quick Examples

Fresh Drupal Site

sudo svp setup mysite.com --cms drupal --le-email admin@mysite.com

WordPress from Git

sudo svp setup blog.com --cms wordpress --git-repo https://github.com/me/blog.git --le-email admin@blog.com

Staging + Production

sudo svp setup myapp.com --cms drupal --extra-domains "staging.myapp.com" --le-email dev@myapp.com

View more examples β†’


Get Started β€’ Documentation β€’ Examples

Made with ❀️ for the Drupal and WordPress communities

About

Production-ready Linux VPS provisioning tool for LAMP environments. Automates Nginx, PHP-FPM, MariaDB setup with security hardening, SSL certificates, per-domain isolation, and Drupal or WordPress deployment. Written in Go.

Topics

Resources

Stars

Watchers

Forks

Contributors