Self-Host Troubleshooting
Use this page when ThreadLens starts but the first-run path does not reach useful findings.
If you used npx create-threadlens-app@latest, also check the generated app directory’s README.md for instance-specific doctor, logs, upgrade, and reset commands.
The installer says Docker is missing or unavailable
Section titled “The installer says Docker is missing or unavailable”- Install Docker Desktop or Docker Engine with Compose support.
- Start Docker and rerun the installer command.
- If the installer already created a local app directory, use the generated app’s
doctorcommand after Docker starts.
The installer reports a port conflict
Section titled “The installer reports a port conflict”- Pick a different port during install, or let the installer choose the next available port.
- If you already created a generated app, update the instance’s manifest or rerun the installer with a new port.
- For repo-level development commands, check whether something else is already using
4748or4749.
Docker starts but the web app is unreachable
Section titled “Docker starts but the web app is unreachable”- Check that all containers are running:
docker compose ps - Confirm port 4748 is not already in use on your host:
lsof -i :4748 - Run the smoke test from the repository root:
pnpm run self-host:smoke - If the smoke test fails, check container logs:
docker compose logs --tail=50 api web - Restart the stack:
docker compose down && docker compose up -d
The setup wizard cannot save provider settings
Section titled “The setup wizard cannot save provider settings”- Confirm
.envexists at the repository root and is mounted — the wizard writes values there. - Check that the file is writable by the Docker user:
ls -la .env - If the file is missing, copy the example:
cp .env.example .env - After saving env changes, restart containers so they pick up the new values:
docker compose restart
AI scoring or reports fail
Section titled “AI scoring or reports fail”- Open the repository root
.envand verify at least one AI key is present:ANTHROPIC_API_KEY— primary provider (Claude)GEMINI_API_KEY— fallback provider (Gemini)
- Confirm the key is valid by testing it directly with the provider’s API playground.
- Check container logs for
401orinvalid_api_keyerrors:docker compose logs api | grep -i "api_key\|401\|error" - If using Anthropic, ensure your account has credits and the key has not been revoked.
- Restart after correcting keys:
docker compose restart api
Google scouting fails
Section titled “Google scouting fails”- Confirm
PARALLEL_API_KEYis set in the repository root.env. - Verify the key is active in your Parallel.ai dashboard.
- Check for quota errors in the API logs:
docker compose logs api | grep -i "parallel\|quota\|429" - Google scouting requires a project query with platform set to
google— confirm at least one is enabled in the project settings.
Bluesky scouting fails
Section titled “Bluesky scouting fails”- Confirm both
BLUESKY_HANDLEandBLUESKY_APP_PASSWORDare set in the repository root.env. BLUESKY_HANDLEmust be your full handle (e.g.yourname.bsky.social).BLUESKY_APP_PASSWORDmust be an App Password created in Bluesky settings, not your login password.- Test authentication by checking logs after a failed scout:
docker compose logs api | grep -i "bluesky\|auth"
First query returns noisy results
Section titled “First query returns noisy results”Overly broad queries (e.g. AI tools) return high-volume, low-signal posts. Use a specific pain-point phrase instead.
- ❌ Too broad:
AI tools - ✅ More specific:
meeting notes too time consuming
Tips for better queries:
- Phrase the query as a complaint or frustration, not a product category.
- Add a qualifier that signals intent (e.g. “too slow”, “keeps breaking”, “wish there was”).
- Start with one focused query per platform and expand only after reviewing initial results.
Reset first-run onboarding
Section titled “Reset first-run onboarding”If you need to restart the onboarding flow from scratch:
- Stop the stack:
docker compose down - Remove the SQLite data volume (this deletes all projects and posts):
docker volume rm threadlens_data(replacethreadlens_datawith the actual volume name shown indocker volume ls) - Remove
.envfrom the repository root or clear provider keys from it. - Start the stack again:
docker compose up -d - The setup wizard will reappear on next visit to the web app.
Warning: Removing the data volume permanently deletes your SQLite database including all projects, posts, and reports. Back up
scout.dbfirst if you want to preserve your data.