DEPLOYMENT GUIDE

Install on DirectAdmin

Run the panel securely with DirectAdmin's native Nginx Unit support.

Required hosting featureNode.js 24.17+ with Nginx Unit
01

Check prerequisites

Open Advanced Features → Nginx Unit. If it is missing, ask the host to enable Nginx Unit and Node.js 24. PHP-only or static hosting cannot run OAuth and protected server-side API calls.

Administrator commandda build set unit yes
da build unit
02

Upload and build

Create panel.example.com, point DNS to the server, and connect over SSH as your DirectAdmin user.

cd /home/DA_USER/domains/panel.example.com
git clone https://github.com/vektor-interactive/vektor-central-panel.git vektor-panel
cd vektor-panel
cp deploy/directadmin/panel.env.example .env
npm ci
npm run lint
npm run build:directadmin
chmod +x app.js

Replace DA_USER and the domain. Keep the application outside public_html when allowed.

03

Configure environment

Edit .env without sharing it. The bot API must be reachable from DirectAdmin.

DISCORD_CLIENT_ID=your_application_id
DISCORD_CLIENT_SECRET=your_oauth_secret
DISCORD_REDIRECT_URI=https://panel.example.com/api/auth/callback
SESSION_SECRET=use_a_64_character_random_value
BOT_API_URL=https://bot-api.example.com
BOT_API_KEY=must_match_the_bot_INTERNAL_API_KEY
NODE_ENV=production
HOSTNAME=0.0.0.0
FORCE_HTTPS=true

BOT_API_KEY must exactly match the bot's INTERNAL_API_KEY.

04

Create the Nginx Unit app

  1. Open User Level → Advanced Features → Nginx Unit.
  2. Create a Node.js application using Node.js 24.
  3. Set the working directory to the absolute vektor-panel path.
  4. Set entry script to app.js and process count to 1.
  5. Create the suggested route for the panel domain at /.
05

Enable SSL and OAuth

Request an ACME/Let's Encrypt certificate and force HTTPS. Add this exact callback in Discord:

https://panel.example.com/api/auth/callback

It must exactly match DISCORD_REDIRECT_URI.

06

Verify

  • Sign in through the HTTPS panel.
  • Confirm OAuth returns to /dashboard.
  • Confirm shared Discord servers appear.
  • Save a module and check the bot audit log.
  • Confirm .env and .git are not public.
07

Update

cd /home/DA_USER/domains/panel.example.com/vektor-panel
git pull --ff-only
npm ci
npm run lint
npm run build:directadmin

Restart the Nginx Unit application after building.

08

Troubleshooting

Unit menu missing
The host must enable it for the server, package, and user.
503 response
Check Node 24.17+, ownership, permissions, environment, and /var/log/unit/unit.log.
Assets return 404
Run npm run build:directadmin again and restart Unit.
OAuth mismatch
Make the Discord callback and environment URL identical.
Bot API 401
Match BOT_API_KEY to INTERNAL_API_KEY.