<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Richard Parayno</title>
    <description>The latest articles on Forem by Richard Parayno (@richardparayno).</description>
    <link>https://forem.com/richardparayno</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2269787%2F71f08e70-f93a-4308-8492-e6a1700f7428.png</url>
      <title>Forem: Richard Parayno</title>
      <link>https://forem.com/richardparayno</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/richardparayno"/>
    <language>en</language>
    <item>
      <title>Hosting your own PaaS: Open-Source Tools to Help You Exit the Cloud!</title>
      <dc:creator>Richard Parayno</dc:creator>
      <pubDate>Thu, 07 Nov 2024 09:20:07 +0000</pubDate>
      <link>https://forem.com/richardparayno/hosting-your-own-paas-open-source-tools-to-help-you-exit-the-cloud-524k</link>
      <guid>https://forem.com/richardparayno/hosting-your-own-paas-open-source-tools-to-help-you-exit-the-cloud-524k</guid>
      <description>&lt;p&gt;Are you tired of watching your cloud hosting bills climb higher each month? You're not alone. As businesses scale their operations, traditional Platform-as-a-Service (PaaS) solutions can become increasingly expensive. But here's the good news: you can create your own PaaS alternative using open-source tools like Dokku, Coolify, and Dokploy on affordable VPS providers like &lt;a href="https://hostari.com/plans/vps" rel="noopener noreferrer"&gt;Hostari&lt;/a&gt;. Let's dive into how you can maintain control over your infrastructure while keeping costs manageable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding PaaS and Why Self-Hosting Matters
&lt;/h2&gt;

&lt;p&gt;Before we explore the alternatives, let's understand why self-hosted PaaS solutions are gaining traction in the developer community. Traditional PaaS providers offer convenience, but at what cost?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Rising Costs of Traditional Cloud Services
&lt;/h2&gt;

&lt;p&gt;Cloud services like Heroku, Google App Engine, and AWS Elastic Beanstalk have revolutionized application deployment. However, their pricing models often include hidden costs that can surprise you when scaling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resource overhead charges&lt;/li&gt;
&lt;li&gt;Data transfer fees&lt;/li&gt;
&lt;li&gt;Add-on service costs&lt;/li&gt;
&lt;li&gt;Premium support fees&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many developers find themselves paying hundreds or even thousands of dollars monthly for services they could host themselves for a fraction of the cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Self-Hosted PaaS Solutions
&lt;/h2&gt;

&lt;p&gt;Self-hosting your PaaS infrastructure offers numerous advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complete control over your infrastructure&lt;/li&gt;
&lt;li&gt;Significant cost savings (often 50-80% less)&lt;/li&gt;
&lt;li&gt;No vendor lock-in&lt;/li&gt;
&lt;li&gt;Enhanced privacy and security&lt;/li&gt;
&lt;li&gt;Customizable deployment workflows&lt;/li&gt;
&lt;li&gt;Better resource utilization&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Popular Open-Source PaaS Alternatives
&lt;/h2&gt;

&lt;p&gt;Let's examine three powerful open-source tools that can help you create your own PaaS solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dokku: The Open Source PaaS Alternative to Heroku
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faeg92urdd7e859k4gewt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faeg92urdd7e859k4gewt.png" alt="Dokku" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dokku (currently at v0.35.10) helps you build and manage the lifecycle of applications from building to scaling, all powered by Docker and tools you already know. Think of it as your own personal, mini-Heroku.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features of Dokku
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Application Deployment&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Heroku-compatible buildpacks&lt;/li&gt;
&lt;li&gt;Custom Dockerfile support&lt;/li&gt;
&lt;li&gt;Zero-downtime deployments&lt;/li&gt;
&lt;li&gt;Git-based workflow&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Container Management&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Native Docker support&lt;/li&gt;
&lt;li&gt;Isolated containers&lt;/li&gt;
&lt;li&gt;Resource management&lt;/li&gt;
&lt;li&gt;Process scaling&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Platform Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built-in SSL/TLS management&lt;/li&gt;
&lt;li&gt;Automatic proxy configuration&lt;/li&gt;
&lt;li&gt;Plugin ecosystem&lt;/li&gt;
&lt;li&gt;Custom domains&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Developer Experience&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple Git-push deployments&lt;/li&gt;
&lt;li&gt;Heroku-like workflow&lt;/li&gt;
&lt;li&gt;Buildpack automation&lt;/li&gt;
&lt;li&gt;Straightforward scaling&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Getting Started with Dokku
&lt;/h3&gt;

&lt;p&gt;Getting started is straightforward with their bootstrap script (check &lt;a href="https://dokku.com" rel="noopener noreferrer"&gt;dokku.com&lt;/a&gt; for the most up-to-date installation command):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# download the installation script&lt;/span&gt;
wget &lt;span class="nt"&gt;-NP&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; https://dokku.com/bootstrap.sh

&lt;span class="c"&gt;# run the installer&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;&lt;span class="nv"&gt;DOKKU_TAG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;v0.35.10 bash bootstrap.sh

&lt;span class="c"&gt;# configure your server domain&lt;/span&gt;
dokku domains:set-global your-domain.com

&lt;span class="c"&gt;# add your ssh key to the dokku user&lt;/span&gt;
&lt;span class="nv"&gt;PUBLIC_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-public-key-contents-here"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$PUBLIC_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | dokku ssh-keys:add admin

&lt;span class="c"&gt;# create your first app&lt;/span&gt;
dokku apps:create test-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What makes Dokku special on &lt;a href="https://hostari.com/plans/vps" rel="noopener noreferrer"&gt;Hostari VPS&lt;/a&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;True Ownership&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complete control over your infrastructure&lt;/li&gt;
&lt;li&gt;No vendor lock-in&lt;/li&gt;
&lt;li&gt;Freedom to modify and customize&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Cost Efficiency&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Significant savings compared to Heroku&lt;/li&gt;
&lt;li&gt;No premium feature paywalls&lt;/li&gt;
&lt;li&gt;Better resource utilization&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Simplicity First&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Heroku-like developer experience&lt;/li&gt;
&lt;li&gt;Familiar Git-based workflow&lt;/li&gt;
&lt;li&gt;Easy scaling and management&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Powerful Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Full Docker compatibility&lt;/li&gt;
&lt;li&gt;Extensive plugin system&lt;/li&gt;
&lt;li&gt;Built-in monitoring capabilities&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once installed, you can immediately start deploying applications using familiar Git commands, just like you would with Heroku. As the Dokku team humorously notes, "Use the extra cash to buy a pony or feed kittens. You'll save tens of dollars a year on your dog photo sharing website."&lt;/p&gt;

&lt;h2&gt;
  
  
  Coolify: Self-hosting with Superpowers
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbaqavxx7v8jr7blcv9fg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbaqavxx7v8jr7blcv9fg.png" alt="Coolify" width="800" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Coolify stands out as an open-source and self-hostable alternative to platforms like Heroku, Netlify, and Vercel. With over 1059+ cloud customers and a growing self-hosted community, Coolify offers a robust solution for developers seeking control over their infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Comprehensive Feature Set
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Universal Compatibility&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Supports any programming language and framework&lt;/li&gt;
&lt;li&gt;Deploy static websites, APIs, backends, and databases&lt;/li&gt;
&lt;li&gt;Compatible with any server (VPS, Raspberry Pi, EC2, etc.)&lt;/li&gt;
&lt;li&gt;Docker Swarm cluster support (Kubernetes support coming soon)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Deployment Capabilities&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Push-to-deploy functionality&lt;/li&gt;
&lt;li&gt;Integration with GitHub, GitLab, Bitbucket, and Gitea&lt;/li&gt;
&lt;li&gt;Pull request deployment support&lt;/li&gt;
&lt;li&gt;Automated commit deployments&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Security and Control&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free automatic SSL certificates via Let's Encrypt&lt;/li&gt;
&lt;li&gt;No vendor lock-in - complete data control&lt;/li&gt;
&lt;li&gt;All settings saved on your own servers&lt;/li&gt;
&lt;li&gt;Comprehensive backup solutions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Developer Experience&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-time terminal access in browser&lt;/li&gt;
&lt;li&gt;Powerful API for automation&lt;/li&gt;
&lt;li&gt;Webhook support for CI/CD pipelines&lt;/li&gt;
&lt;li&gt;Server automations for routine tasks&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Team Collaboration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Share projects with team members&lt;/li&gt;
&lt;li&gt;Role-based access control&lt;/li&gt;
&lt;li&gt;Permission management&lt;/li&gt;
&lt;li&gt;Real-time collaboration features&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Getting Started with Coolify
&lt;/h3&gt;

&lt;p&gt;Getting started with Coolify is remarkably simple. The self-hosted version is ready on your server in under a minute and is always free with all functionalities included. Here's how to get started (always check &lt;a href="https://coolify.io" rel="noopener noreferrer"&gt;coolify.io&lt;/a&gt; for the latest installation command):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://cdn.coollabs.io/coolify/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What makes Coolify special:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;No Hidden Costs&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cloud providers often become costly beyond free tiers&lt;/li&gt;
&lt;li&gt;Avoid unexpected expense accumulation&lt;/li&gt;
&lt;li&gt;Complete cost transparency&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Cost Efficient&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get more resources for your money&lt;/li&gt;
&lt;li&gt;Save thousands of dollars monthly&lt;/li&gt;
&lt;li&gt;Better resource utilization on &lt;a href="https://hostari.com/plans/vps" rel="noopener noreferrer"&gt;Hostari VPS&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Easier Than Expected&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modern server infrastructure simplifies hosting&lt;/li&gt;
&lt;li&gt;Start hosting in minutes without maintenance overhead&lt;/li&gt;
&lt;li&gt;User-friendly interface for management&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Enhanced Data Privacy&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complete control over your data&lt;/li&gt;
&lt;li&gt;Guarantee against data misuse&lt;/li&gt;
&lt;li&gt;Keep sensitive information in-house&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;No Feature Limitations&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Everything included in the open-source version&lt;/li&gt;
&lt;li&gt;Host unlimited websites&lt;/li&gt;
&lt;li&gt;Deploy on any quantity of servers&lt;/li&gt;
&lt;li&gt;No restrictions on usage&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Dokploy: Deploy Anywhere with Total Freedom
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnmiuinosrlh2gn7xqo3v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnmiuinosrlh2gn7xqo3v.png" alt="Dokploy" width="800" height="622"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dokploy represents a modern approach to application deployment, offering a comprehensive platform that emphasizes freedom and ease of use. With their tagline "Deploy Anywhere with Total Freedom and Ease," Dokploy provides a powerful alternative to traditional PaaS solutions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features of Dokploy
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Flexible Application Deployment&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Support for Nixpacks and Heroku Buildpacks&lt;/li&gt;
&lt;li&gt;Custom Dockerfile compatibility&lt;/li&gt;
&lt;li&gt;Tailored deployment stacks&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Native Docker Compose Support&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Seamless orchestration capabilities&lt;/li&gt;
&lt;li&gt;Complex application deployment support&lt;/li&gt;
&lt;li&gt;Full Docker Compose integration&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Advanced Infrastructure Management&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-server deployment support&lt;/li&gt;
&lt;li&gt;Zero-configuration setup&lt;/li&gt;
&lt;li&gt;Docker Swarm cluster support&lt;/li&gt;
&lt;li&gt;Detailed user access control&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Database Management Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built-in support for MySQL, PostgreSQL, MongoDB, and MariaDB&lt;/li&gt;
&lt;li&gt;Automated backup systems&lt;/li&gt;
&lt;li&gt;Redis support&lt;/li&gt;
&lt;li&gt;Direct database management interface&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Developer-Centric Tools&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complete API &amp;amp; CLI access&lt;/li&gt;
&lt;li&gt;Real-time monitoring and alerts&lt;/li&gt;
&lt;li&gt;CPU, memory, and network usage tracking&lt;/li&gt;
&lt;li&gt;Open-source templates for popular tools&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Getting Started with Dokploy
&lt;/h3&gt;

&lt;p&gt;Getting started is straightforward with their one-line installation (check &lt;a href="https://dokploy.com" rel="noopener noreferrer"&gt;dokploy.com&lt;/a&gt; for the most up-to-date installation command):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sSL&lt;/span&gt; https://dokploy.com/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Dokploy works with various cloud providers and VPS services, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://hostari.com/plans/vps" rel="noopener noreferrer"&gt;Hostari&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;AWS&lt;/li&gt;
&lt;li&gt;DigitalOcean&lt;/li&gt;
&lt;li&gt;Any VPS provider&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What sets Dokploy apart is its commitment to avoiding vendor lock-in, allowing users to modify, scale, and customize the platform to suit their specific needs while maintaining complete control over their infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hostari VPS: The Perfect Foundation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why Choose Hostari for Self-Hosted PaaS
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://hostari.com/plans/vps" rel="noopener noreferrer"&gt;Hostari VPS&lt;/a&gt; provides an excellent foundation for your self-hosted PaaS solution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Competitive pricing&lt;/li&gt;
&lt;li&gt;High-performance infrastructure&lt;/li&gt;
&lt;li&gt;Excellent network connectivity&lt;/li&gt;
&lt;li&gt;24/7 technical support&lt;/li&gt;
&lt;li&gt;Flexible resource scaling&lt;/li&gt;
&lt;li&gt;Built-in DDoS protection&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cost Comparison and ROI Analysis
&lt;/h2&gt;

&lt;p&gt;Let's break down the potential savings:&lt;/p&gt;

&lt;p&gt;Traditional Cloud PaaS (Monthly):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic dyno: $25-50&lt;/li&gt;
&lt;li&gt;Database: $15-50&lt;/li&gt;
&lt;li&gt;SSL: $7-20&lt;/li&gt;
&lt;li&gt;Additional services: $20-100
Total: $67-220+&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Self-Hosted Solution on &lt;a href="https://hostari.com/plans/vps" rel="noopener noreferrer"&gt;Hostari&lt;/a&gt; (Monthly):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://hostari.com/plans/vps" rel="noopener noreferrer"&gt;Hobbyist VPS&lt;/a&gt; (2vCPU, 4GB RAM, 40GB disk): $16.72-19/mo depending on term&lt;/li&gt;
&lt;li&gt;Domain: $1-2&lt;/li&gt;
&lt;li&gt;SSL (Let's Encrypt): Free&lt;/li&gt;
&lt;li&gt;Management tools (Dokku/Coolify/Dokploy): Free
Total: $17.72-21/mo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Potential annual savings: $591-2,389+ depending on your cloud usage&lt;/p&gt;

&lt;p&gt;Note: Hostari's Hobbyist plan includes server backups and control panel access, which would typically cost extra on traditional cloud providers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices for Self-Hosted PaaS
&lt;/h2&gt;

&lt;p&gt;To ensure success with your self-hosted PaaS:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start small and scale gradually&lt;/li&gt;
&lt;li&gt;Implement proper monitoring&lt;/li&gt;
&lt;li&gt;Maintain regular backups&lt;/li&gt;
&lt;li&gt;Keep security patches updated&lt;/li&gt;
&lt;li&gt;Document your setup&lt;/li&gt;
&lt;li&gt;Plan for disaster recovery&lt;/li&gt;
&lt;li&gt;Monitor resource usage&lt;/li&gt;
&lt;li&gt;Optimize configurations&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Creating your own PaaS alternative using tools like Dokku, Coolify, or Dokploy on &lt;a href="https://hostari.com/plans/vps" rel="noopener noreferrer"&gt;Hostari VPS&lt;/a&gt; offers a compelling solution for businesses looking to reduce costs while maintaining control over their infrastructure. The initial setup might require some technical knowledge, but the long-term benefits in terms of cost savings and flexibility make it a worthwhile investment. Whether you're a startup looking to optimize expenses or an established business seeking more control over your deployment infrastructure, self-hosted PaaS solutions provide a practical and efficient alternative to traditional cloud services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Q1: How much technical expertise do I need to manage a self-hosted PaaS?&lt;/strong&gt;&lt;br&gt;
A: While some Linux and Docker knowledge is helpful, the tools mentioned (Dokku, Coolify, and Dokploy) are designed to be user-friendly. Basic command-line experience and understanding of web deployment concepts should be sufficient to get started.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q2: Can I migrate my existing applications from Heroku to these self-hosted solutions?&lt;/strong&gt;&lt;br&gt;
A: Yes, most applications running on Heroku can be migrated to self-hosted solutions, especially Dokku, which is designed to be Heroku-compatible. The migration process typically involves updating your deployment configurations and database connections.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q3: How does the performance compare to traditional PaaS providers?&lt;/strong&gt;&lt;br&gt;
A: Performance largely depends on your VPS specifications, but many users report similar or better performance compared to traditional PaaS providers, especially since you have full control over resource allocation and optimization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q4: What happens if my traffic suddenly spikes?&lt;/strong&gt;&lt;br&gt;
A: Unlike traditional PaaS providers with automatic scaling, you'll need to monitor and manually adjust your resources. However, &lt;a href="https://hostari.com/plans/vps" rel="noopener noreferrer"&gt;Hostari VPS&lt;/a&gt; allows for quick resource upgrades, and tools like Dokku support load balancing for handling increased traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q5: Is it possible to scale horizontally with these self-hosted solutions?&lt;/strong&gt;&lt;br&gt;
A: Yes, all three tools (Dokku, Coolify, and Dokploy) support horizontal scaling. You can add more servers to your infrastructure and distribute your applications across them, though this requires additional configuration and management.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>opensource</category>
      <category>cloud</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Stop Paying Vercel: Self-Host Unlimited NextJS Apps for $19/month</title>
      <dc:creator>Richard Parayno</dc:creator>
      <pubDate>Mon, 28 Oct 2024 09:17:01 +0000</pubDate>
      <link>https://forem.com/richardparayno/stop-paying-vercel-self-host-unlimited-nextjs-apps-for-19month-55d</link>
      <guid>https://forem.com/richardparayno/stop-paying-vercel-self-host-unlimited-nextjs-apps-for-19month-55d</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Tired of usage-based pricing? Deploy your NextJS app on a VPS and host unlimited projects for a fixed $19/month.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Developing a great, performant web app has been made easier by the recent rise in popularity of full-stack frameworks like &lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;NextJS&lt;/a&gt;. After finishing your NextJS app, you need to start thinking about how you will put your work up on the Internet. While &lt;a href="https://vercel.com" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt; (the developers of NextJS) offers a first-party, one-click deployment solution for NextJS apps, it might not exactly be a fit for individuals who need more control over the server they're deploying on.&lt;/p&gt;

&lt;p&gt;Hostari offers affordable, secure, and performant Virtual Private Servers (VPS) that can easily be configured to deploy your apps created on NextJS (and pretty much any web framework you work with). However, connecting to a Linux server and using a command-line interface (CLI) may be intimidating for those who don't have much experience with deploying to off-the-shelf web servers.&lt;/p&gt;

&lt;p&gt;In this guide, we'll walk you through why, how, and when you should consider deploying your NextJS app on a VPS instead of Cloud PaaS providers like &lt;a href="https://aws.amazon.com" rel="noopener noreferrer"&gt;Amazon Web Services&lt;/a&gt;, &lt;a href="https://cloud.google.com" rel="noopener noreferrer"&gt;Google Cloud Platform&lt;/a&gt;, and &lt;a href="https://vercel.com" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt;. Note that with this guide, you'll lose out on some features of NextJS (such as Image Optimization) because we'll be deploying it as a standard Node.js application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why should you self-host your NextJS app?
&lt;/h2&gt;

&lt;p&gt;There are many reasons why you should consider self-hosting your NextJS app. Chief among them is the affordability and increased control you have over your deployment target. For budget-minded developers and savvy entrepreneurs, renting out a VPS from a provider like &lt;a href="https://hostari.com/plans/vps?utm_source=devto&amp;amp;utm_medium=organic_social&amp;amp;utm_campaign=devto_mirror" rel="noopener noreferrer"&gt;Hostari&lt;/a&gt; can serve your first 100 paying customers even on a $19/month 2vCPU, 4GB RAM VPS with 1TB of bandwidth. This kind of value proposition is hard to match with modern PaaS platforms that often charge based on usage or traffic. Aside from the surprising scalability offered by modern VPSes, there are other reasons why you would choose to set up and build on your own infrastructure:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Predictable Monthly Costs&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;That same $19/month VPS can run multiple apps and environments&lt;/li&gt;
&lt;li&gt;No more surprise bills from unexpected traffic spikes&lt;/li&gt;
&lt;li&gt;Fixed 1TB bandwidth means no per-request charging&lt;/li&gt;
&lt;li&gt;Only upgrade when you actually need more resources&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Real Developer Control&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SSH into your server whenever you need to check something&lt;/li&gt;
&lt;li&gt;Configure nginx and caching exactly how you want&lt;/li&gt;
&lt;li&gt;Run the exact versions of Node.js and npm that work for you&lt;/li&gt;
&lt;li&gt;Install Redis, PostgreSQL, or any other service you need&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Freedom to Build Your Way&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use GitHub Actions, GitLab CI, &lt;a href="https://dokku.com/" rel="noopener noreferrer"&gt;Dokku&lt;/a&gt; or any CI/CD tool you prefer&lt;/li&gt;
&lt;li&gt;Set up custom caching that actually makes sense for your app&lt;/li&gt;
&lt;li&gt;Monitor your app with tools you already know and trust&lt;/li&gt;
&lt;li&gt;Run background jobs without paying for extra services&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Fine-tuned Resource Usage&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Host your dev, staging, and production apps on one VPS&lt;/li&gt;
&lt;li&gt;Configure memory and CPU exactly how your app needs it&lt;/li&gt;
&lt;li&gt;Run multiple projects without multiple hosting bills&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why should you NOT self-host your NextJS app?
&lt;/h2&gt;

&lt;p&gt;As with any decision in software engineering, managed PaaS solutions have their place in the deployment ecosystem. For a framework like NextJS, some features are locked behind Vercel, such as Image Optimization. Despite the advancements in infrastructure tooling that have made self-hosting more accessible, there are still valid scenarios where you might want to stick with platforms like Vercel or AWS:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Need for Platform-exclusive Features&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vercel's instant preview deployments for every PR is a great collaboration tool&lt;/li&gt;
&lt;li&gt;Edge functions require additional configuration when self-hosting&lt;/li&gt;
&lt;li&gt;Built-in analytics and performance monitoring come ready to use&lt;/li&gt;
&lt;li&gt;Automatic image optimization needs separate setup on a VPS&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Time-to-Market Pressure&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Venture-funded startups might prefer spending resources on product development&lt;/li&gt;
&lt;li&gt;Platform features like automatic branch deployments speed up the review process&lt;/li&gt;
&lt;li&gt;Global CDN distribution comes out of the box&lt;/li&gt;
&lt;li&gt;Setting up your own CI/CD pipeline takes initial planning&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Team Dynamics&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Larger teams might benefit from standardized platform workflows&lt;/li&gt;
&lt;li&gt;New developers might already be familiar with PaaS deployments&lt;/li&gt;
&lt;li&gt;Infrastructure decisions require team-wide documentation&lt;/li&gt;
&lt;li&gt;Deployment procedures need to be communicated across the team&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Business Requirements&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Projects needing instant global presence might start faster with a PaaS&lt;/li&gt;
&lt;li&gt;Specific compliance certifications might require managed services&lt;/li&gt;
&lt;li&gt;Some enterprise clients might require specific platform deployments&lt;/li&gt;
&lt;li&gt;Rapidly scaling products might benefit from managed infrastructure&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;However, it's worth noting that modern tooling has made most of these challenges quite manageable. For NextJS specifically, projects like &lt;a href="https://opennext.js.org" rel="noopener noreferrer"&gt;OpenNext&lt;/a&gt; are trying to de-couple the tight integration of NextJS and Vercel and making true NextJS self-hosting possible on platforms like &lt;a href="https://developers.cloudflare.com/" rel="noopener noreferrer"&gt;Cloudflare&lt;/a&gt; and &lt;a href="https://www.netlify.com/" rel="noopener noreferrer"&gt;Netlify&lt;/a&gt;. If you don't mind losing some NextJS features by running it as a standard Node.js app, you can leverage tools like Docker and open-source PaaS alternatives like &lt;a href="https://coolify.io" rel="noopener noreferrer"&gt;Coolify&lt;/a&gt; and &lt;a href="https://dokploy.com" rel="noopener noreferrer"&gt;Dokploy&lt;/a&gt; to make the experience of setting up a production-grade VPS much easier than doing things yourself.&lt;/p&gt;

&lt;p&gt;Not many know this, but the choice often boils down to your specific needs, team size, and business context rather than technical limitations.&lt;/p&gt;

&lt;h2&gt;
  
  
  What do you need to host your NextJS app?
&lt;/h2&gt;

&lt;p&gt;If you want to start dabbling in the world of self-hosted web apps and VPSes, you only need a few things to start:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An active VPS with at least 2vCPU, 4GB RAM on Ubuntu 22.02 (shameless plug: we offer one for $18/mo at &lt;a href="https://hostari.com/plans/vps?utm_source=devto&amp;amp;utm_medium=organic_social&amp;amp;utm_campaign=devto_mirror" rel="noopener noreferrer"&gt;Hostari&lt;/a&gt;!)&lt;/li&gt;
&lt;li&gt;Any NextJS-based codebase (that preferably runs WITHOUT errors in dev mode!). For this guide, we'll be using the standard &lt;code&gt;create-next-app&lt;/code&gt; starter template for simplicity.&lt;/li&gt;
&lt;li&gt;Optional, but highly recommended: a domain name so you can connect to your deployed web app with a domain name instead of an IP address.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How do you deploy your NextJS app for VPS deployment (and vice versa)?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The NextJS side of things
&lt;/h3&gt;

&lt;p&gt;As mentioned previously, we will be using the standard &lt;code&gt;create-next-app&lt;/code&gt; template so you can easily and quickly follow along. If you've already prepared your own codebase, feel free to just follow the general direction the guide takes. If your project uses a database like &lt;a href="https://supabase.com" rel="noopener noreferrer"&gt;Supabase&lt;/a&gt; and tools like &lt;a href="https://orm.drizzle.team" rel="noopener noreferrer"&gt;Drizzle&lt;/a&gt;, you will have to set those up first before you can proceed with deploying your NextJS. Please refer to your tools' respective documentation on how to host them on your VPS (if they offer this option!).&lt;/p&gt;

&lt;p&gt;Now, let's proceed with the guide.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1 - Run create-next-app
&lt;/h4&gt;

&lt;p&gt;Since we don't have any NextJS codebases available yet, let's run &lt;code&gt;create-next-app&lt;/code&gt; and set up a basic NextJS project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F585n8qk9se3dfofwvqbi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F585n8qk9se3dfofwvqbi.png" alt="Running npx create-next-app@latest to bootstrap our project" width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2 - Run the development server
&lt;/h4&gt;

&lt;p&gt;It's always good to do a sanity check when you start a new project. Run the development server by running &lt;code&gt;npm run dev&lt;/code&gt; or whatever Javascript runtime you're using. I personally use &lt;a href="https://bun.sh" rel="noopener noreferrer"&gt;Bun&lt;/a&gt;, so you'll see me running &lt;code&gt;bun dev&lt;/code&gt; in the screenshot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbl9v4n8wp39c2cv77jjd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbl9v4n8wp39c2cv77jjd.png" alt="Running bun dev to start our development server" width="602" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you've turned on the development server, you can go to &lt;code&gt;http://localhost:3000&lt;/code&gt; in your browser of choice. If all went well, you should be able to see the standard &lt;code&gt;create-next-app&lt;/code&gt;: a NextJS logo, some text, some buttons, and some links.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fzdiegp6xipqkhrhegg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fzdiegp6xipqkhrhegg.png" alt="Looks like everything is good to go." width="800" height="776"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3 - Make some quick changes to the create-next-app template
&lt;/h4&gt;

&lt;p&gt;This step can be considered optional, but I encourage you to make some light changes in your &lt;code&gt;app/page.tsx&lt;/code&gt; file. If it's your first time deploying your website to a VPS, it's a great feeling to see that &lt;em&gt;your work&lt;/em&gt; was successfully published on the Internet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6p2tj9hwuw6h105k1m0z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6p2tj9hwuw6h105k1m0z.png" alt="Sanity checking the small changes we made (neovim, btw)" width="800" height="883"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 4 - Take note of any environment variables and API keys that you might need
&lt;/h4&gt;

&lt;p&gt;When you deploy to a VPS, you typically also need to set up your environment variables (such as URLs for your database) and API keys again. For example, if you built an AI app that relies on the &lt;a href="https://https://www.anthropic.com/api" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt; or &lt;a href="https://platform.openai.com/docs/overview" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt; APIs, you will need to either create a new API key solely for the VPS or you could also re-use your existing development API key. I recommend creating new API keys for your deployment environment for easier management and distinction between your local, development environment and your production environment. I'd also like to mention that, if you're using a platform like &lt;a href="https://github.com" rel="noopener noreferrer"&gt;Github&lt;/a&gt; for your version management, you should absolutely not &lt;code&gt;commit&lt;/code&gt; your environment variables and API key alongside the other files of your project. Always make sure that your &lt;code&gt;.env&lt;/code&gt; file is included in your &lt;code&gt;.gitignore&lt;/code&gt; file!&lt;/p&gt;

&lt;p&gt;For this guide, we don't need to set up any environment variables because we just used the default &lt;code&gt;create-next-app&lt;/code&gt; which is pretty barebones (perfect for learning how to do a simple VPS deployment).&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 5 - Prepare your VPS for deployment!
&lt;/h4&gt;

&lt;p&gt;From this point forward, we will mainly be working on the VPS side of things. As you might've noticed, the core process of setting up your NextJS app for VPS deployment is rather straightforward and mainly involves sanity checks. Do note that you might need to do some other steps depending on the stack you're using (such as additional database setups). For those instances, please always check your tools' documentation if they have a guide explaining how to host them and prepare them for a production environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  The VPS side of things
&lt;/h3&gt;

&lt;p&gt;Now that we're sure that our NextJS app runs perfectly on our local environment, its time to do the fun part -- deploying and running your NextJS app on your VPS!&lt;/p&gt;

&lt;p&gt;There are many ways that you could go about deploying your NextJS app on a VPS, such as using &lt;a href="https://dokku.com" rel="noopener noreferrer"&gt;Dokku&lt;/a&gt; which allows you to deploy to your VPS using Git. I believe that it's really important to learn the basics of something before you use tools that make your life easier. This is why we'll keep things simple and straightforward, using the most basic (but still production-ready) approach to deployment. The approach I will show you just relies on a basic &lt;a href="https://nginx.org" rel="noopener noreferrer"&gt;nginx&lt;/a&gt; configuration.&lt;/p&gt;

&lt;p&gt;Before we start, make sure that you have the following to have a smooth deployment experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At least a 2vCPU, 4GB VPS from a trusted provider like &lt;a href="https://hostari.com/plans/vps" rel="noopener noreferrer"&gt;Hostari&lt;/a&gt; or &lt;a href="https://digitalocean.com" rel="noopener noreferrer"&gt;DigitalOcean&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;SSH credentials for your VPS&lt;/li&gt;
&lt;li&gt;SSH keys for your local machine&lt;/li&gt;
&lt;li&gt;Your &lt;em&gt;public&lt;/em&gt; (NOT private) SSH key should be uploaded to your VPS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We won't go through the process of creating SSH keys for your local machine as many other guides already go through that. If you're using Hostari, you should have already had the chance to upload your SSH key to your VPS. Your VPS provider should also have given you SSH credentials for your VPS, which are a useful fallback option to connecting to your server when you haven't uploaded your public SSH key yet.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1 - Connect to your VPS via SSH
&lt;/h4&gt;

&lt;p&gt;Use your favorite Terminal app to connect to your VPS through SSH. If your public SSH keys have been uploaded to your VPS, you should be prompted for the passphrase of your SSH key. Otherwise, you can use your SSH username and password credentials to connect to your VPS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh &amp;lt;username&amp;gt;@&amp;lt;server_ip_address&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;[image: hostari-vps.png]&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6bnhc883nypph5ct9wh5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6bnhc883nypph5ct9wh5.png" alt="Your preferred server host should provide you the required details to connect to your VPS through SSH. This is how it looks like in Hostari." width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9dr1vidtkkuyzq2sdkaq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9dr1vidtkkuyzq2sdkaq.png" alt="This is the command you need to run to connect to your server. Command: ssh username@ip-address" width="327" height="87"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frmuamyg0x489y69mnerm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frmuamyg0x489y69mnerm.png" alt="If you did everything correctly, your terminal prompt should clearly show that you're logged in to your server.​" width="661" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2 - Install the necessary software on your server
&lt;/h4&gt;

&lt;p&gt;For our case of hosting NextJS apps, we will need to install your preferred Javascript runtime on your server. If you're just starting out, I recommend installing Node.js. Make sure that the version of Node.js that you're using is the same version you're using to develop your app so you will encounter less issues in the process. If you want to install Node.js instead of Bun, you can run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install nodejs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As I mentioned earlier that I use Bun as my Javascript runtime of choice, I just have to run the following command and I'll be good to go:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -fsSL https://bun.sh/install | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since we're in a server environment and preparing it for production, always consult the documentation of your tools on their recommended production practices so you keep your server secure and in a working state.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dedgu1q4irky4466r5d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1dedgu1q4irky4466r5d.png" alt="Since I used Bun, I have to manually " width="674" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3 - Clone your repo from Github (or similar) into your VPS
&lt;/h4&gt;

&lt;p&gt;We're a few steps away from seeing our NextJS app hosted in our VPS. After installing your preferred JS runtime, you need to clone the Git repository of your codebase. If you don't use version control, you can use other methods like FTP to upload your codebase manually to your VPS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmu4avf2qp4hx0kgpr2c0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmu4avf2qp4hx0kgpr2c0.png" alt="My sample project is up on Github, so I cloned my repo from there." width="800" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you've put your codebase on your VPS, you will need to install your codebase's dependencies, set up environment variables, and build the production version of your app before you can run it. Since we don't have any environment variables, we only need to run &lt;code&gt;bun install&lt;/code&gt; and &lt;code&gt;bun run build&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fafpveuvwnwnl0ucty115.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fafpveuvwnwnl0ucty115.png" alt="First, install your project's dependencies. Then, build the project for a production environment.​" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 4 - Start your NextJS app and access it using IP Address
&lt;/h4&gt;

&lt;p&gt;Now that you've prepared your server, JS runtime, and codebase on your VPS, it's time to run it and "put it on the Internet"!. You will need to run the following command: &lt;code&gt;bun run start&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F72qktd4j56mfnelu4p4u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F72qktd4j56mfnelu4p4u.png" alt="Once you've built the project for production, you can go ahead and start the production server." width="542" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One thing to note: running &lt;code&gt;bun run start&lt;/code&gt; this way means your app will stop if you close your terminal session. For a production environment, you might want to use a process manager to keep your app running. Tools like &lt;a href="https://pm2.keymetrics.io/" rel="noopener noreferrer"&gt;PM2&lt;/a&gt; are great for this, but we'll keep things simple for now and tackle that in a future guide.&lt;/p&gt;

&lt;p&gt;Congrats, your NextJS app is now &lt;em&gt;technically&lt;/em&gt; deployed on your server's port 3000 with HTTP. You can try accessing your web app by going to your web browser and typing something like (your_ip_addres):3000. However, this isn't production ready yet, as we need to set up our nginx configuration to point our server to a proper domain, remove the port 3000 from the server address, and add HTTPS.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 5 - Set up your initial nginx config
&lt;/h4&gt;

&lt;p&gt;In the previous step, we were able to successfully access our deployed NextJS app through port 3000 of our VPS IP Address. While this setup technically works and you can call it a day, it's not exactly passable for a production environment. This is where nginx comes in, a sort of "traffic controller" for the different web apps on your VPS. For example, if someone visits your domain (let's say its &lt;code&gt;hostari-tutorial.richardparayno.com&lt;/code&gt;), nginx will &lt;em&gt;receive&lt;/em&gt; that request and forward it to your NextJS app running on port 3000 of your VPS.&lt;/p&gt;

&lt;p&gt;To set up a basic nginx config for your server, you need to install it on your VPS first. On VPSes running on Ubuntu, you can run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt install nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you've successfully installed nginx, it's time to create your nginx config file. To do that, you can run the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo nano /etc/nginx/sites-available/nextjs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After entering the command above, you can start entering the desired attributes of your nginx setup. If this is your first time deploying to a VPS, feel free to copy + paste the code block below. We won't be talking much about nginx in this guide (but if you're interested in a follow-up, please let me know!).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server {
    listen 80;
    server_name your-domain.com;  # Replace with your actual domain

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj6yb87ydwtttmdkq7nqr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj6yb87ydwtttmdkq7nqr.png" alt="For this tutorial, copy pasting this nginx script is okay." width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've done everything correctly, you should have an nginx configuration file called &lt;code&gt;nextjs&lt;/code&gt; inside your &lt;code&gt;/etc/nginx/sites-available&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;After creating your nginx config, we can actually go ahead and delete the default nginx configuration by running the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo rm /etc/nginx/sites-enabled/default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that if you don't delete the default configuration, you will just see the default "Welcome to Nginx" screen when you visit your website.&lt;/p&gt;

&lt;p&gt;After deleting the default configuration file, you should now take your &lt;em&gt;new&lt;/em&gt; configuration file (&lt;code&gt;etc/nginx/sites-available/nextjs&lt;/code&gt;) and create a symbolic link (or symlink) into your &lt;code&gt;/etc/nginx/sites-enabled&lt;/code&gt; directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ln -s /etc/nginx/sites-available/nextjs /etc/nginx/sites-enabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe71y1sbdnevhiz6p7714.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe71y1sbdnevhiz6p7714.png" alt="Symlink, test the nginx config, restart the process." width="800" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating the symlink, you should run a test to check if the config is valid.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nginx -t
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're a little bit confused about what's happening here, its because Nginx uses two different directories for managing your configuration files. &lt;code&gt;sites-available&lt;/code&gt; is where you can store your different configuration files, while &lt;code&gt;sites-enabled&lt;/code&gt; is where Nginx actually looks for configurations to use. In other words, you can have a number of different configurations in your &lt;code&gt;sites-available&lt;/code&gt; directory, but only those in &lt;code&gt;sites-enabled&lt;/code&gt; will actually be "activated" and accessible to the Internet.&lt;/p&gt;

&lt;p&gt;Now that we've "enabled" the configuration for our NextJS app, you need to restart nginx to actually apply the changes we've made.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl restart nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9v8evee09u5fpfkuvwn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9v8evee09u5fpfkuvwn.png" alt="After symlinking your new config, you need to remove the default config, test nginx, and restart the process." width="751" height="104"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you'd like to test if your nginx is running properly, you should be able to run your NextJS server again (&lt;code&gt;bun run start&lt;/code&gt;) and see your NextJS app if you go directly to your VPS' IP Address on your web browser without having to enter port 3000 into the address bar. We only have a few crucial tasks left to complete your production deployment, such as enabling HTTPs on your server and connecting your domain. In the next step, we'll take a step away from the Linux CLI and go to our domain registrar's DNS settings.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 6 - Point your domain to your VPS' IP Address
&lt;/h4&gt;

&lt;p&gt;Now that you've configured nginx to take care of your NextJS app's traffic, you will need to tell the Internet that your domain name (in this case, &lt;code&gt;hostari-tutorial.richardparayno.com&lt;/code&gt;) should point to your VPS. Look at your domain provider's documentation on how you can add an "A record" in your domain's DNS settings. The process of "pointing" your domain to your VPS is simple, you just have to create an A record with the following (default) settings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Type:&lt;/strong&gt; A&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Name:&lt;/strong&gt; @ (this means root domain. if you want to point a &lt;em&gt;subdomain&lt;/em&gt; to your VPS instead, you can put that in instead. In my case, since I want the domain &lt;code&gt;hostari-tutorial.richardparayno.com&lt;/code&gt; to point to my VPS, I can put in hostari-tutorial.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Value:&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TTL:&lt;/strong&gt; 3600 (or whatever your provider suggests)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwwai451jnibzi4riastp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwwai451jnibzi4riastp.png" alt="In your DNS settings, you need to create a record pointing your domain to your VPS IP Address." width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I use Cloudflare to manage my domains and DNS, so your provider's interface may look a bit different. However, the principles remain the same: create an A record, type the name, and point it to the IP address of your VPS.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 7 - Add HTTPS to your VPS
&lt;/h4&gt;

&lt;p&gt;This is the final step before our NextJS deployment is finally production-grade and complete. To proceed with adding HTTPS to your VPS, we will be using &lt;a href="https://letsencrypt.org/" rel="noopener noreferrer"&gt;Let's Encrypt&lt;/a&gt;, a free service that provides SSL certificates that auto-renew every 90 days.&lt;/p&gt;

&lt;p&gt;First, we need to install &lt;code&gt;Certbot&lt;/code&gt; on our VPS, a tool that handles all the stuff needed for Let's Encrypt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install certbot python3-certbot-nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fugqqrfgdylhu0e302lmc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fugqqrfgdylhu0e302lmc.png" alt="Make sure you install Certbot and its required dependencies for your VPS." width="800" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once Certbot is installed, run the command below. As part of the process, Certbot will ask you some questions such as your email address and some terms of service confirmations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo certbot --nginx -d hostari-tutorial.richardparayno.com (change this to your domain!)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhue1j5mkfmokqn0wgbv6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhue1j5mkfmokqn0wgbv6.png" alt="Certbot will ask you a few questions, just go through the defaults and you should be good to go.​" width="800" height="645"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After doing that, run your NextJS server again by calling &lt;code&gt;bun run start&lt;/code&gt; and entering your domain name in your browser. If you followed everything in the guide, you should now see your NextJS app deployed on your VPS and secured with HTTPS. Congratulations!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fug78r5fkohs63q5342yv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fug78r5fkohs63q5342yv.png" alt="Our starter project is now deployed on the internet, with our preferred domain, secured by HTTPS. Congrats!" width="800" height="963"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus Chapter: VPS Management Tips and Tricks from the Hostari Team
&lt;/h2&gt;

&lt;p&gt;If you're not a fan of the admittedly manual process of setting up your VPS with nginx, writing your config, and manually moving your NextJS codebase from your Git repo to your VPS, there are a lot of tools available that get you close to the simple, one-click deploy experience that's popular in modern PaaS tooling.&lt;/p&gt;

&lt;p&gt;I'm personally a fan of the following tools and recommend looking at which ones work best for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dokku.com" rel="noopener noreferrer"&gt;Dokku&lt;/a&gt; - Open-source PaaS alternative to Heroku&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://coolify.io" rel="noopener noreferrer"&gt;Coolify&lt;/a&gt; - Open-source PaaS alternative to Vercel, Railway, etc&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dokploy.com" rel="noopener noreferrer"&gt;Dokploy&lt;/a&gt; - Open-source PaaS alternative to Vercel, Railway, etc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At Hostari, we're great fans of these tools and use them daily in managing some of our remote VPSes and homelabs. Now that you're familiar with how web deployment works using nginx, you're now well equipped to "graduate" to these tools and improve your developer experience. However, you should always remember that these are tools at the end of the day, and that it would benefit you to learn how these tools work under the hood so you'll be able to fix issues in the future.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this guide, I talked about why you should and should &lt;em&gt;not&lt;/em&gt; self-host your NextJS app on a VPS. If you're familiar with hosting your websites through one-click deploy services like Vercel and Netlify, you might've felt intimidated or surprised by the number of things you need to do to deploy your NextJS app on a fresh VPS. However, it's important to note that the approach I shared today is only one of many ways of deploying your projects to the Internet. Going through the experience of manually setting up your Nginx configuration will teach you a lot about how deploying your apps to the web works and (I hope) that you walk away from this guide with a greater understanding and appreciation of how the server side of things work. &lt;/p&gt;

&lt;p&gt;De-mystifying and removing the complexity from how the Internet works is one of our goals at Hostari. We believe that web infrastructure management shouldn't be intimidating and that it's time for affordable, traditional server-based infrastructure to rival the developer experience afforded by PaaS platforms like Vercel, GCP, and AWS. If this sounds interesting to you and you're looking for a VPS provider that actually cares about the developer experience, visit the &lt;a href="https://hostari.com?utm_source=devto&amp;amp;utm_medium=organic_social&amp;amp;utm_campaign=devto_mirror" rel="noopener noreferrer"&gt;Hostari website&lt;/a&gt; today and get your own VPS!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>nginx</category>
      <category>nextjs</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
