Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/just-cameron/letta-openwebui. A Letta fork of OpenWebUI
Something went wrong. Try again.
1.4 kB · 50 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051$ErrorActionPreference = "Stop"Set-StrictMode -Version Latest
$RootDir = Split-Path -Parent $PSScriptRoot$EnvFile = Join-Path $RootDir ".env"$SecretsDir = Join-Path $RootDir ".secrets"$TokenFile = Join-Path $SecretsDir "app-server-token"
foreach ($CommandName in @("docker", "letta")) { if (-not (Get-Command $CommandName -ErrorAction SilentlyContinue)) { throw "Missing required command: $CommandName" }}
docker compose version | Out-Null
if ((Test-Path $EnvFile) -or (Test-Path $TokenFile)) { throw "Setup already exists. Remove .env and .secrets to regenerate it."}
function New-HexSecret { $Bytes = New-Object byte[] 32 [Security.Cryptography.RandomNumberGenerator]::Fill($Bytes) return (($Bytes | ForEach-Object { $_.ToString("x2") }) -join "")}
New-Item -ItemType Directory -Path $SecretsDir -Force | Out-Null$AppServerToken = New-HexSecret$WebUISecretKey = New-HexSecret
[IO.File]::WriteAllText($TokenFile, "$AppServerToken`n")[IO.File]::WriteAllText($EnvFile, @"APP_SERVER_TOKEN=$AppServerTokenWEBUI_SECRET_KEY=$WebUISecretKeyOPENWEBUI_HOST=127.0.0.1OPENWEBUI_PORT=3000OPENWEBUI_IMAGE=ghcr.io/open-webui/open-webui:v0.11.0WEBUI_AUTH=FalseENABLE_SIGNUP=False"@)
Write-Host @"Setup complete.
Next: Terminal 1: .\scripts\start-letta.ps1 Terminal 2: docker compose up -d Verify: .\scripts\verify.ps1 Open: http://localhost:3000"@