Ubuntu Server VPS

Full Web Server Setup Guide

Deploy your SnapShop API, Database, and Web Frontend cleanly on a fresh Ubuntu 22.04 or 24.04 server in minutes using our automated installer.

1

Prepare Application Files

Log in to your VPS terminal via SSH. The first step is to create a folder directory dedicated to our application:

VPS Terminal
mkdir -p /var/www/SnapShop

Next, use an SFTP program (like FileZilla or WinSCP) or the command line to upload your downloaded code.zip file directly into this new directory (/var/www/SnapShop).

Once uploaded, install the unzip tool and extract your files using the following commands:

VPS Terminal
sudo apt-get update && sudo apt-get install -y unzip cd /var/www/SnapShop unzip code.zip
2

Automated Installation Script

We provide an automated shell script that installs all prerequisites (Node.js, MongoDB 7.0, Nginx, PM2 processes) and configures SSL security for HTTPS.

â„šī¸

Find CodeCanyon Script Source

Locate the install.txt file in your downloaded CodeCanyon package before writing the script below.

Step 2.1: Create the script file: In your terminal, run the following command to edit a new script file:

VPS Terminal
nano install.sh

Step 2.2: Paste content: Copy the full content inside your install.txt file and paste it into the editor screen. Press Ctrl + X, then Y, then Enter to save and exit.

Step 2.3: Make executable and run: Run these commands to trigger the automated installation wizard. Input your custom domain name and admin email when prompted:

VPS Terminal
chmod +x install.sh ./install.sh
3

Configure Environment Variables

The installation script has automatically created your .env file with your database URI and Demo mode status. However, you still need to add two important security and API variables.

Open the .env file in your terminal:

VPS Terminal
cd /var/www/SnapShop nano .env

Paste the following two lines at the bottom of the file:

JWT_SECRET=
NEXT_PUBLIC_API_URL=
  1. In the JWT_SECRET field, type any long random text (e.g., my_super_secret_key_2026!). This is used to secure user sessions.
  2. In the NEXT_PUBLIC_API_URL field, type your website's domain name without a trailing slash (e.g., https://yourdomain.com).
  3. Press Ctrl + X, then Y, then Enter to save and exit the editor.
4

Finalize Setup Wizard

When the shell script completes, it will output a Web Setup wizard link. Copy and visit this link on your web browser to finish creating the databases, admin account and system tables.

🎉

Automatic Server Configurations Configured

✓
SSL Secure (HTTPS) Active
✓
MongoDB 7.0 Active
✓
PM2 Process Monitor Status
✓
Secure Database User Made