Skip to the content.

Getting Started with Simple VPS Provisioner

This guide will help you install svp and provision your first site.

Prerequisites

Installation

The easiest way to install svp is using our automated installer:

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

This script will:

Manual Installation

If you prefer to review the installer first:

# Download and review
curl -fsSL https://raw.githubusercontent.com/willjackson/simple-vps-provisioner/main/install-from-github.sh -o install-svp.sh
less install-svp.sh

# Run after review
sudo bash install-svp.sh

Verify Installation

svp --version
# Output: Simple VPS Provisioner (svp) version 1.0.30

Your First Site

Step 1: Configure DNS

Before running svp, ensure your domain points to your server:

A    example.com          123.45.67.89
A    www.example.com      123.45.67.89

DNS propagation typically takes 5-30 minutes.

Step 2: Run Setup

For a fresh Drupal installation:

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

For WordPress:

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

Step 3: Watch the Magic Happen

svp will automatically:

  1. Install and configure Nginx
  2. Install PHP-FPM 8.3
  3. Install and secure MariaDB
  4. Create database and user
  5. Install Composer
  6. Install your CMS
  7. Obtain SSL certificate (if –le-email provided)
  8. Configure firewall

The process takes 5-15 minutes depending on your VPS speed.

Step 4: Access Your Site

Once complete, you’ll see a summary with:

HTTPS is only available if you provided the --le-email flag during setup. By default, sites run on HTTP only. You can enable SSL later using the update-ssl command (see below).

Common Options

Choose PHP Version

sudo svp setup example.com --cms drupal --php-version 8.4

Deploy from Git

sudo svp setup example.com \
  --cms drupal \
  --git-repo https://github.com/myorg/mysite.git \
  --git-branch production \
  --le-email admin@example.com

Multiple Domains

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

# Optional: Password-protect staging/dev environments
sudo svp auth staging.example.com enable
sudo svp auth dev.example.com enable

Import Existing Database

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

HTTP Only (No SSL)

By default, sites are created without SSL. Simply omit the --le-email flag:

sudo svp setup example.com --cms drupal

SSL is only enabled when you provide the --le-email flag during setup.

Managing SSL After Setup

You can enable, check, renew, or disable SSL at any time using the update-ssl command.

Enable SSL After Initial Setup

If you created a site without SSL, you can enable it later:

sudo svp update-ssl example.com enable --le-email admin@example.com

This will:

Check SSL Status

To see the current SSL status for a site:

sudo svp update-ssl example.com check

This displays:

Renew SSL Certificate

Certificates renew automatically, but you can manually renew:

sudo svp update-ssl example.com renew

Disable SSL

To remove SSL and revert to HTTP only:

sudo svp update-ssl example.com disable

This will:

Password Protection with Basic Authentication

Basic authentication provides a simple way to password-protect your sites. This is particularly useful for:

Enable Authentication

You can enable basic auth with interactive prompts:

sudo svp auth example.com enable

Or provide credentials directly via flags:

sudo svp auth example.com enable --username admin --password secure123

This will:

Check Authentication Status

To see if authentication is enabled for a site:

sudo svp auth example.com check

This displays:

Disable Authentication

To remove password protection:

sudo svp auth example.com disable

This will:

Understanding the Output

svp provides clear, color-coded output:

What Gets Installed

System Packages

Directory Structure

/var/www/example.com/          # Your site directory
├── composer.json              # Dependencies
├── vendor/                    # Composer packages
├── web/                       # Document root
│   ├── index.php
│   └── sites/default/
│       ├── settings.php       # Main settings
│       ├── settings.svp.php   # SVP-managed settings (gitignored)
│       └── files/             # Uploaded files
└── config/sync/               # Drupal configuration

/etc/svp/                      # SVP configuration
├── sites/                     # Per-site configs
│   ├── example.com.conf       # Site configuration
│   └── example.com.db.txt     # Database credentials
└── php.conf                   # PHP version tracking

Configuration Files

Next Steps

For Drupal

# Get one-time login link
drush-example.com uli

# Check site status
drush-example.com status

# Clear cache
drush-example.com cr

# Import configuration
drush-example.com cim

For WordPress

# Navigate to site
cd /var/www/example.com

# List plugins
sudo -u admin wp plugin list

# Activate theme
sudo -u admin wp theme activate twentytwentyfour

Troubleshooting

DNS Not Configured

If you see this error:

[!] DNS mismatch detected!

Solution: Configure your DNS A record to point to your server IP and wait for propagation.

SSL Certificate Failed

Common causes:

Check DNS:

dig +short example.com
# Should return your server IP

Site Returns 502 Bad Gateway

Check PHP-FPM:

sudo systemctl status php8.3-fpm
sudo tail -f /var/log/php8.3-fpm-example.com-error.log

Database Connection Failed

Check credentials:

sudo cat /etc/svp/sites/example.com.db.txt

General Verification

Run the verify command to check configuration:

sudo svp verify

Getting Help

What’s Next?


← Back to Home Documentation →