How to Install CodeSpider
Start with one test repository. Choose Gitea for the workflow recorded end to end, or GitHub for the provider tested against local HTTP fixtures. GitHub.com and GitHub Enterprise Server have not been live-validated. Upstream lists compatible Forgejo via the Gitea provider; the recordings here do not validate Forgejo.
Shared prerequisites
Section titled “Shared prerequisites”- Docker with the Compose plugin (recommended), or a Go 1.26+ toolchain with Git for a standalone build.
- A bot or App credential scoped to your test repository, a webhook secret, and an OpenAI-compatible model endpoint that supports tool calling.
- A webhook URL reachable by your forge. A hosted GitHub instance cannot reach
127.0.0.1; see the reverse-proxy option before registering the webhook.
Clone the published v1.1.0 source. The walkthrough used a local image build from this tag; the instructions do not require registry access.
git clone --branch v1.1.0 --depth 1 https://github.com/Eresus-Security-OSS/CodeSpider.gitcd CodeSpidercp codespider.example.yaml codespider.yamlKeep the common settings below in codespider.yaml and use one forge block from the next section. Set the referenced variables in a local .env file for Compose. Keep that file out of commits and restrict access to it.
server: listen_addr: ":8080" admin_token: "${CODESPIDER_ADMIN_TOKEN}"llm: base_url: "${CODESPIDER_LLM_BASE_URL}" api_key: "${CODESPIDER_LLM_API_KEY}" model: "${CODESPIDER_LLM_MODEL}"agent: enable_write: false enable_proof_of_bug: falsesandbox: mode: disableddaemon: data_dir: ./data workers: 1The agent will not edit source or run tests with these settings. The bot can still post PR comments and commit statuses. A hosted model endpoint receives repository context; see Ollama and private models if the code must stay on your network.
Use forge.provider: gitea. In Gitea setup, create the bot account, grant access to one repository and create its token. Keep the github block disabled.
forge: provider: gitea repos: [your-org/pilot-repo]gitea: base_url: https://gitea.example.com token: "${GITEA_BOT_TOKEN}" webhook_secret: "${GITEA_WEBHOOK_SECRET}" bot_username: codespider allow_unsigned_webhooks: falseAfter starting the daemon, add the Gitea repository webhook with the same secret. Verify successful delivery before opening a PR. The forge.repos list limits reconciliation; it does not replace limiting token access or where you install webhooks.
GitHub
Section titled “GitHub”Use forge.provider: github. Remove the gitea block. Pick a static token or GitHub App; the example below uses a token. For an App, follow the linked guide for the required fields and read-only PEM mount instead of setting github.token.
forge: provider: github repos: [your-org/pilot-repo]github: api_url: https://api.github.com token: "${CODESPIDER_GITHUB_TOKEN}" webhook_secret: "${CODESPIDER_GITHUB_WEBHOOK_SECRET}" bot_username: "codespider[bot]"Set bot_username to the account that posts reviews. After starting the daemon, register the GitHub webhook events on your test repository. Use a signed delivery and review the response. For GitHub Enterprise Server, set api_url to its HTTPS REST endpoint.
Option 1: Docker Compose (Recommended)
Section titled “Option 1: Docker Compose (Recommended)”Create compose.pilot.yaml in the clone. This builds the pinned source, keeps persistent state in a named volume, and exposes the daemon only on host loopback.
services: codespider: build: context: . args: VERSION: v1.1.0 restart: unless-stopped env_file: .env cap_drop: [ALL] security_opt: [no-new-privileges:true] ports: - "127.0.0.1:8080:8080" volumes: - ./codespider.yaml:/app/codespider.yaml:ro - codespider_pilot:/app/datavolumes: codespider_pilot:docker compose -f compose.pilot.yaml up -d --builddocker compose -f compose.pilot.yaml logs -f codespiderUse a model URL reachable from inside the container. A 127.0.0.1 Ollama endpoint in container config refers to that container, not the host running Ollama.
Option 2: Rootless Podman
Section titled “Option 2: Rootless Podman”From the same clone, build the pinned image and reuse codespider.yaml and .env:
podman build --build-arg VERSION=v1.1.0 -t codespider:1.1.0-pilot .podman volume create codespider_pilotpodman run -d --name codespider --env-file .env \ -p 127.0.0.1:8080:8080 \ -v ./codespider.yaml:/app/codespider.yaml:ro,Z \ -v codespider_pilot:/app/data:U codespider:1.1.0-pilotOption 3: Build from Go Source + systemd
Section titled “Option 3: Build from Go Source + systemd”On Linux, build with Go 1.26+ and Git in PATH. Load the configuration’s referenced variables before running the binary. If a reverse proxy runs on the same host, set server.listen_addr: "127.0.0.1:8080".
go build -ldflags '-X main.version=v1.1.0' -o codespider ./cmd/codespider./codespider -f codespider.yamlFor a persistent service, install the binary under /usr/local/bin, copy the config to /etc/codespider/codespider.yaml, and give a dedicated unprivileged codespider user read access to the config and write access to its state directory. Use a systemd EnvironmentFile for the variables and a working directory containing the skills directory from the same tag.
Option 4: Reverse Proxy (Caddy or Nginx)
Section titled “Option 4: Reverse Proxy (Caddy or Nginx)”Expose only /webhook to the forge and keep /, /status, and other admin routes on the private listener. Terminate TLS on the proxy. For example, with Caddy on the same host:
codespider.example.com { handle /webhook { reverse_proxy 127.0.0.1:8080 } handle { respond 404 }}In Nginx, use an exact-match location = /webhook that proxies to http://127.0.0.1:8080, and return 404 for other public paths. Keep separate private access to the Operations Console.
Verify Your Installation
Section titled “Verify Your Installation”- Confirm
curl -fsS http://127.0.0.1:8080/healthzandcurl -fsS http://127.0.0.1:8080/readyzsucceed. - Use your forge’s delivery log to verify that the daemon accepted the signed webhook. On Gitea,
@codespider /helpis an optional model-free check; it does not prove the model works. - Open or update a test PR with a small, known behavior change. Look for the review summary and
codespider/reviewstatus on the right commit. An inline comment is expected only when CodeSpider reports a line-level finding. - Compare the result with the recorded Gitea example and use the pilot checklist to separate useful findings from duplicates of existing checks. Keep CI and human approval in place.
If no review appears, check signed webhook delivery, the daemon logs, and then model reachability from the daemon environment.