Installation Guide

This guide will walk you through installing Suthep on your system.

System Requirements

Before installing Suthep, ensure your system meets these requirements:

  • Node.js version 16 or higher
  • npm, yarn, or pnpm package manager
  • sudo/administrator privileges (required for Nginx and Certbot setup)
  • Linux or macOS operating system

Installing Suthep

Suthep can be installed globally using any Node.js package manager.

Using npm

npm install -g suthep

Using yarn

yarn global add suthep

Using pnpm

pnpm add -g suthep

Verify Installation

After installation, verify that Suthep is installed correctly:

suthep --version

You should see the version number (e.g., 0.1.0-beta.1).

You can also check the help menu:

suthep --help

Installing Prerequisites

Suthep requires Nginx and Certbot to function. You can install these automatically using the setup command:

suthep setup

This command will:

  • Install Nginx (if not already installed)
  • Install Certbot (if not already installed)
  • Configure system dependencies

Manual Installation (Optional)

If you prefer to install prerequisites manually:

Nginx Installation

Ubuntu/Debian:

sudo apt-get update
sudo apt-get install -y nginx

CentOS/RHEL:

sudo yum install -y nginx

macOS:

brew install nginx

Certbot Installation

Ubuntu/Debian:

sudo apt-get update
sudo apt-get install -y certbot python3-certbot-nginx

CentOS/RHEL:

sudo yum install -y certbot python3-certbot-nginx

macOS:

brew install certbot

Docker (Optional)

If you plan to deploy Docker containers, install Docker:

Ubuntu/Debian:

sudo apt-get update
sudo apt-get install -y docker.io
sudo systemctl start docker
sudo systemctl enable docker

macOS:

brew install docker

Or download Docker Desktop from docker.com.

Post-Installation

After installation, you're ready to:

  1. Initialize your first configuration:

    suthep init
  2. Or continue to the Quick Start guide: See Quick Start Guide

Troubleshooting Installation

Command Not Found

If you get a "command not found" error:

  1. Check Node.js installation:

    node --version
    npm --version
  2. Verify global bin path:

    npm config get prefix
  3. Add npm global bin to PATH (if needed):

    export PATH="$PATH:$(npm config get prefix)/bin"

Permission Errors

If you encounter permission errors:

  1. Use sudo for global installation:

    sudo npm install -g suthep
  2. Or configure npm to use a different directory:

    mkdir ~/.npm-global
    npm config set prefix '~/.npm-global'
    export PATH=~/.npm-global/bin:$PATH

Nginx/Certbot Installation Issues

If suthep setup fails:

  1. Check your package manager:

    • Ubuntu/Debian: Ensure apt-get is available
    • CentOS/RHEL: Ensure yum is available
    • macOS: Ensure Homebrew is installed
  2. Run setup with verbose output:

    suthep setup --verbose
  3. Install prerequisites manually (see Manual Installation above)

Next Steps

Now that Suthep is installed:


Previous: Introduction | Next: Quick Start →