Skip to content

[Docs] Document NEXT_PUBLIC_MARKET_BASE_URL and Market API contract for self-hosters #10762

@PrakrutR

Description

@PrakrutR

📚 Documentation Request

Background

I discovered that LobeChat already supports custom market server URLs via the NEXT_PUBLIC_MARKET_BASE_URL environment variable. This is excellent for self-hosters who want to run their own marketplace infrastructure. However, this capability is currently undocumented.

What's Missing

  1. Environment Variable Documentation

  2. Market API Contract Documentation

    • No documentation explaining what endpoints a compatible market server must implement
    • The @lobehub/market-sdk package is used internally but its expected API contract isn't publicly documented

Requested Documentation

1. Add to Environment Variables docs:

Variable Description Default
NEXT_PUBLIC_MARKET_BASE_URL Custom market server URL for self-hosted marketplace https://market.lobehub.com

2. Create a "Self-hosting Custom Market" guide covering:

  • When to use a custom market server (privacy, enterprise, air-gapped environments)
  • Required API endpoints (agents, plugins, MCPs, models, providers)
  • Authentication requirements (M2M tokens, OIDC flows)
  • Example minimal implementation or reference to @lobehub/market-sdk types

Why This Matters

Self-hosting is a key strength of LobeChat. Documenting the market customization capability would:

  • Empower privacy-conscious deployments
  • Support enterprise/air-gapped environments
  • Reduce support burden by enabling community-built solutions

References

  • Related feature already exists in code: src/server/services/discover/index.ts
  • SDK packages: @lobehub/market-sdk, @lobehub/market-types
  • My previous issue: #10752

Metadata

Metadata

Assignees

No one assigned

    Labels

    📝 DocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions