diff --git a/packages/server/src/cli.ts b/packages/server/src/cli.ts index 37d1b74e9..d726c61ce 100644 --- a/packages/server/src/cli.ts +++ b/packages/server/src/cli.ts @@ -25,7 +25,7 @@ commander.version(process.env.VERSION || "development") .option("--data-dir ", "DEPRECATED: Use '--user-data-dir' instead. Customize where user-data is stored.") .option("-h, --host ", "Customize the hostname.", "0.0.0.0") .option("-o, --open", "Open in the browser on startup.", false) - .option("-p, --port ", "Port to bind on.", 8443) + .option("-p, --port ", "Port to bind on.", parseInt(process.env.PORT, 10) || 8443) .option("-N, --no-auth", "Start without requiring authentication.", undefined) .option("-H, --allow-http", "Allow http connections.", false) .option("-P, --password ", "Specify a password for authentication.")