fix: correct server port config and seed default settings

- config.ts: rename nixserverPort/nixclientPort to single port, default
  HOST to 127.0.0.1 (installer binds to loopback, Apache proxies)
- index.ts: use config.server.port
- seed.ts: fix wrong default settings (nginx->apache2, bind9->powerdns,
  postfix->exim4, vsftpd->disabled)
This commit is contained in:
NixReaper
2026-04-11 08:05:26 -05:00
parent d235d27fe3
commit 87edf902a1
3 changed files with 8 additions and 9 deletions
+2 -3
View File
@@ -15,9 +15,8 @@ export const config = {
isDev: optional('NODE_ENV', 'development') === 'development',
server: {
host: optional('HOST', '0.0.0.0'),
nixserverPort: parseInt(optional('NIXSERVER_PORT', '4000'), 10),
nixclientPort: parseInt(optional('NIXCLIENT_PORT', '4001'), 10),
host: optional('HOST', '127.0.0.1'),
port: parseInt(optional('PORT', '4000'), 10),
},
db: {
+4 -4
View File
@@ -73,10 +73,10 @@ async function main() {
// Default settings
const settings = [
{ key: 'php_default_version', value: '8.3' },
{ key: 'mail_server', value: 'postfix' },
{ key: 'ftp_server', value: 'vsftpd' },
{ key: 'webserver', value: 'nginx' },
{ key: 'dns_server', value: 'bind9' },
{ key: 'mail_server', value: 'exim4' },
{ key: 'ftp_server', value: 'disabled' },
{ key: 'webserver', value: 'apache2' },
{ key: 'dns_server', value: 'powerdns' },
{ key: 'ssl_provider', value: 'letsencrypt' },
{ key: 'backup_enabled', value: 'true' },
{ key: 'backup_retention_days', value: '7' },
+2 -2
View File
@@ -13,8 +13,8 @@ async function start() {
app = await buildApp()
await app.listen({ port: config.server.nixserverPort, host: config.server.host })
console.log(`[nixpanel] API running on ${config.server.host}:${config.server.nixserverPort}`)
await app.listen({ port: config.server.port, host: config.server.host })
console.log(`[nixpanel] API running on ${config.server.host}:${config.server.port}`)
startScheduler()