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 basemulti2. Install Dependencies
bash
npm installbash
yarn installbash
pnpm install3. Configure Environment
Copy the environment variables example file:
bash
cp .env.example .envEdit 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 buildbash
yarn buildbash
pnpm build5. Start the Application
Development Environment
bash
npm run devbash
yarn devbash
pnpm devProduction Environment
bash
npm startbash
yarn startbash
pnpm startProduction Deployment Options
Using PM2
PM2 is a popular Node.js process manager suitable for production environments.
Install PM2
bashnpm install -g pm2bashyarn global add pm2bashpnpm add -g pm2Create 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.jsManage 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_KEYNEXT_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