Use this profile for development, local debugging, or contributor workflows where you want the API running directly on your machine with a Python virtual environment. It is a peer solo choice to Docker single-user; once the WebUI is reachable, both paths use the same first-chat completion gate.
Windows: Use WSL2 for the documented make commands. If you prefer PowerShell, run the equivalent tldw-setup command shown under each step and start Docker Desktop before Docker profiles.
Prerequisites:
- Python 3.10+
ffmpeg- Git
- Bun for the WebUI (
npmalso works as a fallback)
git clone https://github.com/rmusser01/tldw_server.git
cd tldw_server
make install-local
make setup-local-singleNo-make shortcut scripts from the repository root:
# macOS/Linux terminal
./quick-launch.sh all# Windows PowerShell
.\quick-launch.ps1 allOn macOS, you can also double-click quick-launch.command from Finder. These shortcuts create or update .venv, run the local-single setup wizard when the API is started, and default to all: API at http://127.0.0.1:8000 plus WebUI at http://127.0.0.1:8080. Use api for backend-only startup or webui when the API is already running.
PowerShell / manual no-make equivalent:
py -3.12 -m venv .venv
.\.venv\Scripts\python -m pip install --upgrade pip setuptools wheel
.\.venv\Scripts\python -m pip install -e .
.\.venv\Scripts\python -m tldw_Server_API.cli.wizard.cli init --profile local-single --env-file tldw_Server_API/Config_Files/.env --default --yesmake install-local installs dependencies into .venv. make setup-local-single creates or updates tldw_Server_API/Config_Files/.env for AUTH_MODE=single_user and generates a strong SINGLE_USER_API_KEY when needed.
make quickstart-install remains a compatibility alias for local installation only. It does not start the server.
make start-local-singlePowerShell / manual no-make equivalent:
.\.venv\Scripts\python -m uvicorn tldw_Server_API.app.main:app --host 127.0.0.1 --port 8000The API starts at http://127.0.0.1:8000.
Start the WebUI in a second terminal when you are ready for the cohesive first-time setup flow:
cd apps/tldw-frontend
cp .env.local.example .env.localEdit .env.local so it points the WebUI at the local API:
NEXT_PUBLIC_API_URL=http://127.0.0.1:8000
NEXT_PUBLIC_API_VERSION=v1
# Optional in single-user mode:
# NEXT_PUBLIC_X_API_KEY=your_single_user_api_keyNEXT_PUBLIC_X_API_KEY is browser-visible. Use it only for local single-user convenience, and avoid exposing this setup directly to the public internet.
Install and start the WebUI:
bun install
bun run dev -- -p 8080
# npm fallback:
# npm install
# npm run dev -- -p 8080Open http://127.0.0.1:8080.
In another terminal:
make verify-local-singlePowerShell / no-make equivalent:
.\.venv\Scripts\python -m tldw_Server_API.cli.wizard.cli verify --profile local-single --env-file tldw_Server_API/Config_Files/.env --base-url http://127.0.0.1:8000 --first-valueManual spot checks:
curl -sS http://127.0.0.1:8000/health
curl -sS http://127.0.0.1:8000/docs > /dev/null && echo "docs-ok"
curl -sS http://127.0.0.1:8000/api/v1/config/quickstart
curl -sS http://127.0.0.1:8080 > /dev/null && echo "webui-ok"Open http://127.0.0.1:8080 to open the WebUI and complete first-time setup there. The setup completion gate is the first successful chat response from your selected hosted API key or local OpenAI-compatible provider. Immediately after that, add your first source so chat can use your own material.
If you prefer terminal verification, the CLI verify command still runs a provider-independent first-value ingest/search check. It posts a small Markdown document to /api/v1/media/add, then searches for tldw-onboarding-verification-unique through /api/v1/media/search.
make verify-local-singleThis runtime check does not require an LLM provider key. Normal first-time chat/provider setup happens in the WebUI wizard; no manual config-file changes are required for the standard solo path.
Local audio setup can use host-side config and model files directly. After this profile is running, continue with one of:
- If install fails due to Python version, rerun with
PYTHON=python3.12 make install-localor another supported interpreter. - If startup fails on audio/video dependencies, verify
ffmpeg -version. - If port
8000is in use, stop the conflicting process or runuvicornon another port. - If the WebUI port
8080is in use, stop the conflicting process or start Next.js on another port withbun run dev -- -p 8081. - If
bun installfails, verify Bun withbun --version, or use the npm fallback commands from the WebUI section. - If the WebUI loads but cannot reach the API, confirm
.env.localuses the same host and port as the running API, usuallyNEXT_PUBLIC_API_URL=http://127.0.0.1:8000. - If direct API calls return
401, confirmSINGLE_USER_API_KEYintldw_Server_API/Config_Files/.envand use it asX-API-KEY. - If WebUI setup cannot save provider settings, use
/setupas the backend/operator recovery surface and inspecttldw_Server_API/Config_Files/.envonly as a troubleshooting step. - On Windows, use WSL2 for the Makefile path or run the PowerShell equivalents.
- Keep provider setup in the WebUI first-run wizard for the normal path; add provider API keys to
tldw_Server_API/Config_Files/.envonly for recovery, automation, or advanced deployments, then restart the server. - For deeper WebUI development details, see Extension & Web UI Development Guide and tldw-frontend README.
- For LAN, mobile, reverse-proxy, or custom-host browser access, see Run the Web UI (WIP).
- Install development extras with
source .venv/bin/activate && pip install -e ".[dev]".