<?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>DEV Community: TurboCloud</title>
    <description>The latest articles on DEV Community by TurboCloud (@turbocloud_dev).</description>
    <link>https://dev.to/turbocloud_dev</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%2F3388871%2Fece865cd-de9f-4a1c-b748-4ddf7d809f02.jpg</url>
      <title>DEV Community: TurboCloud</title>
      <link>https://dev.to/turbocloud_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/turbocloud_dev"/>
    <language>en</language>
    <item>
      <title>Deploy Node.js app anywhere with TurboCloud</title>
      <dc:creator>TurboCloud</dc:creator>
      <pubDate>Sat, 26 Jul 2025 08:49:42 +0000</pubDate>
      <link>https://dev.to/turbocloud_dev/deploy-nodejs-app-anywhere-with-turbocloud-2pji</link>
      <guid>https://dev.to/turbocloud_dev/deploy-nodejs-app-anywhere-with-turbocloud-2pji</guid>
      <description>&lt;h4&gt;
  
  
  What You’ll Need
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A server with a public IP address, SSH access, and a fresh installation of Ubuntu 22.04. Not sure which cloud provider to use? Try DigitalOcean, Vultr, or Hetzner.&lt;/li&gt;
&lt;li&gt;A Node.js project&lt;/li&gt;
&lt;li&gt;(Optional) A custom domain
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Deployment Steps
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Create a server on your cloud provider
&lt;/li&gt;
&lt;li&gt;Create a Dockerfile (you can find an example below)&lt;/li&gt;
&lt;li&gt;Deploy the project from a local folder or GitHub/Bitbucket &lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  What You'll Get
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A deployed Node.js project without vendor lock-in
&lt;/li&gt;
&lt;li&gt;HTTPS with an auto-generated or custom domain
&lt;/li&gt;
&lt;li&gt;WAF with the default ruleset recommended by OWASP
&lt;/li&gt;
&lt;li&gt;Rate limiting
&lt;/li&gt;
&lt;li&gt;CI/CD if you deploy from GitHub or Bitbucket
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Deploying a Node.js App
&lt;/h2&gt;

&lt;p&gt;It doesn't matter whether you want to deploy your Node.js app directly from your development machine or from GitHub/Bitbucket — you should create a Dockerfile before deploying:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create a Dockerfile&lt;/strong&gt; in the project root with the following content (replace &lt;code&gt;3000&lt;/code&gt; with your app’s port number. If you use &lt;code&gt;yarn&lt;/code&gt; or another package manager, replace the &lt;code&gt;RUN ... npm ci --omit=dev&lt;/code&gt; line accordingly):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; node:lts-alpine&lt;/span&gt;

&lt;span class="c"&gt;# Use production node environment by default.&lt;/span&gt;
&lt;span class="k"&gt;ENV&lt;/span&gt;&lt;span class="s"&gt; NODE_ENV=production&lt;/span&gt;

&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /usr/src/app&lt;/span&gt;

&lt;span class="c"&gt;# Download dependencies as a separate step to take advantage of Docker caching.&lt;/span&gt;
&lt;span class="c"&gt;# Leverage a cache mount to /root/.npm to speed up subsequent builds.&lt;/span&gt;
&lt;span class="c"&gt;# Bind package.json and package-lock.json instead of copying them into this layer.&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nt"&gt;--mount&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;bind&lt;/span&gt;,source&lt;span class="o"&gt;=&lt;/span&gt;package.json,target&lt;span class="o"&gt;=&lt;/span&gt;package.json &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nt"&gt;--mount&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;bind&lt;/span&gt;,source&lt;span class="o"&gt;=&lt;/span&gt;package-lock.json,target&lt;span class="o"&gt;=&lt;/span&gt;package-lock.json &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nt"&gt;--mount&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;cache,target&lt;span class="o"&gt;=&lt;/span&gt;/root/.npm &lt;span class="se"&gt;\
&lt;/span&gt;    npm ci &lt;span class="nt"&gt;--omit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dev

&lt;span class="c"&gt;# Run the application as a non-root user.&lt;/span&gt;
&lt;span class="k"&gt;USER&lt;/span&gt;&lt;span class="s"&gt; node&lt;/span&gt;

&lt;span class="c"&gt;# Copy the rest of the source files into the image.&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . .&lt;/span&gt;

&lt;span class="c"&gt;# Expose the port that the application listens on.&lt;/span&gt;
&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; 3000&lt;/span&gt;

&lt;span class="c"&gt;# Run the application.&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["node", "src/index.js"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Deploy a Node.js App from a Local Folder
&lt;/h3&gt;

&lt;p&gt;You can deploy Node.js projects directly from a local folder on your development machine using TurboCloud:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If the project is a Git repository, TurboCloud uploads files tracked by Git (you can check which files will be uploaded using &lt;code&gt;git ls-files --recurse-submodules&lt;/code&gt;). Don’t forget to add the Dockerfile with &lt;code&gt;git add Dockerfile&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you're not using Git, all files inside the project folder will be uploaded.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now everything is ready — let’s deploy:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Run the command below in the root of your Node.js project (replace &lt;code&gt;server_ip&lt;/code&gt; with your server’s actual IP and &lt;code&gt;3000&lt;/code&gt; with the correct port, matching your Dockerfile):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://turbocloud.dev/deploy | bash &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; server_ip &lt;span class="nt"&gt;-p&lt;/span&gt; 3000
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;To use a custom domain, add the &lt;code&gt;-d&lt;/code&gt; parameter (make sure your domain’s A record points to the server's IP):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://turbocloud.dev/deploy | bash &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; server_ip &lt;span class="nt"&gt;-p&lt;/span&gt; 3000 &lt;span class="nt"&gt;-d&lt;/span&gt; yourdomain.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After deployment, you’ll receive an auto-generated URL to access your site. If you specified your own domain in step 1, you can use that instead.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;(Optional)&lt;/em&gt; Visit &lt;a href="https://console.turbocloud.dev" rel="noopener noreferrer"&gt;console.turbocloud.dev&lt;/a&gt; to manage and monitor deployments. You can add custom domains, set up load balancing across servers, and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To redeploy, just run the same command again:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://turbocloud.dev/deploy | bash &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; server_ip
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Deploy a Node.js App from GitHub / Bitbucket
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Push the Dockerfile and all necessary changes to your Git repository (GitHub and Bitbucket are supported).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SSH into a server running Ubuntu 22.04 with a public IP address, and install TurboCloud (replace &lt;code&gt;server_ip&lt;/code&gt; with your server’s actual IP; installation takes about a minute):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh root@server_ip  
curl https://turbocloud.dev/setup | bash &lt;span class="nt"&gt;-s&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After installation, visit &lt;a href="https://console.turbocloud.dev/services/new" rel="noopener noreferrer"&gt;console.turbocloud.dev&lt;/a&gt; to add and deploy your Node.js project. In the port field, enter &lt;code&gt;3000&lt;/code&gt; (or the port you configured in your Dockerfile). You can deploy projects, add custom domains, set up load balancing, and more.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




</description>
    </item>
  </channel>
</rss>
