Skip to main content

Getting Started

This guide will walk you through setting up your server and installing all the dependencies needed to run Community Template.

Reminders

You must run this on a VPS or dedicated server. All steps are written for an Ubuntu 24.04 LTS Linux VPS.

Before starting, make sure you have read through Prerequisites and that your domain's A record is pointed to your server's IP.

Update your system and install curl:

sudo apt update
sudo apt install curl

Install Node.js

Node.js is required to run Community Template. We use NVM (Node Version Manager) to ensure the correct version is installed.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

nvm install 24.11.1

You may need to reopen your terminal after installing NVM before the nvm command is available.
Verify Node.js is working: node --version should output v24.x.x.

Install Forever (Optional)

Forever keeps Community Template running in the background and automatically restarts it if it crashes. It also writes all console output to a log file.

This is optional - you can also use PM2 or run the app directly with node .. This guide assumes you're using Forever.

npm i -g forever

Verify it's installed: forever list

Install Nginx

Nginx is used to proxy requests from your domain to Community Template.

sudo apt install nginx

Press Y when prompted. Once installed, navigate to http://your_server_ip in a browser - you should see the default Nginx welcome page.

Install Certbot

Certbot issues and manages free SSL certificates for your domain.

sudo apt install certbot python3-certbot-nginx

Install MongoDB

MongoDB is the database Community Template uses to store all data.

Install

  1. Install gnupg and curl if not already available:

    sudo apt-get install gnupg curl
  2. Import the MongoDB public GPG key:

    curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
    sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \
    --dearmor
  3. Add the MongoDB repository for your Ubuntu version:

     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
  4. Reload the package database:

    sudo apt-get update
  5. Install MongoDB:

    sudo apt-get install -y mongodb-org

Start MongoDB

  1. Start the MongoDB service:

    sudo systemctl start mongod

    If you see Failed to start mongod.service: Unit mongod.service not found., run sudo systemctl daemon-reload and try again.

  2. Verify it's running:

    sudo systemctl status mongod
  3. Enable MongoDB to start on reboot:

    sudo systemctl enable mongod