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.
da build set unit yes
da build unitUpload 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.jsReplace DA_USER and the domain. Keep the application outside public_html when allowed.
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=trueBOT_API_KEY must exactly match the bot's INTERNAL_API_KEY.
Create the Nginx Unit app
- Open User Level → Advanced Features → Nginx Unit.
- Create a Node.js application using Node.js 24.
- Set the working directory to the absolute
vektor-panelpath. - Set entry script to
app.jsand process count to1. - Create the suggested route for the panel domain at
/.
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/callbackIt must exactly match DISCORD_REDIRECT_URI.
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
.envand.gitare not public.
Update
cd /home/DA_USER/domains/panel.example.com/vektor-panel
git pull --ff-only
npm ci
npm run lint
npm run build:directadminRestart the Nginx Unit application after building.
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:directadminagain and restart Unit. - OAuth mismatch
- Make the Discord callback and environment URL identical.
- Bot API 401
- Match
BOT_API_KEYtoINTERNAL_API_KEY.