Top

Meetzy documentation

Chat, collaborate, and create teams effortlessly with Meetzy

Welcome to Meetzy !

Introduction

This guide explains how to deploy the Meetzy backend on a VPS (Virtual Private Server). You'll set up the server, install all required tools, configure the database, and run Meetzy securely in production. VPS deployment is the recommended method because it gives full control over performance, scaling, security, and custom configurations.

1. System Setup

After connecting to your VPS via SSH, start by updating your server and installing required packages.

  • sudo apt update && sudo apt upgrade -y
  • sudo apt install curl wget git unzip -y

This installs essential utilities needed later to fetch and manage Meetzy backend files and dependencies.

2. Install Node.js Runtime

The Meetzy backend is built on Node.js. Install the latest LTS version:

  • curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
  • sudo apt-get install -y nodejs
  • node --version
  • npm --version

Confirming the version ensures Node.js and npm installed successfully.

3. Install and Configure Database

Meetzy now uses MongoDB for storing user data, messages, calls, posts, media metadata, and other application data.

Install MongoDB Community Edition (recommended version: 8.0 or latest stable)

1. Import the MongoDB public GPG Key (for version 8.0):

curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc

  • sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg --dearmor

2. Create the list file (for Ubuntu 22.04 = jammy | 24.04 = noble):

Use 'jammy' for Ubuntu 22.04, 'noble' for Ubuntu 24.04

  • echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" |
  • sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list

3. Update and install MongoDB

  • sudo apt update
  • sudo apt install -y mongodb-org

4. Start and enable MongoDB service

  • sudo systemctl start mongod
  • sudo systemctl enable mongod

5. Verify installation

  • sudo systemctl status mongod
  • mongod --version
  • mongosh --version

4. Deploy the Application Code

Upload the Meetzy backend folder or clone it directly from your repository:

  • git clone <your-repo-url>
  • cd meetzy-backend
  • npm install --production

After installation, create a .env file and add all required backend configuration values.

Example

  • PORT=3000
  • DEMO=true
  • MONGODB_URI=YOUR_MONGODB_CONNECTION_STRING
  • ADMIN_NAME=Admin
  • ADMIN_EMAIL=YOUR_ADMIN_EMAIL
  • ADMIN_PASSWORD=ADMIN_PASSWORD
  • SMTP_HOST=
  • SMTP_PORT=
  • SMTP_USER=
  • SMTP_PASS=
  • JWT_SECRET=YOUR_SECRET_KEY
  • GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET
  • GOOGLE_REDIRECT_URI=YOUR_GOOGLE_REDIRECT_URI
  • FRONT_REDIRECT_URL=
  • TWILIO_ACCOUNT_SID=
  • TWILIO_AUTH_TOKEN=
  • TWILIO_PHONE=
  • STRIPE_SECRET_KEY=
  • STRIPE_PUBLISHABLE_KEY=
  • RAZORPAY_KEY_ID=
  • RAZORPAY_KEY_SECRET=
  • PAYPAL_MODE=
  • PAYPAL_CLIENT_ID=
  • PAYPAL_CLIENT_SECRET=
  • PAYPAL_WEBHOOK_ID=
  • FRONTEND_URL=
  • ALLOWED_ORIGINS=

The .env file ensures the backend loads settings securely and consistently across environments.

5. Process Management

To keep Meetzy running continuously and auto-restart on errors, use PM2:

  • sudo npm install -g pm2
  • pm2 start server.js --name meetzy-backend
  • pm2 save
  • pm2 startup

PM2 ensures uptime, handles crashes, and provides clean logging tools.

6. Reverse Proxy Setup (Nginx)

Meetzy runs on an internal port (e.g., 4000), so you need Nginx to route traffic from your domain.

Create an Nginx config file:

  • sudo nano /etc/nginx/sites-available/meetzy

Add the following configuration:

  • server {
  •   listen 80;
  •   server_name your-domain.com;
  •   location / {
  •     proxy_pass http://localhost:4000;
  •     proxy_http_version 1.1;
  •     proxy_set_header Upgrade $http_upgrade;
  •     proxy_set_header Connection 'upgrade';
  •     proxy_set_header Host $host;
  •     proxy_cache_bypass $http_upgrade;
  •   }
  • }

Enable and restart Nginx:

  • sudo ln -s /etc/nginx/sites-available/meetzy /etc/nginx/sites-enabled/
  • sudo nginx -t
  • sudo systemctl restart nginx

Your Meetzy backend will now be available through your domain.

7. Enable SSL (HTTPS)

Secure your API with a free Let’s Encrypt SSL certificate:

  • sudo apt install certbot python3-certbot-nginx -y
  • sudo certbot --nginx -d your-domain.com

Set up auto-renewal:

  • 0 12 * * * /usr/bin/certbot renew --quiet

8. Testing and Verification

Visit your domain (e.g., https://your-domain.com/api) to confirm Meetzy is running correctly.

Check logs with:

  • pm2 logs meetzy-backend

Verify API responses, media upload paths, authentication, and real-time events.

9. Maintenance & Updates

To update your Meetzy backend in the future:

  • git pull origin main
  • npm install
  • pm2 restart meetzy-backend

It is recommended to monitor CPU, RAM, disk usage, database health, and system logs regularly.

Summary

By following this guide, your Meetzy backend will be fully deployed on a VPS with a secure, scalable, and production-ready environment. This deployment method ensures reliable performance, smooth real-time messaging with Socket.io, and fast audio/video calling using WebRTC.