## TL;DR

Fix: Collaborator rafaelsideguide: set USE_DB_AUTHENTICATION=false in .env and use any string as the API key; follow the self-host guide.

## The error

```text
[Self-Host] Question: how to set the API key when running Firecrawl locally / what value to use in client SDKs and integrations like Dify.
```

## Fix

1. Collaborator rafaelsideguide: set USE_DB_AUTHENTICATION=false in .env and use any string as the API key; follow the self-host guide.

Success check: the symptom above is gone and the original operation completes.

## When to use

- You hit this exact symptom in firecrawl.
- You want the verified fix without digging through the thread.

## When not to use

- A different error in firecrawl, even a similar-looking one.
- General firecrawl setup or credential questions.

## Compatibility

- Firecrawl (firecrawl/firecrawl)

## Variant phrasings

- How to fix "how to set the api key when running locally?" in firecrawl
- firecrawl: how to set the api key when running locally?

## Source

- https://github.com/firecrawl/firecrawl/issues/557