{"id":452,"date":"2026-06-18T08:44:39","date_gmt":"2026-06-18T08:44:39","guid":{"rendered":"https:\/\/virtualserversvps.com\/blog\/?p=452"},"modified":"2026-06-18T08:44:39","modified_gmt":"2026-06-18T08:44:39","slug":"setup-vps-development-server-git-docker-cicd-pipeline","status":"publish","type":"post","link":"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/","title":{"rendered":"How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">A VPS is more than just a web host \u2014 it&#8217;s an excellent platform for a personal development server where you can code, test, and deploy applications. This step-by-step tutorial walks you through setting up a complete development environment on a fresh Ubuntu 24.04 VPS, including Git server configuration, Docker containerization, and a CI\/CD pipeline using GitHub Actions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>A VPS running Ubuntu 24.04 LTS (provision one from <a href=\"https:\/\/virtualserversvps.com\/\">Virtual Servers VPS<\/a> \u2014 any plan with 2 GB RAM or more)<\/li><li>SSH access with a sudo-enabled user<\/li><li>A domain name pointing to your VPS IP (optional but recommended)<\/li><li>GitHub account for CI\/CD integration<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Initial Server Hardening<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before installing anything, secure your server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Update system\nsudo apt update &amp;&amp; sudo apt upgrade -y\n\n# Install essential tools\nsudo apt install -y curl wget git ufw fail2ban\n\n# Configure firewall\nsudo ufw allow OpenSSH\nsudo ufw allow 80\/tcp\nsudo ufw allow 443\/tcp\nsudo ufw --force enable\n\n# Enable fail2ban for SSH protection\nsudo systemctl enable fail2ban\nsudo systemctl start fail2ban<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Install Docker and Docker Compose<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Docker lets you run applications in isolated containers, making dependency management trivial.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Install Docker using the official convenience script\ncurl -fsSL https:\/\/get.docker.com -o get-docker.sh\nsudo sh get-docker.sh\n\n# Add your user to the docker group (no sudo needed for docker commands)\nsudo usermod -aG docker $USER\n\n# Log out and back in, or run:\nnewgrp docker\n\n# Install Docker Compose plugin\nsudo apt install -y docker-compose-plugin\n\n# Verify installation\ndocker --version\ndocker compose version<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Set Up Git Server with Gitea<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Gitea is a lightweight, self-hosted Git service that runs perfectly on a VPS. It&#8217;s a great alternative to GitHub for private repositories.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Create a directory for Gitea\nmkdir -p ~\/gitea\ncd ~\/gitea\n\n# Create docker-compose.yml\ncat &lt;&lt; 'EOF' &gt; docker-compose.yml\nversion: \"3\"\nservices:\n  gitea:\n    image: gitea\/gitea:latest\n    container_name: gitea\n    environment:\n      - USER_UID=1000\n      - USER_GID=1000\n      - GITEA__server__DOMAIN=git.yourdomain.com\n      - GITEA__server__ROOT_URL=https:\/\/git.yourdomain.com\n    volumes:\n      - .\/data:\/data\n      - \/etc\/timezone:\/etc\/timezone:ro\n      - \/etc\/localtime:\/etc\/localtime:ro\n    ports:\n      - \"3000:3000\"\n      - \"2222:22\"\n    restart: unless-stopped\nEOF\n\n# Start Gitea\ndocker compose up -d<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Access Gitea at <code>http:\/\/your-vps-ip:3000<\/code>. Configure a reverse proxy with Nginx and Let&#8217;s Encrypt for HTTPS. See the <a href=\"https:\/\/virtualserversvps.com\/\">VPS guides section<\/a> for Nginx reverse proxy setup instructions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Set Up a CI\/CD Pipeline with GitHub Actions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Connect your VPS to GitHub Actions for automated deployments. First, set up a deployment user on your VPS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Create a deploy user\nsudo adduser --disabled-password deploy\nsudo usermod -aG docker deploy\n\n# Generate SSH key for the deploy user\nsudo -u deploy ssh-keygen -t ed25519 -f \/home\/deploy\/.ssh\/id_ed25519 -N \"\"\n\n# Add the public key to authorized_keys\nsudo -u deploy sh -c 'cat \/home\/deploy\/.ssh\/id_ed25519.pub &gt;&gt; \/home\/deploy\/.ssh\/authorized_keys'\n\n# Display the private key (add to GitHub Secrets)\nsudo cat \/home\/deploy\/.ssh\/id_ed25519<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now create a GitHub Actions workflow in your repository (<code>.github\/workflows\/deploy.yml<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>name: Deploy to VPS\non:\n  push:\n    branches: [ main ]\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\/checkout@v4\n\n      - name: Build Docker image\n        run: docker build -t my-app:latest .\n\n      - name: Deploy to VPS\n        uses: appleboy\/ssh-action@v1.0.3\n        with:\n          host: ${{ secrets.VPS_HOST }}\n          username: deploy\n          key: ${{ secrets.VPS_SSH_KEY }}\n          script: |\n            cd \/opt\/my-app\n            git pull origin main\n            docker compose pull\n            docker compose up -d --build<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add your VPS IP and SSH private key as secrets (<code>VPS_HOST<\/code> and <code>VPS_SSH_KEY<\/code>) in your GitHub repository settings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Set Up Docker Registry for Private Images<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For a complete development workflow, run a private Docker registry on your VPS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Create registry directory\nmkdir -p ~\/docker-registry\ncd ~\/docker-registry\n\n# Create docker-compose.yml for registry\ncat &lt;&lt; 'EOF' &gt; docker-compose.yml\nversion: \"3\"\nservices:\n  registry:\n    image: registry:2\n    container_name: docker-registry\n    ports:\n      - \"5000:5000\"\n    volumes:\n      - .\/data:\/var\/lib\/registry\n    environment:\n      - REGISTRY_STORAGE_DELETE_ENABLED=true\n    restart: unless-stopped\nEOF\n\n# Start the registry\ndocker compose up -d\n\n# Tag and push an image\ndocker tag my-app:latest your-vps-ip:5000\/my-app:latest\ndocker push your-vps-ip:5000\/my-app:latest<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Monitor Your Development Server<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Keep an eye on resource usage with these tools:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Install Netdata for real-time monitoring\nbash &lt;(curl -Ss https:\/\/my-netdata.io\/kickstart.sh)\n\n# Check Docker container stats\ndocker stats\n\n# View logs for all containers\ndocker compose logs -f\n\n# Check system resource usage\nhtop<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">With this setup, your VPS becomes a complete development platform: version control with Gitea, containerized applications with Docker, continuous deployment via GitHub Actions, and monitoring with Netdata. For more VPS configuration tutorials, visit <a href=\"https:\/\/virtualserversvps.com\/\">Virtual Servers VPS<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup A VPS is more than just a web host \u2014 it&#8217;s an excellent platform&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-452","post","type-post","status-publish","format-standard","hentry","category-vps-guides-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup - Virtual Servers VPS Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup\" \/>\n<meta property=\"og:description\" content=\"How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual Servers VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-18T08:44:39+00:00\" \/>\n<meta name=\"author\" content=\"Virtual-Servers-Vps-Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Virtual-Servers-Vps-Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/\",\"name\":\"How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup - Virtual Servers VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\"},\"datePublished\":\"2026-06-18T08:44:39+00:00\",\"author\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\"},\"breadcrumb\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtualserversvps.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/\",\"name\":\"Virtual Servers VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\",\"name\":\"Virtual-Servers-Vps-Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"caption\":\"Virtual-Servers-Vps-Editor\"},\"sameAs\":[\"https:\/\/virtualserversvps.com\/blog\"],\"url\":\"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup - Virtual Servers VPS Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/","og_locale":"en_US","og_type":"article","og_title":"How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup","og_description":"How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup","og_url":"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/","og_site_name":"Virtual Servers VPS Blog","article_published_time":"2026-06-18T08:44:39+00:00","author":"Virtual-Servers-Vps-Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Virtual-Servers-Vps-Editor","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/","url":"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/","name":"How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup - Virtual Servers VPS Blog","isPartOf":{"@id":"https:\/\/virtualserversvps.com\/blog\/#website"},"datePublished":"2026-06-18T08:44:39+00:00","author":{"@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0"},"breadcrumb":{"@id":"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/virtualserversvps.com\/blog\/setup-vps-development-server-git-docker-cicd-pipeline\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtualserversvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Set Up a VPS as a Development Server: Git, Docker, and CI\/CD Pipeline Setup"}]},{"@type":"WebSite","@id":"https:\/\/virtualserversvps.com\/blog\/#website","url":"https:\/\/virtualserversvps.com\/blog\/","name":"Virtual Servers VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0","name":"Virtual-Servers-Vps-Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","caption":"Virtual-Servers-Vps-Editor"},"sameAs":["https:\/\/virtualserversvps.com\/blog"],"url":"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/"}]}},"_links":{"self":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/comments?post=452"}],"version-history":[{"count":1,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/452\/revisions"}],"predecessor-version":[{"id":455,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/452\/revisions\/455"}],"wp:attachment":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/media?parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/categories?post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/tags?post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}