A self-hosted AI chat setup using openclaw with free NVIDIA NIM models via claude-code-free.
Get a free NVIDIA NIM API key from https://build.nvidia.com/settings/api-keys
The fastest way to try free-the-claw — no local install needed.
- Click the
Open in GitHub Codespaces badgeabove - When prompted, add your
NVIDIA_NIM_API_KEYas a Codespaces secret - Wait for the containers to build and start
- The gateway port (18789) auto-opens in your browser — log in with
?token=changeme
Codespaces is ephemeral and will reset after a while. To persist your data, follow the Deploy on Railway section instead.
-
Clone the repo:
git clone --recurse-submodules https://github.com/polats/free-the-claw.git cd free-the-claw -
Copy the example env file and add your API key:
cp .env.example .envEdit
.envand set your API key and model:NVIDIA_NIM_API_KEY=your-key-here MODEL=stepfun-ai/step-3.5-flash -
Start the services:
docker compose up -d -
Open http://localhost:18789/?token=changeme in your browser.
- Model: Change
MODELin.env(default:stepfun-ai/step-3.5-flash)
Popular choices:
stepfun-ai/step-3.5-flashmoonshotai/kimi-k2.5z-ai/glm4.7minimaxai/minimax-m2.1mistralai/devstral-2-123b-instruct-2512
See Claude Code Free to add more models.
-
Gateway token: Change
OPENCLAW_GATEWAY_TOKENindocker-compose.yml(default:changeme) -
Ports: claude-code-free runs on
8082, openclaw on18789
For persistent hosting, deploy on Railway with two services from this repo. You will probably need the Hobby Plan ($5/month) as the free tier may not have enough memory for openclaw.
- Click the Deploy on Railway badge above
- Add your NVIDIA NIM API key from https://build.nvidia.com/settings/api-keys in the openclaw service's variables
- Once deployed, you should see the gateway URL on the service (similar to
https://openclaw-railway-1234567890.up.railway.app) - Visit the URL via the browser appended with
?token=changeme(you can change this OPENCLAW_GATEWAY_TOKEN in the openclaw service's environment variables)
Connect your GitHub account by adding a Personal Access Token to your .env:
GITHUB_PAT_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This does two things:
- Agent persona — auto-detects your GitHub username and fetches your profile README (the
username/usernamerepo) as a SOUL.md, which openclaw injects into the agent's system prompt - Git operations — configures git credentials and
ghCLI so the agent can clone, push, pull, and interact with your repos