From a0dcc3a9279922c9b0599cacb61cca7878815dde Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 14 Jan 2025 17:28:52 -0800 Subject: [PATCH] fix: windows --- src/utils/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 2c78370..3a98456 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -418,11 +418,13 @@ export async function startServer(installationPath?: string, port?: number): Pro let startCommand = process.platform === 'win32' - ? `"${installationPath}\\Scripts\\activate.bat" && open-webui serve` + ? `"${installationPath}\\Scripts\\activate.bat" && uvicorn open_webui.main:app --host "0.0.0.0" --forwarded-allow-ips "*"` : `source "${installationPath}/bin/activate" && open-webui serve`; - + if (process.platform === 'win32') { + process.env.FROM_INIT_PY = 'true'; + } // Set environment variables in a platform-agnostic way process.env.DATA_DIR = path.join(app.getPath('userData'), 'data');