Woodpecker CI: Lightweight Self-Hosted CI

Khimananda Oli 7 min read Database
Woodpecker CI: Lightweight Self-Hosted CI

By Khimananda Oli | Last reviewed: August 2026

Teams needing full control over their build environment often hit a wall with SaaS runners: high costs, data residency concerns, and network latency. Woodpecker CI: Lightweight Self-Hosted CI solves this by providing a container-native automation platform that runs entirely on your own infrastructure. If you are evaluating self-hosted CI runners for compliance or performance, Woodpecker offers a streamlined alternative to heavier orchestrators.

Woodpecker ServerAPI & SchedulerWebhook ReceiverUI DashboardWoodpecker AgentPipeline ExecutorDocker / K8s BackendIsolated ContainersDatastorePostgreSQL / SQLiteBuild Logs & StateUser SecretsgRPC / TasksRead / Write
Core architecture of Woodpecker CI: Lightweight Self-Hosted CI showing the separation between server, agent, and datastore

How does Woodpecker CI: Lightweight Self-Hosted CI work?

Woodpecker operates on a decoupled server-agent model that prioritizes isolation and scalability. The server component handles webhooks from your Git provider (Gitea, GitHub, GitLab), manages the UI, stores configuration, and schedules builds. It does not execute any code itself. This separation is critical for security; your build logic never runs on the same host as your scheduling logic or database.

The agent component connects to the server via gRPC and polls for work. When a pipeline is triggered, the server assigns it to an available agent based on labels and capacity. The agent then translates the YAML pipeline definition into backend-specific operations. By default, this means spinning up ephemeral Docker containers for each step, ensuring no state leaks between builds. For teams already running Kubernetes clusters, Woodpecker can also schedule pods directly, making it truly cloud-native.

Understanding the execution lifecycle

  1. Webhook Receipt: The server receives a push or pull request event and validates the signature.
  2. Pipeline Parsing: The .woodpecker.yml file is parsed, and secrets are injected securely from the datastore.
  3. Scheduling: The server matches the pipeline's required labels (e.g., platform: linux/amd64) against registered agents.
  4. Execution: The assigned agent creates isolated containers for each step, streaming logs back to the server in real-time.
  5. Cleanup: Upon completion (success or failure), all containers and temporary volumes are destroyed automatically.

How do you install and configure Woodpecker CI?

Deployment is straightforward because Woodpecker ships as two small Go binaries or container images. For most production environments, I recommend running both the server and agent as containers via Docker Compose or Helm. Below is a battle-tested Docker Compose configuration that sets up a secure, persistent instance.

version: '3.8'

services:
  woodpecker-server:
    image: woodpeckerci/woodpecker-server:v2.7.0
    ports:
      - "8000:8000"   # HTTP API and UI
      - "9000:9000"   # gRPC for agents
    volumes:
      - woodpecker-data:/var/lib/woodpecker/
    environment:
      - WOODPECKER_HOST=https://ci.example.com
      - WOODPECKER_GITEA=true
      - WOODPECKER_GITEA_URL=https://git.example.com
      - WOODPECKER_GITEA_CLIENT=your-oauth-client-id
      - WOODPECKER_GITEA_SECRET=your-oauth-secret
      - WOODPECKER_AGENT_SECRET=generate-a-strong-random-string-here
      - WOODPECKER_DATABASE_DRIVER=postgres
      - WOODPECKER_DATABASE_DATASOURCE=postgres://user:pass@db:5432/woodpecker?sslmode=disable

  woodpecker-agent:
    image: woodpeckerci/woodpecker-agent:v2.7.0
    command: --server woodpecker-server:9000
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - WOODPECKER_SERVER=woodpecker-server:9000
      - WOODPECKER_AGENT_SECRET=generate-a-strong-random-string-here
      - WOODPECKER_MAX_PROCS=4
    depends_on:
      - woodpecker-server

volumes:
  woodpecker-data:

Critical security configuration notes

A common mistake in self-hosted CI setups is leaving the agent secret weak or exposing the Docker socket unnecessarily. Always generate a cryptographically strong WOODPECKER_AGENT_SECRET; this token authenticates agents to the server. If compromised, an attacker could inject malicious pipelines. For Kubernetes deployments, avoid mounting the Docker socket entirely; use the native Kubernetes backend instead to maintain pod-level isolation. Refer to Ubuntu security hardening best practices if hosting agents on bare metal VMs.

Git ProviderWP ServerWP AgentDocker/K8sWebhookAssign TaskCreate Pod/CtrPipeline Steps (Ephemeral Containers)Clone Repowoodpeckerci/plugin-gitTest & Lintnode:20-alpineBuild Imageplugins/dockerDeployalpine/helm
Pipeline execution flow in Woodpecker CI: Lightweight Self-Hosted CI from webhook trigger through ephemeral container steps

How does Woodpecker CI compare to Drone and Jenkins?

Choosing the right tool requires understanding trade-offs. Woodpecker forked from Drone CI in 2021 after Drone's acquisition introduced licensing changes that restricted certain self-hosted use cases. While Jenkins remains the industry veteran, its JVM-based architecture and plugin complexity make it heavy for modern container workflows. Woodpecker occupies a specific niche: true open-source, container-first simplicity.

FeatureWoodpecker CIDrone CIJenkins
LicenseApache 2.0 (Fully Open)Harness License (Restricted)MIT (Open Core)
ArchitectureGo Binary / Container NativeGo Binary / Container NativeJVM / Plugin Heavy
Config FormatYAML (.woodpecker.yml)YAML (.drone.yml)Groovy / Declarative YAML
Resource OverheadLow (~50MB RAM idle)Low (~50MB RAM idle)High (1GB+ RAM baseline)
Kubernetes SupportNative BackendNative BackendVia Kubernetes Plugin
Community MomentumActive (2026 Growth)Stagnant / Enterprise FocusMature / Legacy

In practice, if you are starting fresh in 2026 and want a CI/CD solution for small teams, Woodpecker’s lower maintenance burden wins. Jenkins still makes sense if you have complex legacy integrations or require non-container build steps that cannot be easily containerized. Drone users should evaluate migration to Woodpecker if licensing restrictions become a blocker; the YAML syntax is nearly identical, making migration typically a find-and-replace operation.

What are the best practices for securing Woodpecker CI pipelines?

Self-hosting gives you control, but it also transfers security responsibility to you. After auditing numerous CI systems for SOC 2 compliance, I’ve found that most breaches stem from misconfigured secrets or overly permissive agents. Treat your CI infrastructure with the same rigor as production application servers.

  • Never hardcode secrets: Use Woodpecker’s built-in secrets manager or integrate with HashiCorp Vault. Secrets should be scoped to specific repositories and events (e.g., only available on push, not pull_request).
  • Isolate untrusted builds: If you accept external contributions, run fork PRs on dedicated agents with no access to deployment credentials or internal networks. Use agent labels like trust: untrusted to route these safely.
  • Pin plugin versions: Avoid using latest tags in pipeline steps. Always pin to specific SHA256 digests or semantic versions to prevent supply chain attacks via compromised upstream images.
  • Enable audit logging: Configure structured logging and forward agent/server logs to your observability stack. Understanding structured logging best practices helps trace exactly who triggered what and when.
  • Restrict Docker socket access: On Linux agents, consider using rootless Docker or Podman to reduce the blast radius if a build container escapes isolation.
Defense-in-Depth for Self-Hosted CINetwork Layer• Private Agent Network• Firewall Egress Rules• mTLS Server-AgentSecret Management• Scoped Per-Repo• Event-Based Filtering• External Vault IntegrationRuntime Isolation• Ephemeral Containers• Rootless Execution• Pinned Image DigestsAudit & Compliance EvidenceImmutable Build Logs • Signed Artifacts • SBOM Generation • Access Control ReviewsAutomated Evidence Collection for SOC 2 / ISO 27001 Audits
Security defense layers for Woodpecker CI: Lightweight Self-Hosted CI covering network, secrets, runtime, and audit compliance

When should you choose Woodpecker CI over other options?

Woodpecker excels when you need predictable performance without cloud bills scaling linearly with commit frequency. It is ideal for organizations with existing on-premise hardware, edge deployments, or strict data residency requirements where code cannot leave a specific jurisdiction. In Nepal, where international bandwidth can be expensive and latency-sensitive, running Woodpecker locally eliminates round-trips to US/EU SaaS endpoints entirely.

However, it is not a universal replacement. If your team lacks container expertise or needs deep integration with proprietary enterprise tools (like mainframe testing), Jenkins or Azure DevOps may still be more pragmatic. Woodpecker assumes comfort with containers as the fundamental unit of work. Evaluate your team’s maturity honestly before migrating. For those ready to adopt it, start with a single agent on existing infrastructure, validate the workflow, then scale horizontally as demand grows.

Next steps for adopting Woodpecker CI

Adopting Woodpecker CI: Lightweight Self-Hosted CI is a strategic move toward infrastructure sovereignty and cost predictability. Begin by deploying a test instance alongside your current CI system, migrate one low-risk repository, and measure the difference in feedback loop time and operational overhead. Ensure your monitoring covers agent health and queue depth from day one. If you need help designing a secure, compliant CI architecture tailored to your environment, reach out to discuss your DevOps infrastructure needs.

Frequently Asked Questions

Woodpecker CI is a lightweight, self-hosted continuous integration server forked from Drone. It uses container-native pipelines defined in YAML. Teams choose it over Jenkins for its minimal resource footprint, simpler configuration, and native Docker/Podman support without heavy plugin management overhead.

The server component runs comfortably on 512MB RAM for small teams. Agents require at least 1GB depending on concurrent pipeline load. This low requirement makes it ideal for cheap VPS instances or edge deployments where Jenkins would struggle.

Yes, Woodpecker includes a native Kubernetes backend. Pipelines run as pods using your existing cluster resources. Configuration requires setting WOODPECKER_BACKEND=k8s and providing valid kubeconfig credentials for the target namespace where build jobs execute.

Yes, completely free.

Rename .drone.yml to .woodpecker.yml and update webhook URLs. Most syntax remains compatible, but verify secret references and plugin names against current documentation. Test thoroughly as some community plugins changed maintainers during the project fork.

Yes, fully supported.

Store secrets via the web UI or CLI using woodpecker-cli secret add. Secrets are encrypted at rest and only injected into containers at runtime. Never commit credentials to YAML files. Use organization-level secrets for shared access across repositories.

Woodpecker supports SQLite, PostgreSQL, and MySQL. SQLite works for single-server setups with low concurrency. Production deployments should use PostgreSQL or MySQL for reliability. Configure via WOODPECKER_DATABASE_DRIVER and connection string environment variables during initial server setup.

Pending usually means no available agent matches the pipeline labels. Check agent connectivity via woodpecker-cli info, verify label matching between pipeline and agent configuration, and ensure the agent process is running. Resource exhaustion or misconfigured filters also cause this.

Woodpecker offers mature multi-backend support including Docker, Kubernetes, and local execution. Gitea Actions focuses on GitHub Actions compatibility. Choose Woodpecker for infrastructure flexibility and established plugin ecosystem. Choose Gitea Actions if you need drop-in GitHub workflow compatibility within Gitea.

Yes, official images support amd64 and arm64. Deploy agents on Raspberry Pi or AWS Graviton instances by pulling the correct platform tag. Ensure your build containers also provide ARM variants, as cross-compilation adds complexity to pipeline definitions.

Woodpecker auto-creates webhooks when you activate a repository through the UI if your forge token has write permissions. For GitLab or Forgejo, verify the token scope includes api or write_repository. Manual webhook creation is only needed for restricted permission setups.

Use structured JSON logging with WOODPECKER_LOG_LEVEL=info. Forward logs to Loki, Elasticsearch, or CloudWatch via container log drivers. Avoid file-based logging in ephemeral environments. Enable request tracing with WOODPECKER_GRPC_DEBUG=true only during troubleshooting to prevent performance degradation.

Set WOODPECKER_LIMIT_REPOS_CONCURRENTLY in agent configuration or use pipeline-level concurrency groups. This prevents resource starvation when multiple commits trigger builds simultaneously. Queue management ensures fair scheduling across teams sharing limited self-hosted infrastructure without requiring external orchestration tools.

Yes, define matrix dimensions in your YAML under matrix key. Woodpecker generates parallel pipeline steps for each combination. Useful for testing across multiple language versions or operating systems. Monitor agent capacity as matrix expansion multiplies concurrent container resource consumption significantly.