Skip to the content.

Command-Line Reference

Complete reference for all svp command-line options and commands.

Table of Contents


Commands

svp uses positional commands instead of flags.

Setup Command

Perform full VPS provisioning.

svp setup DOMAIN [options]

What it does:

Example:

sudo svp setup example.com --cms drupal

Verify Command

Check configuration without making changes.

svp verify

What it checks:

Example output:

==========================================================
  Configuration Verification
==========================================================

=== Base Packages ===
[✓] All base packages installed

=== Nginx ===
[✓] Nginx already installed
[✓] nginx running

=== PHP ===
[✓] PHP 8.3 packages already installed
[✓] php8.3-fpm running

==========================================================
[✓] All checks passed!
==========================================================

Update Command

Update svp to the latest version.

svp update

What it does:

Example:

$ sudo svp update

[CREATE] Checking for updates...
Current version: v1.0.24
Latest version:  v1.0.30

New version available: v1.0.30
Update now? [y/N]: y

[CREATE] Downloading svp v1.0.30...
[CREATE] Verifying checksum...
[✓] Checksum verified
[CREATE] Installing new version...
[✓] Successfully updated to v1.0.30!

PHP Update Command

Update PHP version for a domain.

svp php-update DOMAIN --php-version VERSION

What it does:

Example:

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

SSL Management Command

Manage SSL certificates for a domain.

svp update-ssl DOMAIN ACTION [options]

Actions:

What it does:

Examples:

Enable SSL for an existing domain:

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

Disable SSL and switch to HTTP:

sudo svp update-ssl example.com disable

Force certificate renewal:

sudo svp update-ssl example.com renew

Check certificate status:

sudo svp update-ssl example.com check

Note: The enable action requires --le-email to obtain a certificate.

Basic Authentication Command

Manage HTTP Basic Authentication for a domain.

svp auth DOMAIN ACTION [options]

Actions:

What it does:

Credential Input:

Examples:

Enable Basic Authentication with interactive credentials:

sudo svp auth example.com enable
# Prompts for username and password

Enable Basic Authentication with flags:

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

Check authentication status:

sudo svp auth example.com check

Disable Basic Authentication:

sudo svp auth example.com disable

Important Notes:


Global Flags

–version

Display version information.

svp --version

Output:

Simple VPS Provisioner (svp) version 1.0.30

–debug

Enable debug mode for troubleshooting.

svp --debug setup example.com --cms drupal

Enables verbose output showing all command execution.


CMS Options

–cms

Choose CMS to install.

--cms drupal     # Install Drupal (default)
--cms wordpress  # Install WordPress

Examples:

# Drupal
sudo svp setup example.com --cms drupal

# WordPress
sudo svp setup myblog.com --cms wordpress

Domain Configuration

DOMAIN (positional argument)

Primary domain name (required for setup and php-update commands).

Usage:

svp setup DOMAIN [options]
svp php-update DOMAIN [options]

Example:

sudo svp setup example.com --cms drupal

–extra-domains

Additional domains (comma-separated).

--extra-domains "staging.example.com,dev.example.com"

Each domain gets:

Example:

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

Creates three separate environments:


PHP Configuration

–php-version

PHP version to install.

--php-version 8.4  # Default
--php-version 8.3
--php-version 8.2
--php-version 8.1

Example:

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

Available versions:


SSL/Security Options

–ssl

Enable or disable SSL/HTTPS.

--ssl=true   # Enable SSL explicitly
--ssl=false  # Disable SSL (HTTP only, default)

Default behavior:

Note: When SSL is enabled, it requires --le-email to obtain certificates.

Example (with SSL via –le-email):

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

Example (with SSL explicitly):

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

Example (HTTP only - omit –le-email):

sudo svp setup example.com --cms drupal

–le-email

Let’s Encrypt email for SSL certificates.

--le-email admin@example.com

Behavior:

Required when:

Used for:

Example:

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

–firewall

Enable or disable UFW firewall.

--firewall=true   # Enable (default)
--firewall=false  # Disable

Example:

sudo svp setup example.com --cms drupal --firewall=true

Git Deployment

–git-repo

Git repository URL to clone.

--git-repo https://github.com/myorg/mysite.git
--git-repo git@github.com:myorg/mysite.git

Example:

sudo svp setup \
  example.com \
  --cms drupal \
  --git-repo https://github.com/myorg/mysite.git

–git-branch

Git branch to checkout (optional).

--git-branch production
--git-branch develop
--git-branch main

Note: If not specified, uses the repository’s default branch.

Example:

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

–drupal-root

Drupal root directory (relative to repo).

--drupal-root ""          # Auto-detect (default)
--drupal-root "drupal"
--drupal-root "backend"

Use when:

Example:

sudo svp setup \
  example.com \
  --cms drupal \
  --git-repo https://github.com/myorg/monorepo.git \
  --drupal-root "backend"

–docroot

Custom document root path.

--docroot "web"           # Default for Drupal
--docroot "public"
--docroot "htdocs"

Example:

sudo svp setup \
  example.com \
  --cms drupal \
  --git-repo https://github.com/myorg/mysite.git \
  --docroot "public_html"

Database Options

–db-engine

Database engine to use.

--db-engine mariadb  # Default
--db-engine none     # Skip database installation

Example (with database):

sudo svp setup example.com --cms drupal --db-engine mariadb

Example (without database):

sudo svp setup example.com --cms drupal --db-engine none

–db

Path to database file for import.

--db /path/to/backup.sql
--db /path/to/backup.sql.gz  # Compressed files supported

Supported formats:

When specified:

Example:

sudo svp setup \
  example.com \
  --cms drupal \
  --db /home/admin/backup.sql.gz

–keep-existing-db

Keep existing database when reprovisioning.

--keep-existing-db=false  # Drop database completely (default)
--keep-existing-db=true   # Keep database, reuse credentials

Default behavior (false):

With flag (true):

Example (fresh database):

sudo svp setup example.com --cms drupal

Example (keep credentials):

sudo svp setup example.com --cms drupal --keep-existing-db

System Options

–webroot

Parent directory for sites.

--webroot /var/www        # Default
--webroot /home/sites
--webroot /srv/www

Sites are created as:

Example:

sudo svp setup \
  example.com \
  --cms drupal \
  --webroot /srv/www

–create-swap

Create swap space.

--create-swap auto  # Create if RAM < 2GB (default)
--create-swap yes   # Always create
--create-swap no    # Never create

auto mode:

Example:

sudo svp setup example.com --cms drupal --create-swap yes

Complete Examples

Minimal Drupal (HTTP only, no SSL)

sudo svp setup example.com --cms drupal

Note: SSL is disabled by default when –le-email is not provided.

Production Drupal with SSL

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

Drupal from Git with Custom PHP

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

WordPress with Database Import

sudo svp setup \
  myblog.com \
  --cms wordpress \
  --db /home/admin/wp-backup.sql.gz \
  --le-email admin@myblog.com

Multi-Environment Setup

sudo svp setup \
  mysite.com \
  --cms drupal \
  --extra-domains "staging.mysite.com,dev.mysite.com" \
  --git-repo https://github.com/myorg/mysite.git \
  --le-email admin@mysite.com

Reprovision with Fresh Database

sudo svp setup example.com --cms drupal

Reprovision Keeping Credentials

sudo svp setup example.com --cms drupal --keep-existing-db

Enable SSL on Existing Site

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

Disable SSL on Existing Site

sudo svp update-ssl example.com disable

Renew SSL Certificate

sudo svp update-ssl example.com renew

Enable Basic Authentication (Interactive)

sudo svp auth example.com enable
# You will be prompted to enter username and password

Enable Basic Authentication (Non-Interactive)

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

Check Authentication Status

sudo svp auth example.com check

Disable Basic Authentication

sudo svp auth example.com disable

Tips

SSL Configuration

When to use –le-email vs update-ssl:

Use --le-email during initial setup:

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

Use update-ssl to manage SSL on existing sites:

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

SSL Behavior and Defaults:

Using Quotes

Use quotes for values with special characters:

--extra-domains "site1.com,site2.com"
--git-repo "https://github.com/org/repo.git"

Combining Flags

All flags can be combined:

sudo svp setup \
  example.com \
  --cms drupal \
  --php-version 8.4 \
  --webroot /srv/www \
  --git-repo https://github.com/myorg/mysite.git \
  --git-branch production \
  --db /path/to/backup.sql.gz \
  --le-email admin@example.com \
  --firewall=true \
  --create-swap yes

Getting Help

View all options:

svp --help

Or just run svp with no arguments:

svp

← Documentation SSL Configuration →