BLOG POSTS
    MangoHost Blog / Self-Hosted CI: Install and Run Woodpecker CI on Your VPS
Self-Hosted CI: Install and Run Woodpecker CI on Your VPS

Self-Hosted CI: Install and Run Woodpecker CI on Your VPS

Why Self-Hosted CI Matters (And Why You Should Care)

Let’s be honest: if you’re reading this, you’re probably tired of the limitations, costs, or privacy concerns of cloud-based CI/CD services. Maybe you’ve hit the free tier wall on GitHub Actions, or you’re just not comfortable with your code and secrets living on someone else’s servers. Or maybe you just want to nerd out and have total control over your build pipelines. Whatever your reason, self-hosted CI is the answer—and Woodpecker CI is one of the coolest, lightest, and most flexible solutions out there.

In this post, I’ll walk you through the why, how, and what of running Woodpecker CI on your own VPS or dedicated server. We’ll cover:

  • What makes Woodpecker CI tick (and how it compares to the competition)
  • How to get it up and running fast (with Docker or natively)
  • Real-world gotchas, beginner mistakes, and how to avoid them
  • Creative use cases and automation magic you can unlock

Ready to take back control of your CI/CD? Let’s dive in!

The Problem: Cloud CI is Great… Until It Isn’t

Cloud-based CI/CD services like GitHub Actions, GitLab CI, and CircleCI are awesome for getting started. But as your projects grow, you’ll probably run into at least one of these headaches:

  • Usage limits (minutes, builds, concurrency, storage)
  • Pricing that scales up fast as your team or repo count grows
  • Privacy and compliance concerns (who has access to your code and secrets?)
  • Performance issues (shared runners, cold starts, slow queues)
  • Vendor lock-in (proprietary config, hard to migrate away)

Self-hosted CI/CD flips the script: you control the hardware, the data, and the rules. You can run as many builds as your server can handle, integrate with anything, and keep your secrets… well, secret.

Meet Woodpecker CI: The Lightweight, Open-Source CI/CD You’ll Actually Enjoy

Woodpecker CI is an open-source, self-hosted CI/CD system that’s simple, fast, and built for hackers. It’s a fork of Drone CI (before it went closed-source), but with a more active community and a modern, plugin-friendly design.

Why Woodpecker?

  • Lightweight: Runs on a Raspberry Pi or a beefy server—your call
  • Docker-native: Pipelines run in containers, so your builds are reproducible and isolated
  • Easy integration: Works with GitHub, Gitea, GitLab, Bitbucket, and more
  • Simple YAML config: If you’ve used GitHub Actions or Drone, you’ll feel right at home
  • Extensible: Tons of plugins, or write your own in any language
  • No vendor lock-in: Your server, your rules, your data

Let’s break down how it works and how to get it running on your own VPS.

How Does Woodpecker CI Work?

High-Level Structure

  • Woodpecker Server: The brain. Handles web UI, API, and coordinates builds.
  • Woodpecker Agent(s): The muscle. Executes your pipelines (can be on the same machine or distributed).
  • Source Control Integration: Connects to your GitHub, Gitea, GitLab, etc. to trigger builds on push/PR.
  • Pipeline Config: You define your build steps in a .woodpecker.yml file in your repo.

Here’s a simple diagram:

[Git Repo] --push/PR--> [Woodpecker Server] --dispatch--> [Woodpecker Agent(s)] --run--> [Docker Containers]

Algorithm/Workflow

  1. You push code to your repo (GitHub, Gitea, etc.)
  2. The Woodpecker server receives a webhook and checks for .woodpecker.yml
  3. Server queues the build and assigns it to an available agent
  4. Agent spins up Docker containers as defined in your pipeline
  5. Build runs, logs are streamed back to the server UI
  6. Results are reported (pass/fail, artifacts, notifications, etc.)

How To Set Up Woodpecker CI on Your VPS (The Quick & Dirty Guide)

Assuming you have a VPS (if not, get one here) or a dedicated server (order here), here’s how to get going fast:

Step 1: Prep Your Server

  • Ubuntu 22.04+ or Debian 11+ recommended (but anything with Docker works)
  • At least 1GB RAM, 1 vCPU (more = faster builds)
  • Root or sudo access
# Update and install Docker
sudo apt update
sudo apt install -y docker.io docker-compose
sudo systemctl enable --now docker

Step 2: Choose Your Git Provider

  • GitHub, Gitea, GitLab, Bitbucket, or even self-hosted Gitea/GitLab
  • You’ll need to create an OAuth app or token for Woodpecker to connect

For example, with Gitea:

  1. Go to Gitea > Settings > Applications > New OAuth2 Application
  2. Set redirect URI to http://your-vps-ip:8000/authorize
  3. Note the Client ID and Secret

Step 3: Fire Up Woodpecker (Docker-Compose Example)

Create a docker-compose.yml:

version: '3'

services:
  woodpecker-server:
    image: woodpeckerci/woodpecker-server:latest
    restart: always
    ports:
      - "8000:8000"
    environment:
      - WOODPECKER_OPEN=true
      - WOODPECKER_HOST=http://your-vps-ip:8000
      - WOODPECKER_GITEA=true
      - WOODPECKER_GITEA_CLIENT=your-client-id
      - WOODPECKER_GITEA_SECRET=your-client-secret
      - WOODPECKER_GITEA_URL=https://your-gitea-instance
      - WOODPECKER_ADMIN=your-gitea-username
      - WOODPECKER_AGENT_SECRET=supersecretstring
    volumes:
      - woodpecker-server-data:/var/lib/woodpecker

  woodpecker-agent:
    image: woodpeckerci/woodpecker-agent:latest
    restart: always
    depends_on:
      - woodpecker-server
    environment:
      - WOODPECKER_SERVER=woodpecker-server:9000
      - WOODPECKER_AGENT_SECRET=supersecretstring
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

volumes:
  woodpecker-server-data:

Then run:

docker-compose up -d

Visit http://your-vps-ip:8000 and log in with your Git provider. Enable your repo, add a .woodpecker.yml file, and you’re off to the races!

Step 4: Add Your First Pipeline

Here’s a basic .woodpecker.yml for a Node.js project:

pipeline:
  build:
    image: node:18
    commands:
      - npm install
      - npm test

Commit and push—Woodpecker will pick it up and run your build in a Docker container. 🎉

Comparison: Woodpecker vs. Other Self-Hosted CI/CD

Feature Woodpecker CI Jenkins Drone CI GitLab CI (Self-Hosted)
Setup Time 5-15 min 30-60 min 10-20 min 30-60 min
Resource Usage Low Medium-High Low Medium
UI/UX Modern, simple Old-school, complex Modern, simple Modern, but heavy
Plugin Ecosystem Growing, Docker-based Huge, but Java-centric Good, Docker-based Good, but tightly coupled
Docker Native Yes Via plugins Yes Yes
Best For Modern, containerized projects Legacy, enterprise, plugins Similar to Woodpecker, but less open GitLab-centric teams

Beginner Mistakes & Common Myths

  • Myth: “Self-hosted CI is only for big teams.”
    Reality: Even solo devs can benefit—especially for private projects or learning!
  • Mistake: Not securing your server (open ports, weak secrets)
    Advice: Always use strong secrets, firewall your server, and use HTTPS.
  • Mistake: Running builds as root inside containers
    Advice: Use non-root users in your Docker images for better security.
  • Myth: “It’s hard to maintain.”
    Reality: With Docker, updates are as easy as docker-compose pull && docker-compose up -d.
  • Mistake: Not backing up your Woodpecker data
    Advice: Mount a volume for server data and back it up regularly.

Real-World Examples: The Good, The Bad, The Geeky

Case 1: Small Team, Big Savings

  • 3 devs, 10 private repos, lots of builds
  • Cloud CI cost: $40/month
  • VPS cost: $6/month (get one)
  • Result: Same features, 85% cost savings, faster builds

Case 2: Open Source Project, Community PRs

  • Needed public CI for PRs, but didn’t want to pay for private runners
  • Woodpecker + Gitea = free, fast, open-source friendly
  • Bonus: Can run ARM builds for Raspberry Pi users

Case 3: The “Oops” Moment

  • Forgot to set WOODPECKER_AGENT_SECRET the same on server and agent
  • Agents failed to connect, builds stuck in queue
  • Lesson: Double-check your secrets and logs!

Creative and Non-Standard Usage

  • Automate Everything: Use Woodpecker to run any script—backups, deployments, even home automation tasks.
  • Distributed Builds: Run agents on multiple servers (even different OS/arch) for parallel builds or cross-compilation.
  • Self-Testing Infrastructure: Use Woodpecker to test your own Docker images or Ansible playbooks.
  • Trigger External Events: Use plugins or webhooks to deploy to Kubernetes, send Slack notifications, or update a status page.
  • Ephemeral Runners: Spin up agents on-demand in the cloud for heavy builds, then shut them down to save cost.

Statistics: Why Woodpecker Is Gaining Traction

  • Over 6,000 stars on GitHub (see here)
  • Active development, regular releases, and a friendly community
  • Used by open-source projects, startups, and indie hackers worldwide
  • Minimal resource usage: runs on a $5/month VPS with ease

Similar Solutions & Alternatives

What New Opportunities Does Self-Hosted CI Unlock?

  • Unlimited builds (no more worrying about minutes or quotas)
  • Custom hardware (run on ARM, GPU, or even a cluster of Raspberry Pis)
  • Full control over secrets, environment, and integrations
  • Integrate with anything (IoT, home lab, private cloud, etc.)
  • Automate your life (not just code—think backups, notifications, even smart home tasks!)

Conclusion: Should You Self-Host Woodpecker CI?

If you want:

  • More control over your CI/CD pipelines
  • Lower costs (especially for private or frequent builds)
  • Better privacy and security
  • Freedom to hack, customize, and automate anything

…then Woodpecker CI on your own VPS or dedicated server is a no-brainer. It’s easy to set up, fun to use, and opens up a world of automation possibilities. Whether you’re a solo dev, a small team, or running an open-source project, you’ll love the flexibility and power it brings.

Ready to try it? Grab a VPS or dedicated server, follow the steps above, and start building your own CI/CD kingdom. Happy hacking!

Official links:



This article incorporates information and material from various online sources. We acknowledge and appreciate the work of all original authors, publishers, and websites. While every effort has been made to appropriately credit the source material, any unintentional oversight or omission does not constitute a copyright infringement. All trademarks, logos, and images mentioned are the property of their respective owners. If you believe that any content used in this article infringes upon your copyright, please contact us immediately for review and prompt action.

This article is intended for informational and educational purposes only and does not infringe on the rights of the copyright owners. If any copyrighted material has been used without proper credit or in violation of copyright laws, it is unintentional and we will rectify it promptly upon notification. Please note that the republishing, redistribution, or reproduction of part or all of the contents in any form is prohibited without express written permission from the author and website owner. For permissions or further inquiries, please contact us.

Leave a reply

Your email address will not be published. Required fields are marked