[{"data":1,"prerenderedAt":183},["ShallowReactive",2],{"seo-verification":3,"blog-self-host-jenkins-ci-cd-server-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-self-host-jenkins-ci-cd-server-vps-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":27,"featuredImage":29,"bgImage":30,"posterImage":31,"relatedSolution":32,"intro":35,"sections":36,"ctaTitle":120,"ctaBody":121,"ctaButton":122,"ctaUrl":123,"relatedPosts":124},515,"self-host-jenkins-ci-cd-server-vps",{"fr":12,"en":10,"ar":13,"es":14},"self-host-jenkins-vps","استضافة-jenkins-على-vps-خادم-ci-cd","autoalojar-jenkins-servidor-ci-cd-vps","Jenkins on a VPS: your open-source CI\u002FCD server with Docker","Install Jenkins LTS on a VPS with Docker Compose: Jenkinsfile pipelines, Git webhooks, HTTPS behind nginx and build agents isolated from the controller.",7,0,false,"2026-10-28T00:00:00+00:00","2026-10-28T05:34:10+00:00",{"id":17,"name":23,"slug":24,"color":25,"icon":26},"Self-hosting","self-hosting","bg-indigo-500\u002F10 text-indigo-400","cloud",[28],{"id":17,"name":23,"slug":24,"color":25,"icon":26},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fself-host-jenkins-vps-poster.svg",{"categorySlug":33,"appSlug":34},"development","jenkins","The build minutes billed by hosted CI services eventually add up, and your deployment secrets live with a third party. Jenkins, the open-source automation server under the MIT licence, does the same work on your own server: it pulls the code on every push, runs the build and the tests, then deploys. This guide installs Jenkins LTS with Docker Compose on a VPS, publishes it over HTTPS behind nginx, writes a first pipeline and sets the security rules that matter.",[37,41,51,82,85,101,105,108,111,114,117],{"type":38,"title":39,"body":40},"h2","Why host your CI\u002FCD with Jenkins","A hosted CI is convenient until builds multiply: every minute beyond the quota is billed, large projects wait their turn, and the deployment keys of your servers are stored at the provider. Jenkins reverses this model. It runs on your VPS, executes as many builds as your machines allow and keeps your credentials encrypted at home.\n\nIt is also the tool most teams already know: a Jenkinsfile reads without training, documentation is plentiful, and almost every tool on the market has its Jenkins plugin.",{"type":42,"title":43,"items":44},"ul","What Jenkins brings",[45,46,47,48,49,50],"**Pipelines as code** — a Jenkinsfile versioned with the project describes every stage, reviewed in code review like the rest.","**Git webhooks** — GitHub, GitLab, Gitea or Forgejo trigger the build on every push or pull request.","**Multibranch** — every branch and every pull request gets its own pipeline, created automatically.","**Build agents** — builds run on dedicated machines, connected over SSH.","**Over 2,000 plugins** — Docker, Kubernetes, SonarQube, Slack, JUnit test reports.","**Encrypted credentials** — SSH keys and tokens injected into the pipeline, masked in the logs.",{"type":52,"title":53,"headers":54,"rows":58},"comparison","Jenkins versus other self-hosted CI tools",[5,55,56,57],"Jenkins","Woodpecker CI","OneDev",[59,63,68,72,77],[60,61,62,61],"Licence","MIT","Apache-2.0",[64,65,66,67],"Pipeline definition","Jenkinsfile (Groovy)","YAML","YAML or visual editor",[69,70,70,71],"Built-in Git forge","No, plugs into yours","Yes",[73,74,75,76],"Plugin ecosystem","Over 2,000 plugins","Plugins as Docker images","Built-in features",[78,79,80,81],"Best for","Complex pipelines, existing teams","Simple container pipelines","Small team wanting all-in-one",{"type":38,"title":83,"body":84},"Prerequisites","An Ubuntu 24.04 VPS with 2 GB of RAM and 2 vCPUs is enough for the controller; plan 4 GB if your builds run on the same machine. You need Docker and the Compose plugin, a domain name (or a subdomain) pointing to the VPS, and nginx with a TLS certificate to publish it over HTTPS. Jenkins must answer on a stable HTTPS address: it is the one your repositories call for webhooks.",{"type":86,"title":87,"steps":88},"steps","Install Jenkins with Docker Compose",[89,92,95,98],{"title":90,"body":91},"Create the Compose file","This `docker-compose.yml` starts Jenkins LTS on Java 21. The port is only published on the loopback interface: only nginx reaches it. All data (jobs, plugins, credentials, history) lives in the `jenkins-home` volume. Port 50000 for inbound agents is not published: agents connect over SSH.\n```yaml\nservices:\n  jenkins:\n    image: jenkins\u002Fjenkins:2.580.1-lts-jdk21\n    restart: unless-stopped\n    ports:\n      - \"127.0.0.1:8104:8080\"\n    environment:\n      JAVA_OPTS: -Djava.awt.headless=true\n    volumes:\n      - jenkins-home:\u002Fvar\u002Fjenkins_home\n    healthcheck:\n      test: [\"CMD-SHELL\", \"curl -fsS -o \u002Fdev\u002Fnull http:\u002F\u002Flocalhost:8080\u002Flogin || exit 1\"]\n      interval: 15s\n      retries: 10\n      start_period: 60s\nvolumes:\n  jenkins-home: {}\n```",{"title":93,"body":94},"Start the container","Put the file in `\u002Fopt\u002Fjenkins`, then start the stack. The first start takes about thirty seconds; `docker compose ps` must show the `healthy` state.\n```bash\nmkdir -p \u002Fopt\u002Fjenkins && cd \u002Fopt\u002Fjenkins\ndocker compose up -d\ndocker compose ps\n```",{"title":96,"body":97},"Publish Jenkins over HTTPS behind nginx","In the `server` block of your domain, forward the `X-Forwarded-*` headers: without them, Jenkins generates HTTP links and reports a broken reverse proxy.\n```nginx\nlocation \u002F {\n    proxy_pass http:\u002F\u002F127.0.0.1:8104;\n    proxy_set_header Host $host;\n    proxy_set_header X-Real-IP $remote_addr;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header X-Forwarded-Proto $scheme;\n    proxy_set_header X-Forwarded-Port 443;\n}\n```",{"title":99,"body":100},"Unlock Jenkins","Open `https:\u002F\u002Fyour-domain`. Jenkins asks for the initial password written to its data volume:\n```bash\ndocker compose exec jenkins cat \u002Fvar\u002Fjenkins_home\u002Fsecrets\u002FinitialAdminPassword\n```\nThen install the suggested plugins, create your administrator account and confirm the instance's HTTPS URL.",{"type":102,"title":103,"body":104},"tip","Do not run builds on the controller","The Jenkins controller holds all your credentials. A build running on it can read them. In Manage Jenkins, set the number of executors of the built-in node to 0 and connect at least one agent over SSH. For the same reason, do not mount the VPS's Docker socket into the Jenkins container: it would give any build root access to the server.",{"type":38,"title":106,"body":107},"Write a first pipeline","Create a \"Multibranch Pipeline\" pointing to your repository, then add a `Jenkinsfile` at the root. This example builds and tests every branch, and only deploys the `main` branch, on an agent labelled `linux`:\n```groovy\npipeline {\n    agent { label 'linux' }\n    stages {\n        stage('Build') { steps { sh 'make build' } }\n        stage('Test')  { steps { sh 'make test' } }\n        stage('Deploy') {\n            when { branch 'main' }\n            steps { sh '.\u002Fdeploy.sh' }\n        }\n    }\n}\n```\nFinally, add a webhook in your repository to `https:\u002F\u002Fyour-domain\u002Fgithub-webhook\u002F` for GitHub, or to the URL given by your forge's plugin. Every push then triggers a build.",{"type":38,"title":109,"body":110},"Credentials and build agents","SSH keys, API tokens and deployment passwords go into Manage Jenkins, Credentials. Jenkins stores them encrypted in its volume and only injects them into a build when a step asks for them, with `withCredentials` or the `environment` directive of a Jenkinsfile; their value is masked in the logs. Give each credential the narrowest possible scope: one deployment key per target server, a read-only token to clone repositories.\n\nFor agents, the simplest option is a second VPS with Java and Docker installed. In Manage Jenkins, Nodes, add a permanent node with the \"via SSH\" launch method, the VPS address and an SSH key saved as a credential. Give it a label, for example `linux`, and target it in your pipelines. The controller then only orchestrates, and a compromised build never reaches your other secrets.",{"type":38,"title":112,"body":113},"Back up and update Jenkins","The whole state of Jenkins lives in the `jenkins-home` volume: jobs, configuration, plugins, encrypted credentials and build history. An archive of this volume is enough to restore everything. Stop Jenkins during the copy to get a consistent archive:\n```bash\ncd \u002Fopt\u002Fjenkins\ndocker compose stop jenkins\ndocker run --rm -v jenkins_jenkins-home:\u002Fdata -v \\\"$PWD\\\":\u002Fbackup alpine tar czf \u002Fbackup\u002Fjenkins-home.tar.gz -C \u002Fdata .\ndocker compose start jenkins\n```\nTo update, follow the LTS line, released roughly every twelve weeks with intermediate fixes: replace the image tag in `docker-compose.yml`, then run `docker compose pull` and `docker compose up -d`. Then update the plugins from Manage Jenkins, Plugins, and read the security advisories published by the project: most fixed vulnerabilities concern plugins, not the core.",{"type":38,"title":115,"body":116},"Troubleshooting","**\"It appears that your reverse proxy set up is broken\"**: nginx does not forward `X-Forwarded-Proto` or the Jenkins URL is not HTTPS. Fix the `location` block, then the URL in Manage Jenkins, System.\n\n**The container keeps restarting**: read the logs. The most frequent cause is a lack of memory; give the VPS at least 2 GB of RAM.\n```bash\ndocker compose logs --tail=100 jenkins\n```\n**Webhooks do not arrive**: check the webhook's delivery history in the repository, then that the address called is the public HTTPS URL of Jenkins.",{"type":38,"title":118,"body":119},"One-click install from the ServOrbit Marketplace","On a ServOrbit VPS, Jenkins installs from the Marketplace: choose the address, click Install, and the script deploys Jenkins LTS in Docker, with its data volume and the nginx reverse proxy over HTTPS. The initial administrator password is shown in your client area. No domain? The VPS's free subdomain is enough, HTTPS included.","Your Jenkins CI\u002FCD server, on your own VPS","A ServOrbit Ubuntu 24.04 VPS with 2 GB of RAM is enough to start Jenkins. One-click install from the Marketplace, HTTPS on your domain or on the VPS's free subdomain, with no build-minute quota.","Install Jenkins","\u002Fmarketplace\u002Fdevelopment\u002Fjenkins",[125,143,164],{"id":126,"slug":127,"slugs":128,"title":132,"excerpt":133,"readTime":134,"views":18,"isPinned":19,"publishedAt":135,"updatedAt":136,"category":137,"categories":138,"featuredImage":29,"bgImage":30,"posterImage":140,"relatedSolution":141},74,"host-gitea-on-your-own-vps",{"fr":129,"en":127,"ar":130,"es":131},"heberger-gitea","استضافة-gitea-على-خادم-vps-الخاص-بك","alojar-gitea-en-un-vps","Host Gitea on your own VPS in 2026","Deploy Gitea 1.25 on a VPS with Docker and SSL. Full guide: Gitea Actions CI\u002FCD, Gitea vs Forgejo v16 comparison, daily administration, SSH and HTTPS troubleshooting.",13,"2026-04-07T00:00:00+00:00","2026-10-21T15:21:37+00:00",{"id":17,"name":23,"slug":24,"color":25,"icon":26},[139],{"id":17,"name":23,"slug":24,"color":25,"icon":26},"\u002Fblog\u002Fcovers\u002Fheberger-gitea-poster.svg",{"categorySlug":33,"appSlug":142},"gitea",{"id":144,"slug":145,"slugs":146,"title":150,"excerpt":151,"readTime":152,"views":153,"isPinned":19,"publishedAt":154,"updatedAt":155,"category":156,"categories":161,"featuredImage":29,"bgImage":30,"posterImage":163,"relatedSolution":29},338,"replace-github-actions-with-woodpecker-ci-on-a-vps",{"fr":147,"en":145,"ar":148,"es":149},"remplacer-github-actions-woodpecker-ci-self-hosted-vps","استبدال-github-actions-بـwoodpecker-ci-على-vps","reemplazar-github-actions-con-woodpecker-ci-en-vps","Replace GitHub Actions with Woodpecker CI on a VPS","GitHub announced then suspended billing for self-hosted runners on private repos. Switch to Woodpecker CI: clean syntax, under 50 MB RAM, fixed cost on your VPS.",8,1,"2026-09-07T00:00:00+00:00","2026-10-20T23:18:05+00:00",{"id":157,"name":158,"slug":159,"color":160,"icon":159},2,"Automation","automatisation","bg-brand-action\u002F10 text-brand-action",[162],{"id":157,"name":158,"slug":159,"color":160,"icon":159},"\u002Fblog\u002Fcovers\u002Fremplacer-github-actions-woodpecker-ci-self-hosted-vps-poster.svg",{"id":165,"slug":166,"slugs":167,"title":171,"excerpt":172,"readTime":173,"views":174,"isPinned":19,"publishedAt":175,"updatedAt":176,"category":177,"categories":178,"featuredImage":29,"bgImage":30,"posterImage":180,"relatedSolution":181},311,"self-host-onedev-git-cicd-and-kanban-in-one-container",{"fr":168,"en":166,"ar":169,"es":170},"heberger-onedev-vps","onedev-على-vps-git-وcicd-وkanban-في-حاوية-واحدة","onedev-en-vps-git-cicd-y-kanban-autoalojados","Self-Host OneDev: Git, CI\u002FCD and Kanban in One Container","Deploy OneDev on your VPS: private Git forge, visual CI\u002FCD pipelines and Kanban boards. One container, no per-developer billing.",6,3,"2026-08-28T00:00:00+00:00","2026-09-07T11:26:10+00:00",{"id":17,"name":23,"slug":24,"color":25,"icon":26},[179],{"id":17,"name":23,"slug":24,"color":25,"icon":26},"\u002Fblog\u002Fcovers\u002Fheberger-onedev-vps-poster.svg",{"categorySlug":33,"appSlug":182},"onedev",1793166156868]