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.
Install PM2
bashnpm install -g pm2
bashyarn global add pm2
bashpnpm add -g pm2
Create PM2 Configuration
Create
ecosystem.config.js
:jsmodule.exports = { apps: [{ name: 'basemulti', script: 'npm', args: 'start', env: { NODE_ENV: 'production' } }] }
Start the Application
bashpm2 start ecosystem.config.js
Manage the Application
bashpm2 status # Check status pm2 logs basemulti # View logs pm2 restart basemulti # Restart application
Using Vercel
Vercel offers a zero-configuration deployment solution.
Prerequisites
- Fork Basemulti repository
- Register a Vercel account
- Prepare database (SQLite not supported)
Import Project
- Login to Vercel
- Click "New Project"
- Select your forked repository
- Click "Import"
Configure Environment Variables Add in Vercel project settings:
BASEMULTI_KEY
NEXT_PUBLIC_URL
- Database configuration
- Other required variables
Deployment Configuration
Create
vercel.json
:json{ "buildCommand": "npm run build", "outputDirectory": ".next", "devCommand": "npm run dev", "installCommand": "npm install", "framework": "nextjs" }
Complete Deployment
- Click "Deploy"
- Wait for deployment to complete
- Access your application using the Vercel-provided URL
Access the Application
- Development: http://localhost:3000
- Production: Access via your deployment URL