Spaces:
Running
Running
|
Download DEPLOY_HF_SPACE.md from Nebulixlabs/NebulixLabs-Router: direct link, hf CLI and curl.
- Browser
- Download file 1.64 kB
-
https://huggingface.co/spaces/Nebulixlabs/NebulixLabs-Router/resolve/main/DEPLOY_HF_SPACE.md
- Command line
-
hf download hf://spaces/Nebulixlabs/NebulixLabs-Router/DEPLOY_HF_SPACE.md
-
curl -L -o DEPLOY_HF_SPACE.md https://huggingface.co/spaces/Nebulixlabs/NebulixLabs-Router/resolve/main/DEPLOY_HF_SPACE.md
1.64 kB
Deployment checklist
- Create/select a Hugging Face Space with Docker SDK.
- Upload
README.md,Dockerfile,app.py,requirements.txt, and.gitignoreto the repository root. - Add the
ENCRYPTION_KEYsecret in Space Settings → Variables and secrets. Generate it locally with:python -c "import secrets; print(secrets.token_hex(32))" - For persistence, attach a writable Storage Bucket volume to
/data. Without a mounted persistent volume, the database and fallback key may be lost on restart. - Wait for the build. The runtime should start with
node server/dist/index.js; the Python launcher ensures this command is passed to the upstream entrypoint. - Open the Space, complete the dashboard's initial account setup, then configure upstream provider keys.
- Copy the unified API key from the dashboard and configure Claude Code:
npx freellmapi setup-claude --url "https://<username>-<space-name>.hf.space" --api-key "<unified-api-key>"
Endpoints
- UI:
https://<username>-<space-name>.hf.space/ - OpenAI-compatible API:
https://<username>-<space-name>.hf.space/v1 - Claude Code / Anthropic API base:
https://<username>-<space-name>.hf.space
Important
- FreeLLMAPI is a Node.js/React application.
app.pyis the Python startup wrapper, not a Python rewrite of the entire product. - Never commit provider keys, unified API keys, or encryption secrets to Git.
- A private Space may require Hugging Face authentication in addition to FreeLLMAPI authentication. Test external CLI access for your visibility settings.
- Keep the same encryption secret when retaining an existing database.