Skip to content

Self-Hosted Deployment ​

This guide explains how to deploy Basemulti on your own server.

Requirements ​

  • Node.js 18.0+
  • Git
  • Database (one of the following):
    • MySQL 5.7+
    • PostgreSQL 10+
    • SQLite 3+

Basic Deployment ​

1. Get the Code ​

bash
git clone https://github.com/basemulti/basemulti.git
cd basemulti

2. Install Dependencies ​

bash
npm install
bash
yarn install
bash
pnpm install

3. Configure Environment ​

Copy the environment variables example file:

bash
cp .env.example .env

Edit the .env file and configure the necessary variables:

  • Database connection info
  • Application key
  • Other settings

View environment variables details

4. Build the Application ​

bash
npm run build
bash
yarn build
bash
pnpm build

5. Start the Application ​

Development Environment ​

bash
npm run dev
bash
yarn dev
bash
pnpm dev

Production Environment ​

bash
npm start
bash
yarn start
bash
pnpm start

Production Deployment Options ​

Using PM2 ​

PM2 is a popular Node.js process manager suitable for production environments.

  1. Install PM2

    bash
    npm install -g pm2
    bash
    yarn global add pm2
    bash
    pnpm add -g pm2
  2. Create PM2 Configuration

    Create ecosystem.config.js:

    js
    module.exports = {
      apps: [{
        name: 'basemulti',
        script: 'npm',
        args: 'start',
        env: {
          NODE_ENV: 'production'
        }
      }]
    }
  3. Start the Application

    bash
    pm2 start ecosystem.config.js
  4. Manage the Application

    bash
    pm2 status        # Check status
    pm2 logs basemulti # View logs
    pm2 restart basemulti # Restart application

Using Vercel ​

Vercel offers a zero-configuration deployment solution.

  1. Prerequisites

  2. Import Project

    • Login to Vercel
    • Click "New Project"
    • Select your forked repository
    • Click "Import"
  3. Configure Environment Variables Add in Vercel project settings:

    • BASEMULTI_KEY
    • NEXT_PUBLIC_URL
    • Database configuration
    • Other required variables
  4. Deployment Configuration

    Create vercel.json:

    json
    {
      "buildCommand": "npm run build",
      "outputDirectory": ".next",
      "devCommand": "npm run dev",
      "installCommand": "npm install",
      "framework": "nextjs"
    }
  5. Complete Deployment

    • Click "Deploy"
    • Wait for deployment to complete
    • Access your application using the Vercel-provided URL

Access the Application ​

Released under the MIT License.