Every push to your homelab repository should run tests, build images, and deploy — without asking a cloud vendor for permission or paying per build minute. If you already run Gitea for private Git, the missing piece is a CI engine that lives next to it. Woodpecker CI is that piece: an open-source pipeline server written in Go, light enough for a Raspberry Pi, and shaped so that a two-container Docker Compose stack gives you a complete CI/CD system with a web UI, webhook triggers, and Docker-based build agents. Because it runs on your hardware, your source code, signing keys, and deploy secrets never leave the machines you control.

This guide walks through a production-ready Woodpecker deployment: the server and agent containers, connecting it to Gitea, the environment variables that actually matter, HTTPS behind a reverse proxy, your first pipeline file, secrets, and a backup routine for the database. It follows the official Woodpecker documentation and the project’s own Docker Compose guide, with images pinned to the current stable major version, v3 (3.20.x at the time of writing — check the releases page when you deploy, because Woodpecker publishes a new minor release roughly every four weeks).

Why Woodpecker and not a hosted alternative?

GitHub Actions and GitLab CI are excellent, and for public projects they are often the right call. The reasons to self-host CI are the same reasons you self-host anything: privacy, cost predictability, and control. A homelab instance never bills you for build minutes, never throttles your queue behind other tenants, and never logs out of existence because a workspace was archived.

Woodpecker’s specific strengths compared with other self-hosted options:

  • Lightweight by design — the server and agent are single Go binaries distributed as small containers; the default SQLite database needs no separate database server to get started.
  • Container-native steps — every pipeline step runs in a Docker container with its own image, so “works on my machine” arguments disappear.
  • Forge-agnostic — native support for GitHub, GitLab, Gitea, and Forgejo, which makes it a natural pair for a self-hosted Gitea instance.
  • Scalable agents — one server can serve many agents; add a second machine later and register it with the same shared secret.

The honest trade-offs: you apply updates yourself, the UI is functional rather than polished, and you own the security of the Docker socket mounted into the agent. If you already accept those terms for the rest of your homelab, Woodpecker fits right in.

How the pieces fit together

Woodpecker has two required components and one optional one:

  • Server — the web UI, the API, and the brain. It receives webhooks from your forge, parses .woodpecker/*.yaml pipeline files, queues work, and reports status back to the forge. By default it listens on port 8000 for HTTP and port 9000 for gRPC.
  • Agent — the muscle. It connects to the server over gRPC, pulls jobs from the queue, and executes each step as a Docker container. It needs access to the host’s Docker daemon (/var/run/docker.sock) to do that.
  • Autoscaler (optional) — spins up temporary cloud VMs to process pending builds and destroys them afterwards. Homelab users can ignore it; it exists for burst capacity.

The database story is simple: Woodpecker ships with SQLite by default, stored in /var/lib/woodpecker, and the docs recommend Postgres or MariaDB only for larger instances. For a homelab, SQLite plus a disciplined backup routine is the right level of complexity.

What you need

  • A Linux host with Docker and the Compose plugin (any 4 GB RAM box will do; Woodpecker famously runs on a Raspberry Pi).
  • A forge to connect: an existing Gitea or GitHub account. This guide uses Gitea, since it is the most common homelab pairing.
  • A DNS name pointing at the host, such as ci.example.com, if you want HTTPS.
  • Ten minutes.

Step 1: Register an OAuth application in Gitea

Woodpecker uses your forge both for login and for webhook delivery, so the first step happens in Gitea, not on the server. Navigate to https://git.example.com/user/settings/applications (per-user) or, if you administer both systems, https://git.example.com/admin/settings/applications for a system-wide application that all users can benefit from.

Create a new OAuth2 application with these values:

  • Application name: Woodpecker CI
  • Authorization callback URL: https://ci.example.com/authorize — the scheme, host, and path must match your Woodpecker URL exactly.

Gitea will show you a Client ID and a Client Secret. Save both; they go into the .env file in the next step.

One more Gitea-side setting matters when both services live on the same host: since Gitea v1.16, webhooks to loopback or private networks are blocked by default. Edit your Gitea configuration (usually /etc/gitea/conf/app.ini for native installs, or the mounted data/gitea/conf/app.ini in container setups) and allow the webhook:

[webhook]
ALLOWED_HOST_LIST = external,loopback

Without this line, Woodpecker will receive no webhook traffic and every push will silently produce no build — the single most common “my pipeline never runs” support question.

Step 2: Create the project directory and secrets

Create a directory for the stack and generate the agent secret, a random string the server and agents use to authenticate each other over gRPC:

mkdir -p ~/woodpecker && cd ~/woodpecker
echo "WOODPECKER_AGENT_SECRET=$(openssl rand -hex 32)" >> .env

Then add the forge and host settings to the same .env file:

cat >> .env <<'EOF'
WOODPECKER_HOST=https://ci.example.com
WOODPECKER_GITEA=true
WOODPECKER_GITEA_URL=https://git.example.com
WOODPECKER_GITEA_CLIENT=your-client-id
WOODPECKER_GITEA_SECRET=your-client-secret
EOF
chmod 600 .env

The WOODPECKER_HOST value deserves attention: it must be the public address in <scheme>://<hostname> form with no trailing slash, because Woodpecker builds webhook URLs and status links from it. Set it to the HTTPS domain users will type into a browser, not localhost.

Step 3: Write the Docker Compose file

Create docker-compose.yaml next to the .env file. This is the official example from the Woodpecker docs, adjusted with restart policies:

services:
  woodpecker-server:
    image: woodpeckerci/woodpecker-server:v3
    restart: unless-stopped
    ports:
      - "8000:8000"
    volumes:
      - woodpecker-server-data:/var/lib/woodpecker/
    environment:
      WOODPECKER_OPEN: "true"
      WOODPECKER_HOST: ${WOODPECKER_HOST}
      WOODPECKER_GITEA: ${WOODPECKER_GITEA}
      WOODPECKER_GITEA_URL: ${WOODPECKER_GITEA_URL}
      WOODPECKER_GITEA_CLIENT: ${WOODPECKER_GITEA_CLIENT}
      WOODPECKER_GITEA_SECRET: ${WOODPECKER_GITEA_SECRET}
      WOODPECKER_AGENT_SECRET: ${WOODPECKER_AGENT_SECRET}

  woodpecker-agent:
    image: woodpeckerci/woodpecker-agent:v3
    command: agent
    restart: unless-stopped
    depends_on:
      - woodpecker-server
    volumes:
      - woodpecker-agent-config:/etc/woodpecker
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      WOODPECKER_SERVER: woodpecker-server:9000
      WOODPECKER_AGENT_SECRET: ${WOODPECKER_AGENT_SECRET}

volumes:
  woodpecker-server-data:
  woodpecker-agent-config:

Three details in this file carry the whole design:

  • The named volume woodpecker-server-data holds /var/lib/woodpecker/ — the SQLite database with every user, repository, and pipeline record. It is the most important part to persist; losing it means re-registering everything.
  • The Docker socket mount gives the agent permission to start the containers that run your pipeline steps. This is real power: anyone who can define a pipeline on your Woodpecker can effectively run containers on this host. Keep the instance private, or review the security boundaries documentation before opening it to others.
  • WOODPECKER_SERVER=woodpecker-server:9000 points the agent at the server’s gRPC port inside the Compose network. No traffic between agent and server touches the public internet, so no gRPC TLS is needed in this layout. (If you ever split them across machines, set WOODPECKER_GRPC_SECURE=true on the agent and terminate TLS properly — the docs cover this in the Compose guide.)

Check that the file parses and the environment interpolation resolves before starting anything:

docker compose config --quiet && echo "compose OK"

Step 4: Start the stack and log in

docker compose up -d
docker compose logs -f woodpecker-server

Wait for the server to log that migrations have run, then open http://your-server-ip:8000. The first thing you will see is the login button for Gitea. Sign in through the OAuth flow, and your Gitea repository list appears. Click New repository, pick the repositories you want to build, and Woodpecker installs a webhook on each one. From now on, every push, pull request, and tag event in those repositories triggers a pipeline.

On the same-host Gitea note from Step 1: the agent clones code using the URL that Gitea reports through its API. If Gitea runs in a container network named gitea, add this to the agent’s environment so pipeline containers can resolve and reach it:

      WOODPECKER_BACKEND_DOCKER_NETWORK: gitea

Step 5: HTTPS with Caddy

Port 8000 with plain HTTP is fine for testing, but logins and repository tokens should travel over TLS. Put the Caddy reverse proxy in front with automatic Let’s Encrypt certificates. Add the site to your Caddyfile:

ci.example.com {
    reverse_proxy localhost:8000
}

Reload Caddy (systemctl reload caddy or docker compose exec caddy caddy reload --config /etc/caddy/Caddyfile, depending on your setup) and update WOODPECKER_HOST=https://ci.example.com in the .env, then recreate the stack with docker compose up -d. The OAuth callback URL you registered in Step 1 already matches this domain, so the login flow keeps working.

Step 6: Your first pipeline

Woodpecker reads workflow files from the .woodpecker/ directory of each activated repository. Every file with the .yaml extension becomes a separate workflow, and they run in parallel unless you chain them with depends_on. Start with .woodpecker/ci.yaml:

when:
  - event: push
    branch: main

steps:
  - name: install
    image: node:22-alpine
    commands:
      - npm ci

  - name: test
    image: node:22-alpine
    commands:
      - npm test

Push that file to main and watch the run appear in the Woodpecker UI. What happens under the hood:

  1. Gitea sends a webhook; the server parses the YAML and validates it against the workflow syntax.
  2. The server queues the workflow; an agent picks it up over gRPC.
  3. The built-in clone step checks out your repository into a shared workspace directory.
  4. Each step runs in the container image you named, in declaration order, sharing the workspace — so the test step sees the files the install step produced (including node_modules).
  5. The server reports pass/fail back to Gitea, where the commit gets a status check.

The when block at the top filters events: this workflow only runs for pushes to main. You can filter on branches, tags, paths, and many other conditions, and per-step when blocks let you skip individual steps — for example, running a deploy step only on tag events.

Two habits from the docs are worth adopting immediately:

  • Test workflows locally with woodpecker-cli exec .woodpecker/ci.yaml before pushing, which catches syntax errors and prints step output without a round trip through the forge.
  • Use from_secret for anything sensitive, defined in the Woodpecker UI under Secrets, never committed to the YAML:
  - name: deploy
    image: alpine:3.20
    commands:
      - apk add --no-cache openssh
      - ./deploy.sh
    environment:
      DEPLOY_TOKEN:
        from_secret: deploy_token

Step 7: Backups and maintenance

Woodpecker stores its entire state in one directory, which makes backups a one-liner. Run from the host:

docker compose exec -T woodpecker-server tar cz -C /var/lib/woodpecker . > "woodpecker-$(date +%F).tar.gz"

A cheap trap to avoid: stopping the stack while a pipeline is mid-run leaves a job half-executed; the agent will mark it as failed on restart. Pause the queue (or just accept the red mark — Woodpecker recovers gracefully) before scheduled maintenance. For the same reason, pin the image version in your compose file — the project deliberately publishes no latest tag to prevent accidental major upgrades — and read the changelog before bumping v3 to a newer major.

Rebuild the stack when a new patch release lands:

docker compose pull && docker compose up -d

If you keep the rest of your homelab on a schedule with restic backups, add the Woodpecker volume to the same job. It is small (megabytes unless you keep long pipeline logs) and restores in seconds.

FAQ

Does Woodpecker cost anything? No. Woodpecker is open source (Apache 2.0) and free to self-host. The project offers a hosted option for those who want it, but this guide covers only your own instance.

Can it build Docker images inside pipelines? Yes — the standard approach is running a Docker build tool as a pipeline step (for example the official Woodpecker plugins for kaniko, buildx, or podman), all listed in the plugin catalog. Mounting the host Docker socket into build steps works too, but treat it as a trusted-environment shortcut.

How is this different from Jenkins? Jenkins is far older and infinitely flexible, with a plugin ecosystem measured in thousands — and an administration surface to match. Woodpecker’s philosophy is fewer moving parts: YAML workflows, containerized steps, and almost no server-side configuration beyond environment variables. Most homelab CI needs fit comfortably in Woodpecker’s model.

Can I run multiple agents? Yes, and it is the intended scaling path. Start another agent container — on the same host or another machine — pointing at the same WOODPECKER_SERVER address with the same WOODPECKER_AGENT_SECRET. Each agent contributes parallel workflow capacity; tune concurrency per agent with WOODPECKER_MAX_WORKFLOWS.

What if my pipeline never triggers on push? Check three things in order: the Gitea webhook delivery log (Settings → Webhooks in the repository) for red deliveries, the ALLOWED_HOST_LIST setting in Gitea’s app.ini if both run on one host, and WOODPECKER_HOST in the server environment — a wrong scheme or trailing slash breaks webhook URLs.

Is SQLite really enough? For a homelab, yes — the database holds users, repos, and pipeline metadata, not your build artifacts. The docs recommend Postgres or MariaDB for large, busy instances; a single-user or small-team Woodpecker stays comfortably within SQLite’s capabilities for years.