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.3 kB · 54 lines
Shell
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455#!/usr/bin/env bashset -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"ENV_FILE="$ROOT_DIR/.env"SECRETS_DIR="$ROOT_DIR/.secrets"TOKEN_FILE="$SECRETS_DIR/app-server-token"
for command_name in docker openssl letta; do if ! command -v "$command_name" >/dev/null 2>&1; then echo "Missing required command: $command_name" >&2 exit 1 fidone
if ! docker compose version >/dev/null 2>&1; then echo "Docker Compose v2 is required (docker compose)." >&2 exit 1fi
if [[ -e "$ENV_FILE" || -e "$TOKEN_FILE" ]]; then echo "Setup already exists. Remove .env and .secrets/ to regenerate it." >&2 exit 1fi
mkdir -p "$SECRETS_DIR"chmod 700 "$SECRETS_DIR"
app_server_token="$(openssl rand -hex 32)"webui_secret_key="$(openssl rand -hex 32)"
printf '%s\n' "$app_server_token" > "$TOKEN_FILE"chmod 600 "$TOKEN_FILE"
cat > "$ENV_FILE" <<EOFAPP_SERVER_TOKEN=$app_server_tokenWEBUI_SECRET_KEY=$webui_secret_keyOPENWEBUI_HOST=127.0.0.1OPENWEBUI_PORT=3000OPENWEBUI_IMAGE=ghcr.io/open-webui/open-webui:v0.11.0WEBUI_AUTH=FalseENABLE_SIGNUP=FalseEOFchmod 600 "$ENV_FILE"
cat <<'EOF'Setup complete.
Next: Terminal 1: ./scripts/start-letta.sh Terminal 2: docker compose up -d Verify: ./scripts/verify.sh Open: http://localhost:3000EOF