{"id":49985,"date":"2024-12-16T13:55:50","date_gmt":"2024-12-16T13:55:50","guid":{"rendered":"https:\/\/accuweb.cloud\/resource\/?post_type=faq&#038;p=49985"},"modified":"2026-02-17T13:30:36","modified_gmt":"2026-02-17T13:30:36","slug":"deploy-nestjs-app-with-nginx-on-ubuntu-vps","status":"publish","type":"faq","link":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps","title":{"rendered":"How to Deploy a NestJS Application with Nginx on Ubuntu VPS?"},"content":{"rendered":"<h2 class=\"ack-h2\">How to Deploy a NestJS Application with Nginx on Ubuntu VPS on Accuweb.Cloud?<\/h2>\n<p>NestJS is an innovative <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/application\/node-js-hosting\" target=\"_blank\" rel=\"noopener\">Node.js<\/a> framework for building efficient, scalable, and maintainable server-facet packages. It makes use of TypeScript through default and is built on top of Express (or Fastify) to deal with HTTP requests. NestJS includes modern programming standards along with dependency injection, modular architecture, and interior designers, making it the best for building complex programs.<\/p>\n<p>In this guide, we will walk through the steps of deploying a NestJS application on a VPS hosted on AccuWeb.Cloud, is a reliable cloud service provider. We will utilize Ubuntu as the operating system for the server, Nginx as a reverse proxy, and npm for managing and running the application. Nginx, a powerful and efficient web server, will be used to forward requests to the NestJS application running on a specific port, enhancing performance, load balancing, and <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/resource\/user-guide\/cloud-security-report\" target=\"_blank\" rel=\"noopener\">security.<\/a><br \/>\n<a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/main-7.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49986 size-full\" title=\"Deploy a NestJS Application with Nginx on Ubuntu VPS\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/main-7.png\" alt=\"Deploy a NestJS Application with Nginx on Ubuntu VPS\" width=\"802\" height=\"457\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/main-7.png 802w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/main-7-300x171.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/main-7-768x438.png 768w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><\/a><\/p>\n<div class=\"table-of-content\">\n<h2>Table of Contents<\/h2>\n<ul class=\"ack-ul\">\n<li><a class=\"ack-link-color ajax_link\" href=\"#Steps-to-Deploy-a-NestJS-Application-with-Nginx-on-Ubuntu-VPS\">Steps to Deploy a NestJS Application with Nginx on Ubuntu VPS<\/a>\n<ul class=\"ack-ul\">\n<li><a class=\"ack-link-color ajax_link\" href=\"#Set-Up-Your-VPS-on-AccuWeb-Cloud\">Set Up Your VPS on AccuWeb.Cloud<\/a><\/li>\n<li><a class=\"ack-link-color ajax_link\" href=\"#Prepare-the-Server\">Prepare the Server<\/a><\/li>\n<li><a class=\"ack-link-color ajax_link\" href=\"#Install-Node-js-and-npm\">Install Node.js and npm<\/a><\/li>\n<li><a class=\"ack-link-color ajax_link\" href=\"#Install-NestJS-CLI-and-Create\">Install NestJS CLI and Create a New Project<\/a><\/li>\n<li><a class=\"ack-link-color ajax_link\" href=\"#Set-Up-Nginx-as-a-Reverse-Proxy\">Set Up Nginx as a Reverse Proxy<\/a><\/li>\n<li><a class=\"ack-link-color ajax_link\" href=\"#Run-the-NestJS-Application-with-npm\">Run the NestJS Application with npm<\/a><\/li>\n<li><a class=\"ack-link-color ajax_link\" href=\"#Test-the-Web-Application\">Test the Web Application<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a class=\"ack-link-color ajax_link\" href=\"#Conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n<\/div>\n<p><strong id=\"Steps-to-Deploy-a-NestJS-Application-with-Nginx-on-Ubuntu-VPS\"><\/strong><br \/>\n<strong><\/strong><br \/>\n<strong id=\"Set-Up-Your-VPS-on-AccuWeb-Cloud\"><\/strong><\/p>\n<h2 class=\"ack-h2\">Steps to Deploy a NestJS Application with Nginx on Ubuntu VPS<\/h2>\n<h3 class=\"ack-h3\">Step 1: Set Up Your VPS on AccuWeb.Cloud<\/h3>\n<p><b>1.1.<\/b> Visit the AccuWeb.Cloud dashboard. Log in with your credentials, or sign up for a new account if you don&#8217;t have one.<\/p>\n<p><b>1.2. <\/b>Click on <strong>New Environment<\/strong> to begin the process.<br \/>\n<a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.2.png\"><img decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49987 size-full\" title=\"New Environment\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.2.png\" alt=\"New Environment\" width=\"885\" height=\"427\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.2.png 885w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.2-300x145.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.2-768x371.png 768w\" sizes=\"(max-width: 885px) 100vw, 885px\" \/><\/a><b>1.3.<\/b> Choose Ubuntu OS as your operating system.<\/p>\n<p><b>1.4.<\/b> Select the VPS type based on your resource requirements.<\/p>\n<p><b>1.5.<\/b> Set the desired resource allocation for CPU, RAM, and <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/storage\" target=\"_blank\" rel=\"noopener\">storage.<\/a> You can scale your VPS later if needed.<\/p>\n<p><b>1.6. <\/b>Provide a name for the environment to easily identify it.<\/p>\n<p><b>1.7.<\/b> Once everything is configured, click <strong>Create<\/strong> to start provisioning your VPS.<br \/>\n<a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.7.png\"><img decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49988 size-full\" title=\"Start provisioning your VPS\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.7.png\" alt=\"Start provisioning your VPS\" width=\"926\" height=\"572\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.7.png 926w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.7-300x185.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.7-768x474.png 768w\" sizes=\"(max-width: 926px) 100vw, 926px\" \/><\/a><b>1.8. <\/b>AccuWeb.Cloud will begin provisioning your VPS with the selected configuration. After a few minutes, you\u2019ll receive an email with your login credentials, public IP address, and other necessary details. Your VPS will also be visible on the dashboard.<br \/>\n<a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49989 size-full\" title=\"Login credentials\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.8.png\" alt=\"Login credentials\" width=\"758\" height=\"468\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.8.png 758w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.8-300x185.png 300w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/a><b>1.9.<\/b> Once the environment is created, click <b>Web SSH<\/b> on the AccuWeb.Cloud dashboard to access your server.<br \/>\n<strong id=\"Prepare-the-Server\"><\/strong><br \/>\n<a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49990 size-full\" title=\"Web SSH\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.9.png\" alt=\"Web SSH\" width=\"988\" height=\"366\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.9.png 988w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.9-300x111.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/1.9-768x285.png 768w\" sizes=\"(max-width: 988px) 100vw, 988px\" \/><\/a><\/p>\n<h3 class=\"ack-h3\">Step 2: Prepare the Server<\/h3>\n<p><b>2.1.<\/b> Once you&#8217;re logged in to your <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/compute\/cloud-vps\" target=\"_blank\" rel=\"noopener\">VPS<\/a>, update the package list and upgrade the system:<\/p>\n<pre><code class=\"language-javascript\"><b>sudo apt update &amp;&amp; sudo apt upgrade -y<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/2.1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49991 size-full\" title=\"Update the package list\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/2.1.png\" alt=\"Update the package list\" width=\"892\" height=\"546\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/2.1.png 892w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/2.1-300x184.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/2.1-768x470.png 768w\" sizes=\"(max-width: 892px) 100vw, 892px\" \/><\/a><b>2.2.<\/b> Install the necessary development tools for building and running your application:<\/p>\n<pre><code class=\"language-javascript\"><b>sudo apt install curl git build-essential -y<\/b><\/code><\/pre>\n<p><strong id=\"Install-Node-js-and-npm\"><\/strong><br \/>\n<a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/2.2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49992 size-full\" title=\"Install development tools\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/2.2.png\" alt=\"Install development tools\" width=\"1030\" height=\"550\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/2.2.png 1030w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/2.2-300x160.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/2.2-1024x547.png 1024w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/2.2-768x410.png 768w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/a><\/p>\n<h3 class=\"ack-h3\">Step 3: Install Node.js and npm<\/h3>\n<p><b>3.1.<\/b> To install the latest stable version of Node.js, add the NodeSource repository:<\/p>\n<pre><code class=\"language-javascript\"><b>curl -fsSL https:\/\/deb.nodesource.com\/setup_18.x | sudo -E bash -<\/b><\/code><\/pre>\n<div class=\"cta-btn-top-space ack-extra-image-space\">\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t<\/div>\n<div class=\"article-space\"><\/div>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49993 size-full\" title=\"Add NodeSource repository\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.1.png\" alt=\"Add NodeSource repository\" width=\"1178\" height=\"551\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.1.png 1178w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.1-300x140.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.1-1024x479.png 1024w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.1-768x359.png 768w\" sizes=\"(max-width: 1178px) 100vw, 1178px\" \/><\/a><b>3.2. <\/b>Now, install Node.js and npm (Node Package Manager):<\/p>\n<pre><code class=\"language-javascript\"><b>sudo apt install nodejs -y<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49994 size-full\" title=\"Install Node.js and npm\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.2.png\" alt=\"Install Node.js and npm\" width=\"1047\" height=\"549\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.2.png 1047w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.2-300x157.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.2-1024x537.png 1024w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.2-768x403.png 768w\" sizes=\"(max-width: 1047px) 100vw, 1047px\" \/><\/a><b>3.3.<\/b> To verify that <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/application\/node-js-hosting\" target=\"_blank\" rel=\"noopener\">Node.js<\/a> and npm were successfully installed, check their versions:<\/p>\n<pre><code class=\"language-javascript\"><b>node -v<\/b>\r\n<b>npm -v<\/b><\/code><\/pre>\n<p><strong id=\"Install-NestJS-CLI-and-Create\"><\/strong><br \/>\n<a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49995 size-full\" title=\"Verify Node.js and npm\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.3.png\" alt=\"Verify Node.js and npm\" width=\"995\" height=\"549\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.3.png 995w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.3-300x166.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/3.3-768x424.png 768w\" sizes=\"(max-width: 995px) 100vw, 995px\" \/><\/a><\/p>\n<h3 class=\"ack-h3\">Step 4: Install NestJS CLI and Create a New Project<\/h3>\n<p><b>4.1. <\/b>Now, Install NestJS CLI Globally. You need the NestJS CLI to create and manage your project. Install it globally:<\/p>\n<pre><code class=\"language-javascript\"><b>npm i -g @nestjs\/cli<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49996 size-full\" title=\"Install NestJS CLI Globally\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.1.png\" alt=\"Install NestJS CLI Globally\" width=\"1012\" height=\"546\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.1.png 1012w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.1-300x162.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.1-768x414.png 768w\" sizes=\"(max-width: 1012px) 100vw, 1012px\" \/><\/a><b>4.2. <\/b>Now, create a new NestJS project by running:<\/p>\n<pre><code class=\"language-javascript\"><b>nest new &lt;project-name&gt;<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49997 size-full\" title=\"Create a new NestJS project\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.2.png\" alt=\"Create a new NestJS project\" width=\"875\" height=\"549\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.2.png 875w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.2-300x188.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.2-768x482.png 768w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/a>Follow the prompts to select a package manager (npm, yarn, or pnpm) and complete the project setup.<\/p>\n<p><b>4.3.<\/b> After the project is created, navigate into the project directory and run tests to ensure everything is working:<\/p>\n<pre><code class=\"language-javascript\"><b>cd &lt;project-name&gt;<\/b>\r\n<b id=\"Set-Up-Nginx-as-a-Reverse-Proxy\">npm run test<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49998 size-full\" title=\"Navigate into project directory\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.3.png\" alt=\"Navigate into project directory\" width=\"865\" height=\"557\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.3.png 865w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.3-300x193.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/4.3-768x495.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/a><\/p>\n<h3 class=\"ack-h3\">Step 5: Set Up Nginx as a Reverse Proxy<\/h3>\n<p><b>5.1.<\/b> If Nginx is not already installed on your server, you can install it by running:<\/p>\n<pre><code class=\"language-javascript\"><b>sudo apt install nginx -y<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.1-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-49999 size-full\" title=\"Install Nginx\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.1-2.png\" alt=\"Install Nginx\" width=\"1038\" height=\"543\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.1-2.png 1038w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.1-2-300x157.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.1-2-1024x536.png 1024w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.1-2-768x402.png 768w\" sizes=\"(max-width: 1038px) 100vw, 1038px\" \/><\/a><b>5.2.<\/b> If you are using UFW (Uncomplicated Firewall), allow Nginx to handle HTTP and HTTPS traffic:<\/p>\n<pre><code class=\"language-javascript\"><b>sudo ufw enable<\/b>\r\n<b>sudo ufw allow 'Nginx Full'<\/b><\/code><\/pre>\n<div class=\"cta-btn-top-space ack-extra-image-space\">\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t<\/div>\n<div class=\"article-space\"><\/div>\n<p><b>5.3.<\/b> Now, configure Nginx to forward requests to your NestJS <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/applications\" target=\"_blank\" rel=\"noopener\">application.<\/a> First, create a new Nginx configuration file:<\/p>\n<pre><code class=\"language-javascript\"><b>sudo nano \/etc\/nginx\/sites-available\/your_domain<\/b><\/code><\/pre>\n<p>Add the following configuration in the file, replacing your_domain with your application name or domain:<\/p>\n<pre><code class=\"language-javascript\">server {\r\nlisten 80;\r\nserver_name example.com www.example.com;\r\nlocation \/ {\r\nproxy_pass http:\/\/localhost:3000;\r\nproxy_http_version 1.1;\r\nproxy_set_header Upgrade $http_upgrade;\r\nproxy_set_header Connection 'upgrade';\r\nproxy_set_header Host $host;\r\nproxy_cache_bypass $http_upgrade;\r\n}\r\nerror_page 500 502 503 504 \/50x.html;\r\nlocation = \/50x.html {\r\nroot \/usr\/share\/nginx\/html;\r\n}\r\naccess_log \/var\/log\/nginx\/access.log;\r\nerror_log \/var\/log\/nginx\/error.log;\r\n}<\/code><\/pre>\n<p><b>5.4.<\/b> Create a symbolic link to enable the configuration for your domain:<\/p>\n<pre><code class=\"language-javascript\"><b>sudo ln -s \/etc\/nginx\/sites-available\/your_domain \/etc\/nginx\/sites-enabled\/<\/b><\/code><\/pre>\n<p><b>5.5.<\/b> To avoid conflicts with the default site configuration, unlink it:<\/p>\n<pre><code class=\"language-javascript\"><b>sudo unlink \/etc\/nginx\/sites-enabled\/default<\/b><\/code><\/pre>\n<p><b>5.6.<\/b> Finally, restart Nginx to apply the changes:<\/p>\n<pre><code class=\"language-javascript\"><b>sudo systemctl restart nginx<\/b><\/code><\/pre>\n<p><strong id=\"Run-the-NestJS-Application-with-npm\"><\/strong><br \/>\n<a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50000 size-full\" title=\"Restart Nginx\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.6.png\" alt=\"Restart Nginx\" width=\"1085\" height=\"544\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.6.png 1085w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.6-300x150.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.6-1024x513.png 1024w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/5.6-768x385.png 768w\" sizes=\"(max-width: 1085px) 100vw, 1085px\" \/><\/a><\/p>\n<h3 class=\"ack-h3\">Step 6: Run the NestJS Application with npm<\/h3>\n<p><b>6.1.<\/b> To run your NestJS application, navigate to your project directory and start the application using npm:<\/p>\n<pre><code class=\"language-javascript\"><b>cd &lt;project-name&gt;<\/b>\r\n<b>npm start<\/b><\/code><\/pre>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50001 size-full\" title=\"Run NestJS application\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.1.png\" alt=\"Run NestJS application\" width=\"1281\" height=\"546\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.1.png 1281w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.1-300x128.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.1-1024x436.png 1024w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.1-768x327.png 768w\" sizes=\"(max-width: 1281px) 100vw, 1281px\" \/><\/a>This will start the application on http:\/\/localhost:3000 by default.<\/p>\n<p><b>6.2.<\/b> If you want to run the <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/applications\" target=\"_blank\" rel=\"noopener\">application<\/a> in the background, you can use the nohup command:<\/p>\n<pre><code class=\"language-javascript\"><strong>nohup npm run start &amp;<\/strong><\/code><\/pre>\n<p>This will run the application in the background, and you can safely log out of your SSH session without stopping the application.<br \/>\n<strong id=\"Test-the-Web-Application\"><\/strong><br \/>\n<a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50002 size-full\" title=\"Logout of SSH\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.2.png\" alt=\"Logout of SSH\" width=\"1179\" height=\"546\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.2.png 1179w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.2-300x139.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.2-1024x474.png 1024w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/6.2-768x356.png 768w\" sizes=\"(max-width: 1179px) 100vw, 1179px\" \/><\/a><\/p>\n<h3 class=\"ack-h3\">Step 7: Test the Web Application<\/h3>\n<p><b>7.1. <\/b>Test the Application Locally<br \/>\nYou can test the application from the server by running:<\/p>\n<pre><code class=\"language-javascript\"><b>curl http:\/\/localhost<\/b><\/code><\/pre>\n<p>This should return the response from your NestJS application, such as &#8220;Hello World!&#8221;<br \/>\n<a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50003 size-full\" title=\"Test application locally\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.1-1.png\" alt=\"Test application locally\" width=\"1229\" height=\"551\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.1-1.png 1229w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.1-1-300x134.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.1-1-1024x459.png 1024w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.1-1-768x344.png 768w\" sizes=\"(max-width: 1229px) 100vw, 1229px\" \/><\/a><b>7.2.<\/b> To test the application from an external browser or device, navigate to the server&#8217;s public IP address or domain name:<br \/>\nhttp:\/\/your_domain_or_IP<br \/>\n<strong id=\"Conclusion\"><\/strong><br \/>\n<a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-50004 size-full\" title=\"Navigate to the server's public IP address\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.2.png\" alt=\"Navigate to the server's public IP address\" width=\"1207\" height=\"472\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.2.png 1207w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.2-300x117.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.2-1024x400.png 1024w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/12\/7.2-768x300.png 768w\" sizes=\"(max-width: 1207px) 100vw, 1207px\" \/><\/a>You should see the output of your NestJS <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/applications\" target=\"_blank\" rel=\"noopener\">application<\/a>, such as &#8220;Hello World!&#8221; displayed in your browser.<\/p>\n<h2 class=\"ack-h2\">Conclusion<\/h2>\n<p>Deploying a NestJS application on an Ubuntu VPS with Nginx as a reverse proxy on AccuWeb.Cloud provides a reliable and efficient solution for hosting backend applications in a production environment. By following the steps outlined in this guide, you have successfully set up a scalable and secure web application that can handle traffic effectively. This setup will ensure that your NestJS application runs securely and efficiently, with Nginx handling traffic and optimizing <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/performance-new\" target=\"_blank\" rel=\"noopener\">performance.<\/a> If you need to scale your app in the future, you can easily adjust your server resources in AccuWeb.Cloud dashboard.<\/p>\n<div class=\"cta-btn-top-space ack-extra-image-space\">\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t<\/div>\n<div class=\"cta-btn-mob-space\"><\/div>\n","protected":false},"author":1,"featured_media":52879,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","class_list":["post-49985","faq","type-faq","status-publish","has-post-thumbnail","hentry","faq_topics-paas","faq_topics-deploy-nestjs-app-with-nginx-on-ubuntu-vps","faq_topics-kb","faq_topics-nest-js","faq_topics-product-documentation"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.10 (Yoast SEO v24.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Deploy NestJS App with Nginx on Ubuntu VPS: Step-by-Step Guide<\/title>\n<meta name=\"description\" content=\"Learn to deploy a NestJS app with Nginx on an Ubuntu VPS. Follow this step-by-step guide for a seamless deployment process.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Deploy a NestJS Application with Nginx on Ubuntu VPS?\" \/>\n<meta property=\"og:description\" content=\"Learn to deploy a NestJS app with Nginx on an Ubuntu VPS. Follow this step-by-step guide for a seamless deployment process.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps\" \/>\n<meta property=\"og:site_name\" content=\"AccuWeb Cloud\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-17T13:30:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#article\",\"isPartOf\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps\"},\"author\":{\"name\":\"Jilesh Patadiya\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58\"},\"headline\":\"How to Deploy a NestJS Application with Nginx on Ubuntu VPS?\",\"datePublished\":\"2024-12-16T13:55:50+00:00\",\"dateModified\":\"2026-02-17T13:30:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps\"},\"wordCount\":869,\"publisher\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#organization\"},\"image\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#primaryimage\"},\"thumbnailUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"inLanguage\":\"en-US\"},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps\",\"url\":\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps\",\"name\":\"Deploy NestJS App with Nginx on Ubuntu VPS: Step-by-Step Guide\",\"isPartOf\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#primaryimage\"},\"image\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#primaryimage\"},\"thumbnailUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"datePublished\":\"2024-12-16T13:55:50+00:00\",\"dateModified\":\"2026-02-17T13:30:36+00:00\",\"description\":\"Learn to deploy a NestJS app with Nginx on an Ubuntu VPS. Follow this step-by-step guide for a seamless deployment process.\",\"breadcrumb\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#primaryimage\",\"url\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"contentUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/accuweb.cloud\/resource\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Deploy a NestJS Application with Nginx on Ubuntu VPS?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#website\",\"url\":\"https:\/\/accuweb.cloud\/resource\/\",\"name\":\"AccuWeb Cloud\",\"description\":\"Cutting Edge Cloud Computing\",\"publisher\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/accuweb.cloud\/resource\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#organization\",\"name\":\"AccuWeb.Cloud\",\"url\":\"https:\/\/accuweb.cloud\/resource\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg\",\"contentUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg\",\"width\":156,\"height\":87,\"caption\":\"AccuWeb.Cloud\"},\"image\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58\",\"name\":\"Jilesh Patadiya\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g\",\"caption\":\"Jilesh Patadiya\"},\"description\":\"Jilesh Patadiya, the visionary Co-Founder and Chief Technology Officer (CTO) behind AccuWeb.Cloud. Founder &amp; CTO at AccuWebHosting.com. He shares his web hosting insights on the AccuWeb.Cloud blog. He mostly writes on the latest web hosting trends, WordPress, storage technologies, and Windows and Linux hosting platforms.\",\"sameAs\":[\"https:\/\/accuweb.cloud\/resource\",\"https:\/\/www.facebook.com\/accuwebhosting\",\"https:\/\/www.instagram.com\/accuwebhosting\/\",\"https:\/\/www.linkedin.com\/company\/accuwebhosting\/\",\"https:\/\/x.com\/accuwebhosting\",\"https:\/\/www.youtube.com\/c\/Accuwebhosting\"],\"url\":\"https:\/\/accuweb.cloud\/resource\/author\/accuwebadmin\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Deploy NestJS App with Nginx on Ubuntu VPS: Step-by-Step Guide","description":"Learn to deploy a NestJS app with Nginx on an Ubuntu VPS. Follow this step-by-step guide for a seamless deployment process.","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:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps","og_locale":"en_US","og_type":"article","og_title":"How to Deploy a NestJS Application with Nginx on Ubuntu VPS?","og_description":"Learn to deploy a NestJS app with Nginx on an Ubuntu VPS. Follow this step-by-step guide for a seamless deployment process.","og_url":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps","og_site_name":"AccuWeb Cloud","article_modified_time":"2026-02-17T13:30:36+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#article","isPartOf":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps"},"author":{"name":"Jilesh Patadiya","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58"},"headline":"How to Deploy a NestJS Application with Nginx on Ubuntu VPS?","datePublished":"2024-12-16T13:55:50+00:00","dateModified":"2026-02-17T13:30:36+00:00","mainEntityOfPage":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps"},"wordCount":869,"publisher":{"@id":"https:\/\/accuweb.cloud\/resource\/#organization"},"image":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#primaryimage"},"thumbnailUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","inLanguage":"en-US"},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps","url":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps","name":"Deploy NestJS App with Nginx on Ubuntu VPS: Step-by-Step Guide","isPartOf":{"@id":"https:\/\/accuweb.cloud\/resource\/#website"},"primaryImageOfPage":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#primaryimage"},"image":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#primaryimage"},"thumbnailUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","datePublished":"2024-12-16T13:55:50+00:00","dateModified":"2026-02-17T13:30:36+00:00","description":"Learn to deploy a NestJS app with Nginx on an Ubuntu VPS. Follow this step-by-step guide for a seamless deployment process.","breadcrumb":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#primaryimage","url":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","contentUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/accuweb.cloud\/resource\/articles\/deploy-nestjs-app-with-nginx-on-ubuntu-vps#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/accuweb.cloud\/resource\/"},{"@type":"ListItem","position":2,"name":"How to Deploy a NestJS Application with Nginx on Ubuntu VPS?"}]},{"@type":"WebSite","@id":"https:\/\/accuweb.cloud\/resource\/#website","url":"https:\/\/accuweb.cloud\/resource\/","name":"AccuWeb Cloud","description":"Cutting Edge Cloud Computing","publisher":{"@id":"https:\/\/accuweb.cloud\/resource\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/accuweb.cloud\/resource\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/accuweb.cloud\/resource\/#organization","name":"AccuWeb.Cloud","url":"https:\/\/accuweb.cloud\/resource\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/","url":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg","contentUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg","width":156,"height":87,"caption":"AccuWeb.Cloud"},"image":{"@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58","name":"Jilesh Patadiya","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g","caption":"Jilesh Patadiya"},"description":"Jilesh Patadiya, the visionary Co-Founder and Chief Technology Officer (CTO) behind AccuWeb.Cloud. Founder &amp; CTO at AccuWebHosting.com. He shares his web hosting insights on the AccuWeb.Cloud blog. He mostly writes on the latest web hosting trends, WordPress, storage technologies, and Windows and Linux hosting platforms.","sameAs":["https:\/\/accuweb.cloud\/resource","https:\/\/www.facebook.com\/accuwebhosting","https:\/\/www.instagram.com\/accuwebhosting\/","https:\/\/www.linkedin.com\/company\/accuwebhosting\/","https:\/\/x.com\/accuwebhosting","https:\/\/www.youtube.com\/c\/Accuwebhosting"],"url":"https:\/\/accuweb.cloud\/resource\/author\/accuwebadmin"}]}},"_links":{"self":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq\/49985","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/comments?post=49985"}],"version-history":[{"count":35,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq\/49985\/revisions"}],"predecessor-version":[{"id":52952,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq\/49985\/revisions\/52952"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/media\/52879"}],"wp:attachment":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/media?parent=49985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}