Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
9f869f65
Unverified
Commit
9f869f65
authored
Feb 17, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Feb 17, 2024
Browse files
Merge pull request #771 from open-webui/windows-native
feat: windows native start script
parents
4c3edd03
d1e5274f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
backend/start_windows.bat
backend/start_windows.bat
+32
-0
No files found.
backend/start_windows.bat
0 → 100644
View file @
9f869f65
:: This method is not recommended, and we recommend you use the `start.sh` file with WSL instead.
@echo
off
SETLOCAL
ENABLEDELAYEDEXPANSION
:: Get the directory of the current script
SET
"SCRIPT_DIR=
%~dp0
"
cd
/d
"
%SCRIPT_DIR%
"
||
exit
/b
SET
"KEY_FILE=.webui_secret_key"
SET
"PORT=
%PORT
:8080
%
"
SET
"WEBUI_SECRET_KEY=
%WEBUI_SECRET_KEY%
"
SET
"WEBUI_JWT_SECRET_KEY=
%WEBUI_JWT_SECRET_KEY%
"
:: Check if WEBUI_SECRET_KEY and WEBUI_JWT_SECRET_KEY are not set
IF
"
%WEBUI_SECRET_KEY%%
WEBUI_JWT_SECRET_KEY
%
"
==
" "
(
echo
No
WEBUI_SECRET_KEY
provided
IF
NOT
EXIST
"
%KEY_FILE%
"
(
echo
Generating
WEBUI_SECRET_KEY
::
Generate
a
random
value
to
use
as
a
WEBUI_SECRET_KEY
in
case
the
user
didn
't provide one
SET /p WEBUI_SECRET_KEY=<nul
FOR /L
%%i
IN (1,1,12) DO SET /p WEBUI_SECRET_KEY=<
!random!
>>
%KEY_FILE%
echo WEBUI_SECRET_KEY generated
)
echo Loading WEBUI_SECRET_KEY from
%KEY_FILE%
SET /p WEBUI_SECRET_KEY=<
%KEY_FILE%
)
:: Execute uvicorn
SET "WEBUI_SECRET_KEY=
%WEBUI_SECRET_KEY%
"
uvicorn main:app --host 0.0.0.0 --port "
%PORT%
" --forwarded-allow-ips '
*
'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment