Skip to Content
NexTube 3.0 is released 🎉
InstallationVPS or Dedicated Server

VPS or Dedicated Server

A complete guide to installing the NexTube - Yotube-style video platform script on your VPS or dedicated server, including setup, license activation, and database configuration.

Welcome to the NexTube - YouTube-style video platform VPS Installation Guide. This step-by-step tutorial is designed to help you install and configure the script on a VPS or dedicated server.

This guide is for users with VPS or dedicated servers. If you are using a shared host or local environment, check the relevant installation guides.

Prerequisites

Ensure your server meets the server requirements. You will need:

  • A clean VPS or dedicated server (Ubuntu 20.04+ recommended)
  • Root or sudo access
  • A domain name pointed to your server’s IP
  • Node.js (v18+) and Nginx (recommended)
  • FFmpeg installed on the server (used for video processing and thumbnail generation)

Important Nginx Configuration Notes

To properly handle large video uploads, your Nginx server configuration must be adjusted.

  1. Increase maximum upload size

By default, Nginx limits the maximum body size of client requests to 1MB, which is too small for video uploads.

Open your Nginx config for your site, e.g.:

sudo nano /etc/nginx/sites-available/yourdomain.com

Add or modify the following directive inside the server or http block:

client_max_body_size 100M;

This sets the maximum upload size to 100 megabytes. Adjust as needed. Save and exit the file.

  1. Increase types hash size

Sometimes, you may encounter errors related to MIME types if the hash table is too small. To avoid this, increase types_hash_max_size:

Open the main Nginx config:

sudo nano /etc/nginx/nginx.conf

Find the http { ... } block and add or modify:

types_hash_max_size 2048;
  1. Restart Nginx

After making changes, restart Nginx to apply:

sudo systemctl restart nginx

Step 1: Prepare Your Server

  1. Connect via SSH:
ssh root@your-server-ip
  1. Install Node.js:
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - sudo apt install -y nodejs
  1. Install PM2 process manager:
npm install -g pm2
  1. Install Nginx (optional, for HTTPS and proxying):
sudo apt install nginx
  1. Install FFmpeg

FFmpeg is necessary for video processing (thumbnails, previews):

sudo apt update sudo apt install -y ffmpeg

To verify FFmpeg is installed and working:

ffmpeg -version

Step 2: Upload, Extract & Install Dependencies

  1. Upload your script files via SFTP or SCP:
scp nextube-files.zip root@your-server-ip:/var/www/youtube-clone
  1. Extract the archive:
cd /var/www/youtube-clone unzip nextube-files.zip
  1. Install backend dependencies:
npm install --legacy-peer-deps npm run build
  1. Ensure the public files are accessible via domain:
sudo nano /etc/nginx/sites-available/yourdomain.com

Point root to:

root /var/www/youtube-clone/public;
Note

Restart Nginx after editing:

sudo systemctl restart nginx

Step 3: Running the Script

  1. Ensure you’re in the project directory:
cd /var/www/youtube-clone
  1. Start the server using PM2:
pm2 start server.js --name="youtube-clone"
  1. Enable auto-start on reboot:
pm2 startup pm2 save

Your project is now running in the background.

We suggest the following VPS providers for stable hosting:

For best results, choose a VPS with at least 2GB RAM and 1 vCPU.

Step 4: Installation via Web Wizard

Once files are uploaded and dependencies are installed, open your browser:

https://yourdomain.com/install

License Activation

Database Configuration

  • Your NeonDB connection URL. from .env.

Example:

DATABASE_URL=postgresql://USER:PASSWORD@HOST/DB_NAME?sslmode=require

More information how to get NeonDB connection URL

Create Admin

  • Set your full name, email, username, and password for the administrator account.
  • Once saved, the server will restart automatically.

Complete

  • The application “NexTube” was successfully installed. You can now sign in and start using your admin panel.

After Installation

  • Your admin dashboard will be available at:
https://yourdomain.com
  • You can now log in using the admin credentials created during the installation.

Make sure your SSL certificate is active. You can use Let’s Encrypt  or purchase one from your domain provider.


If you encounter issues, refer to the Troubleshooting Guide or contact support@jooj.us.