Self-host on Render
Self-host anfra on Render as a Docker web service.
Set up with a coding agent
Self-host this anfra project on Render. Follow https://anfra.ai/docs/self-host/render.md. Do the steps you can, and tell me which ones I need to do.You need your project on GitHub (how) and a Render account. If an organization owns the repo, one of its owners may need to approve Render's GitHub app.
1. Add a Dockerfile to your project
From your project's folder, run:
curl -fsSL -O https://raw.githubusercontent.com/holistics/anfra-hosting/main/Dockerfile \
-O https://raw.githubusercontent.com/holistics/anfra-hosting/main/.dockerignore
git add Dockerfile .dockerignore
git commit -m "Add Dockerfile"
git push2. Create the service
In the Render dashboard, click New > Web Service, choose Git Provider, and select your project's repo. Fill in the form:
-
Language:
Docker -
Environment Variables: in KEY, type
LOGIN_USERS. In VALUE, type a name and password for each person who can sign in, asname:password, separated by commas. Include one foragent: your coding agent signs in with it in step 4. For example:maria:a-long-password,agent:another-long-passwordTo let people sign in with Google or GitHub instead, or to use your own login such as Tailscale or Cloudflare Access, see Authentication.
-
Advanced > Secret Files: click Add Secret File, name it
data_sources.yml, and paste the contents of your.anfra/data_sources.yml.
Your database credentials
Git leaves .anfra/data_sources.yml out, so the secret file is how Render gets your database credentials. Skip it if your project only uses a DuckDB file in the repo.
Click Deploy web service. The first deploy takes a few minutes. After that, every push to your repo deploys again.
3. Check that it works
When the deploy finishes, open the address at the top of the service's page, https://<name>.onrender.com. You see a login page. Sign in with a user from LOGIN_USERS, and open one of your Data Apps: it shows your data.
If the deploy fails, open Logs. The last line starting with start.sh: says what to fix, see Troubleshooting. If your apps show errors instead of data, anfra can't reach your database: check the secret file data_sources.yml, and if your database only accepts known IP addresses, allow Render's outbound IP addresses.
4. Connect your coding agent
In Claude Code, with your address and the agent user's password:
claude mcp add --transport http anfra https://<name>.onrender.com/mcp \
--header "Authorization: Basic $(printf 'agent:<agent-password>' | base64 | tr -d '\n')"Ask it to list your datasets and run a small query. For other agents, see Coding agents with MCP.
Updates
Your anfra project
When you change your project, such as a new or edited Data App, model or dataset, commit it and push it:
git add .
git commit -m "Add the sales dashboard"
git pushRender deploys it on its own, within a few minutes.
anfra
Your Dockerfile pins the anfra version. To move to the latest one, download it again from your project's folder, and push it:
curl -fsSL -O https://raw.githubusercontent.com/holistics/anfra-hosting/main/Dockerfile
git add Dockerfile
git commit -m "Update anfra"
git pushIt deploys like any change to your project. Run anfra update too, so your CLI matches.