Skip to content

Self-hosted mode: custom API URL not persisted across commands when authentication is skipped #57

@KlementMultiverse

Description

@KlementMultiverse

Problem

When using a self-hosted Firecrawl instance with --api-url, the configuration is not persisted. On the first command, --api-url http://localhost:3002 scrape https://example.com works correctly and skips authentication. However, on the second command, running just firecrawl scrape https://example.com defaults back to https://api.firecrawl.dev and triggers an authentication prompt, even though the user already configured a custom API URL.

This forces users to pass --api-url on every single command, defeating the purpose of configuration persistence for self-hosted setups.

Steps to Reproduce

  1. Start a local Firecrawl instance: docker run -p 3002:3002 firecrawl-local
  2. Run first command: firecrawl --api-url http://localhost:3002 scrape https://example.com
    • Result: ✅ Works, no authentication required
  3. Run second command: firecrawl scrape https://example.com
    • Expected: ✅ Uses the previously configured http://localhost:3002, no auth prompt
    • Actual: ❌ Defaults to https://api.firecrawl.dev, prompts for authentication

Why This Matters

  • Self-hosted deployments are common in enterprise environments where users should not need cloud API credentials
  • The README explicitly documents that "authentication is automatically skipped" for custom API URLs, implying the URL should be saved
  • Users developing locally or running internal Firecrawl instances have no way to set a persistent default without wrapping the CLI in shell aliases or environment variables
  • This degrades the developer experience compared to the cloud-first workflow

Expected Behavior

firecrawl config --api-url http://localhost:3002 (or similar persistent config command) should:

  1. Save the API URL to the config file (likely ~/.firecrawl/config.json or similar)
  2. On subsequent commands without --api-url, use the saved URL instead of the cloud default
  3. Allow users to reset with firecrawl config --api-url https://api.firecrawl.dev or firecrawl config --reset

Related

This appears related to #53, which mentions config persistence issues with self-hosted setups.


Contributed by Klement Gunndu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions