Urgent.News

What's breaking now, across thousands of outlets.

Tech

Stop Paying for Vercel: How to Self-Host Your Deployments on a VPS and Keep the Same Workflow

Push-to-deploy, automatic HTTPS, and preview environments on a $24 droplet with Dokploy, plus the four mistakes to skip on the way. For two years, deploying was the easiest part of my week. I pushed to main, closed my laptop, and the site updated itself. I never thought about servers, which was the entire point of paying for it. Then I opened the invoice. $198 for the month. I read it twice,…

My first attempt at self-hosting deployments failed due to not utilizing a dedicated deployment platform. I rented a VPS, installed Node, PM2, Nginx, and Certbot, and manually configured everything. Deploying was as simple as running git pull from SSH, which worked until I needed to do it remotely. Adding another app meant more Nginx blocks, ports, and processes to manage.

I realized that I had created a worse deployment platform and was now responsible for maintaining it. The benefits of managed platforms, such as reverse proxy, TLS certificates, builds, restarts, and rollbacks, became clear. To self-host, I chose DigitalOcean's Hetzner, Vultr, or OVH servers, as they were similar in price and convenience.

Dokploy, a deployment tool, was installed on the server with a single command. Dokploy handled Docker, Swarm mode, Traefik reverse proxy, and Dokploy's database. The first mistake was renting a 2GB RAM droplet, causing the build to fail due to insufficient memory. Starting with a 4GB droplet ($24/month) was more suitable for the application, database, and build.

Connecting GitHub was a crucial step, as it allowed for automatic deploys on push, watch paths, and preview environments for pull requests. The GitHub App provided these features with minimal configuration, preventing the loss of these functionalities that one might assume when moving away from managed hosting.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Samsung Narrows HBM Gap With SK hynix

Samsung Electronics is rapidly catching up with market leader SK hynix in the high-bandwidth memory, or HBM, market after significantly increasing its market share.

  • Samsung narrows HBM gap with SK hynix to 10 percentage points
  • Samsung's market share rises to 33%, up from 21%
  • SK hynix's share declines to 50%, down from 58%

More from Friday 4 September →