{"id":1864,"date":"2025-06-24T08:00:00","date_gmt":"2025-06-24T05:00:00","guid":{"rendered":"https:\/\/upcloud.com\/global\/us\/resources\/tutorials\/deploying-a-node-js-application-to-upcloud-from-circle-ci\/"},"modified":"2026-04-23T14:03:56","modified_gmt":"2026-04-23T13:03:56","slug":"deploying-a-node-js-application-to-upcloud-from-circle-ci","status":"publish","type":"tutorial","link":"https:\/\/upcloud.com\/global\/resources\/tutorials\/deploying-a-node-js-application-to-upcloud-from-circle-ci\/","title":{"rendered":"Deploying a Node.js Application to UpCloud From Circle CI"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/circleci.com\/\" target=\"_blank\" rel=\"noopener\">CircleCI<\/a> and <a href=\"https:\/\/upcloud.com\/global\/\">UpCloud<\/a> make a great combination for deploying Node.js applications with speed and reliability. CircleCI offers a flexible and developer-friendly CI\/CD platform that integrates easily with your GitHub, GitLab, or Bitbucket repository, allowing you to automate builds, tests, and deployments with minimal setup. UpCloud, on the other hand, provides high-performance cloud servers with predictable pricing, an ideal hosting solution for modern web applications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, you\u2019ll learn how to configure a CircleCI pipeline to automatically deploy a Node.js application to an UpCloud server. Whether you\u2019re running a personal project or managing a production environment, this guide will help you automate your deployment process, reduce manual work, and ensure smooth, consistent application releases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why Deploy to UpCloud From Circle CI?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Deploying to UpCloud from CircleCI brings the power of continuous integration and deployment to individual developers and small teams without requiring a dedicated DevOps engineer. CircleCI is a handy tool to automate the entire deployment pipeline from pushing code to production, so you can skip the manual steps of SSHing into servers, running build commands, and restarting services. When used together with UpCloud\u2019s fast, reliable cloud infrastructure, this automation enables you to ship updates quickly and consistently while maintaining full control over your hosting environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This setup works well for startups, indie developers, and growing teams who want to spend more time building features and less time wrestling with deployment. CircleCI\u2019s seamless VCS integrations make it easy to set up custom pipelines, while UpCloud\u2019s flexible resource plans and rapid server provisioning ensure your application scales as needed. Together, they offer a streamlined, cost-effective solution for deploying modern Node.js applications with speed, stability, and minimal overhead.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Overview and Prerequisites<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, you will start by forking <a href=\"https:\/\/github.com\/krharsh17\/random-facts-generator\" target=\"_blank\" rel=\"noopener\">this GitHub repository<\/a> that has a basic Node.js app. Then, you will set up a new server on UpCloud where the app will be hosted. Next, you will deploy the app manually on the server for the first time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then, you\u2019ll connect your repository to Circle CI so that it can handle future deployments for you. In this setup, every time you make a change and push it to GitHub, Circle CI will automatically update the app on your UpCloud server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To follow along, you will need the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A GitHub account. You will use this account to fork your copy of <a href=\"https:\/\/github.com\/krharsh17\/random-facts-generator\" target=\"_blank\" rel=\"noopener\">this GitHub repository<\/a> on which you will set up the CI\/CD workflow. You will learn more about this repository shortly.<\/li>\n\n\n\n<li>A Circle CI account. You can <a href=\"https:\/\/circleci.com\/signup\/\" target=\"_blank\" rel=\"noopener\">sign up here<\/a>.<\/li>\n\n\n\n<li>An UpCloud account. You can <a href=\"https:\/\/signup.upcloud.com\/\">sign up for a free trial here<\/a>.<\/li>\n\n\n\n<li>Basic understanding of SSH. Here are a few resources to help you out:\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/upcloud.com\/global\/docs\/guides\/use-ssh-keys-authentication\/\">How to use SSH keys for authentication<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/upcloud.com\/global\/docs\/guides\/managing-ssh-keys\/\">How to manage SSH keys for Cloud Servers<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have these in place, let\u2019s now take a quick look at the Node.js app that your CircleCI pipeline will deploy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The app in the repository is a <em>random facts generator<\/em>. It has a list of facts in the source code, and it picks and returns a fact from it randomly on each API call:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">\/\/ contents of index.js\nconst express = require('express');\nconst app = express();\nconst PORT = process.env.PORT || 5001;\n\n\/\/ Array of random facts\nconst facts = [\n    \"Honey never spoils.\",\n    \"A group of flamingos is called a 'flamboyance.'\",\n    \"Bananas are berries, but strawberries aren't.\",\n    \"Octopuses have three hearts.\",\n    \"Australia is believed to have lost to emus in the Great Emu War of 1932\",\n    \"A jiffy is an actual unit of time: 1\/100th of a second.\",\n    \"Cows have best friends and get stressed when they are separated.\",\n    \"The shortest war in history lasted 38 minutes.\",\n    \"The Eiffel Tower can be 15 cm taller during the summer.\",\n    \"A small child could swim through the veins of a blue whale.\"\n];\n\n\/\/ Serve static files (HTML, CSS, JS)\napp.use(express.static('public'));\n\n\/\/ Endpoint to get a random fact\napp.get('\/random-fact', (req, res) =&gt; {\n    const randomIndex = Math.floor(Math.random() * facts.length);\n    res.json({ fact: facts[randomIndex] });\n});\n\n\/\/ Start the server\napp.listen(PORT, () =&gt; {\n    console.log(`Server is running on http:\/\/localhost:${PORT}`);\n});<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It also serves a static HTML page on its root path (\/). This HTML page contains a heading, a button to <em>generate<\/em> a random fact, a placeholder for the random fact to be displayed to the user, and a footer at the bottom of the page. Here\u2019s the source code for this page:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n    &lt;title&gt;Random Facts Generator&lt;\/title&gt;\n    &lt;style&gt;\n        body {\n            font-family: Arial, sans-serif;\n            display: flex;\n            flex-direction: column;\n            align-items: center;\n            justify-content: center;\n            height: 98vh;\n            background-color: #f5f5f5;\n        }\n        button {\n            padding: 10px 20px;\n            font-size: 16px;\n            cursor: pointer;\n        }\n        p {\n            margin-top: 20px;\n            font-size: 20px;\n            text-align: center;\n        }\n\n        #footer {\n            position: absolute;\n            bottom: 10px;\n            font-size: 0.8rem;\n        }\n    &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n\n&lt;h1&gt;Random Fact Generator&lt;\/h1&gt;\n&lt;button id=\"generate\"&gt;Get a Random Fact&lt;\/button&gt;\n&lt;p id=\"fact\"&gt;&lt;\/p&gt;\n&lt;p id=\"footer\"&gt;Made in 2024&lt;\/p&gt;\n\n&lt;script&gt;\n    document.getElementById('generate').onclick = async () =&gt; {\n        const response = await fetch('\/random-fact');\n        const data = await response.json();\n        document.getElementById('fact').innerText = data.fact;\n    };\n&lt;\/script&gt;\n\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can try running the app locally using the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\"># Clone the repo\ngit clone https:\/\/github.com\/krharsh17\/random-facts-generator\ncd random-facts-generator\n\n# Install dependencies\nyarn\n\n# Run the development server\nyarn dev<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can now go to <code>http:\/\/localhost:5001<\/code> to view the app in action:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-165-1024x588.png\" alt=\"-\" class=\"wp-image-56265\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once you click the <strong>Get a Random Fact<\/strong> button, you will, indeed, get a random fact.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-166-1024x588.png\" alt=\"-\" class=\"wp-image-56266\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure that you fork a copy of this repo to your GitHub account before moving ahead. This is important because you will need to make changes to the source code of this app to trigger the CI\/CD pipeline and update the deployed application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let\u2019s move on to setting up the UpCloud server where you will deploy this application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Setting up an UpCloud Server through <code>upctl<\/code><\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This section will walk you through creating an UpCloud server through <a href=\"https:\/\/github.com\/UpCloudLtd\/upcloud-cli\" target=\"_blank\" rel=\"noopener\">upctl<\/a>. You can find detailed instructions on how to set it up <a href=\"https:\/\/upcloud.com\/global\/docs\/guides\/get-started-upcloud-command-line-interface\/\">here<\/a> based on your operating system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have set up upctl correctly and authenticated with your UpCloud account, running the following command should print the details of your UpCloud account:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">\u2717 upctl account show\n  \n  Username: &lt;your-upcloud-username&gt; \n  Credits:  &lt;your-credits&gt;     \n  \n  Resource Limits:\n    Cores:                      100 \n    Detached Floating IPs:       10 \n    Load balancers:              50 \n    Managed object storages:     20 \n    Memory:                  307200 \n    Network peerings:           100 \n    Networks:                   100 \n    NTP excess GiB:               0 \n    Public IPv4:                 20 \n    Public IPv6:                100 \n    Storage HDD:              10240 \n    Storage MaxIOPS:          10240 \n    Storage SSD:              10240 <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now you\u2019re ready to create a new server. But before doing that, it is important to understand the various options you will need to supply to the <code>upctl create server<\/code> command.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Server Location<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019ll need to choose the physical location of your server. You should choose the location closest to you for the least latency when connecting to the server remotely.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can run <code>upctl zone list<\/code> to view a list of available zones:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">\u2717 upctl zone list\n\n ID        Description    Public \n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n au-syd1   Sydney #1      yes    \n de-fra1   Frankfurt #1   yes    \n es-mad1   Madrid #1      yes    \n fi-hel1   Helsinki #1    yes    \n fi-hel2   Helsinki #2    yes    \n nl-ams1   Amsterdam #1   yes    \n pl-waw1   Warsaw #1      yes    \n se-sto1   Stockholm #1   yes    \n sg-sin1   Singapore #1   yes    \n uk-lon1   London #1      yes    \n us-chi1   Chicago #1     yes    \n us-nyc1   New York #1    yes    \n us-sjo1   San Jose #1    yes<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Server Plan<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Next up, you\u2019ll need to choose a <em>server plan<\/em>. The server plan defines the CPU, RAM, and storage space available to your server. UpCloud provides you with a range of options from developer-focused small sizes for testing purposes and personal projects to large and cost-effective cloud native plans that unbundle storage and IPv4 addresses from the plans. You can learn more about the available plans <a href=\"https:\/\/upcloud.com\/global\/docs\/guides\/cloud-server-plans\/\">here<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can list the available server plans by running <code>upctl server plans<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">\u2717 upctl server plans\n\n  General purpose\n\n     Name                       Cores   Memory   Storage size   Storage tier   Transfer out (GiB\/month) \n    \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n     1xCPU-1GB                      1     1024             25   maxiops                            1024 \n     1xCPU-2GB                      1     2048             50   maxiops                            2048 \n     CLOUDNATIVE-1xCPU-4GB          1     4096              0                                      1024 \n     CLOUDNATIVE-1xCPU-8GB          1     8192              0                                      2048 \n     2xCPU-2GB                      2     2048             60   maxiops                            3072 \n     CLOUDNATIVE-2xCPU-4GB          2     4096              0                                      2048 \n     2xCPU-4GB                      2     4096             80   maxiops                            4096 \n     CLOUDNATIVE-2xCPU-8GB          2     8192              0                                      2048 \n     CLOUDNATIVE-2xCPU-16GB         2    16384              0                                      3072 \n     CLOUDNATIVE-4xCPU-8GB          4     8192              0                                      2048 \n     4xCPU-8GB                      4     8192            160   maxiops                            5120 \n     CLOUDNATIVE-4xCPU-16GB         4    16384              0                                      5120 \n     CLOUDNATIVE-4xCPU-24GB         4    24576              0                                      6144 \n     CLOUDNATIVE-4xCPU-32GB         4    32768              0                                      7168 \n     CLOUDNATIVE-4xCPU-48GB         4    49152              0                                     14336 \n     CLOUDNATIVE-6xCPU-16GB         6    16384              0                                      5120 \n     6xCPU-16GB                     6    16384            320   maxiops                            6144 \n     CLOUDNATIVE-6xCPU-24GB         6    24576              0                                      6144 \n     CLOUDNATIVE-8xCPU-16GB         8    16384              0                                      6144 \n     CLOUDNATIVE-8xCPU-24GB         8    24576              0                                      7168 \n     CLOUDNATIVE-8xCPU-32GB         8    32768              0                                      9216 \n     8xCPU-32GB                     8    32768            640   maxiops                            7168 \n     CLOUDNATIVE-8xCPU-48GB         8    49152              0                                     14336 \n     CLOUDNATIVE-8xCPU-64GB         8    65536              0                                     16384 \n     CLOUDNATIVE-8xCPU-96GB         8    98304              0                                     26624 \n     CLOUDNATIVE-8xCPU-128GB        8   131072              0                                     30720 \n     CLOUDNATIVE-12xCPU-24GB       12    24576              0                                      8192 \n     CLOUDNATIVE-12xCPU-32GB       12    32768              0                                      9216 \n     12xCPU-48GB                   12    49152            960   maxiops                            9216 \n     CLOUDNATIVE-16xCPU-32GB       16    32768              0                                     13312 \n     CLOUDNATIVE-16xCPU-48GB       16    49152              0                                     15360 \n     CLOUDNATIVE-16xCPU-64GB       16    65536              0                                     20480 \n     16xCPU-64GB                   16    65536           1280   maxiops                           10240 \n     CLOUDNATIVE-16xCPU-96GB       16    98304              0                                     26624 \n     CLOUDNATIVE-16xCPU-128GB      16   131072              0                                     35840 \n     CLOUDNATIVE-16xCPU-192GB      16   196608              0                                     46080 \n     CLOUDNATIVE-20xCPU-64GB       20    65536              0                                     22528 \n     CLOUDNATIVE-20xCPU-96GB       20    98304              0                                     28672 \n     24xCPU-96GB                   24    98304           1920   maxiops                           12288 \n     CLOUDNATIVE-24xCPU-256GB      24   262144              0                                     61440 \n     CLOUDNATIVE-32xCPU-64GB       32    65536              0                                     25600 \n     CLOUDNATIVE-32xCPU-128GB      32   131072              0                                     40960 \n     32xCPU-128GB                  32   131072           2048   maxiops                           24576 \n     CLOUDNATIVE-32xCPU-192GB      32   196608              0                                     51200 \n     CLOUDNATIVE-32xCPU-256GB      32   262144              0                                     66560 \n     CLOUDNATIVE-32xCPU-384GB      32   393216              0                                     76800 \n     38xCPU-192GB                  38   196608           2048   maxiops                           24576 \n     48xCPU-256GB                  48   262144           2048   maxiops                           24576 \n     CLOUDNATIVE-48xCPU-384GB      48   393216              0                                     81920 \n     CLOUDNATIVE-48xCPU-512GB      48   524288              0                                     92160 \n     CLOUDNATIVE-64xCPU-192GB      64   196608              0                                     56320 \n     CLOUDNATIVE-64xCPU-256GB      64   262144              0                                     71680 \n     CLOUDNATIVE-64xCPU-384GB      64   393216              0                                     87040 \n     64xCPU-384GB                  64   393216           2048   maxiops                           24576 \n     CLOUDNATIVE-64xCPU-512GB      64   524288              0                                     97280 \n     CLOUDNATIVE-80xCPU-512GB      80   524288              0                                    102400 \n     80xCPU-512GB                  80   524288           2048   maxiops                           24576 \n    \n  High CPU\n\n     Name                 Cores   Memory   Storage size   Storage tier   Transfer out (GiB\/month) \n    \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n     HICPU-8xCPU-12GB         8    12288            100   maxiops                            4096 \n     HICPU-8xCPU-16GB         8    16384            200   maxiops                            4096 \n     HICPU-16xCPU-24GB       16    24576            100   maxiops                            5120 \n     HICPU-16xCPU-32GB       16    32768            200   maxiops                            5120 \n     HICPU-32xCPU-48GB       32    49152            200   maxiops                            6144 \n     HICPU-32xCPU-64GB       32    65536            300   maxiops                            6144 \n     HICPU-64xCPU-96GB       64    98304            200   maxiops                            7168 \n     HICPU-64xCPU-128GB      64   131072            300   maxiops                            7168 \n    \n  High memory\n\n     Name                 Cores   Memory   Storage size   Storage tier   Transfer out (GiB\/month) \n    \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n     HIMEM-2xCPU-8GB          2     8192            100   maxiops                            2048 \n     HIMEM-2xCPU-16GB         2    16384            100   maxiops                            2048 \n     HIMEM-4xCPU-32GB         4    32768            100   maxiops                            4096 \n     HIMEM-4xCPU-64GB         4    65536            200   maxiops                            4096 \n     HIMEM-6xCPU-128GB        6   131072            300   maxiops                            6144 \n     HIMEM-8xCPU-192GB        8   196608            400   maxiops                            8192 \n     HIMEM-12xCPU-256GB      12   262144            500   maxiops                           10240 \n     HIMEM-16xCPU-384GB      16   393216            600   maxiops                           12288 \n     HIMEM-24xCPU-512GB      24   524288            700   maxiops                           12288 \n    \n  Developer\n\n     Name                 Cores   Memory   Storage size   Storage tier   Transfer out (GiB\/month) \n    \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n     DEV-1xCPU-1GB-10GB       1     1024             10   standard                           1024 \n     DEV-1xCPU-1GB            1     1024             20   standard                           1024 \n     DEV-1xCPU-2GB            1     2048             30   standard                           1536 \n     DEV-1xCPU-4GB            1     4096             40   standard                           2048 \n     DEV-2xCPU-4GB            2     4096             60   standard                           2560 \n     DEV-2xCPU-8GB            2     8192             80   standard                           3072 \n     DEV-2xCPU-16GB           2    16384            100   standard                           4096 \n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Since this is a test project, choose the first option in the <em>Developer<\/em> list (1 CPU core, 1 GB RAM, and 10 GB storage), named <code>DEV-1xCPU-1GB-10GB.<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Operating System<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After you\u2019ve decided on the hardware configuration, it\u2019s time to choose the operating system for the server. UpCloud provides you with a few popular public templates to choose from, along with the option of a wider variety of distributions <a href=\"https:\/\/upcloud.com\/global\/docs\/guides\/booting-server-live-cd\/\">through CDROMs<\/a> and the ability to download and install nearly any other possible operating system using <a href=\"https:\/\/upcloud.com\/global\/docs\/guides\/importing-server-image\/\">custom images<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can find a list of available templates <a href=\"https:\/\/upcloud.com\/global\/docs\/products\/block-storage\/templates\/\">here<\/a>. There are lots of technical considerations, opinions, and personal\/project preferences that need to be taken into account before making this choice. However, for this tutorial, you can select <strong>AlmaLinux 9<\/strong> as it is a lightweight option compared to enterprise distributions of Linux.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Note: The commands used in this tutorial have been written with AlmaLinux in mind, so using a different OS might cause you to run into unexpected issues.<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>SSH keys<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is an important part of the server setup. The chosen operating system requires you to set up an SSH key pair to be able to remotely log into the server. You need to create an SSH key pair and provide upctl with its public key. You can follow <a href=\"https:\/\/upcloud.com\/global\/docs\/guides\/use-ssh-keys-authentication\/\">this quick guide<\/a> to generate the SSH key pair for your operating system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will need to provide the location of the public key file when running the server create command.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Initialization Script<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, you have the option to add an <a href=\"https:\/\/upcloud.com\/global\/docs\/guides\/initialization-scripts\/\">initialization script<\/a> to the deployment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Normally, right after you set up a cloud server, you will want to do a few things before you deploy applications on it. This can include anything from upgrading installed packages to configuring new tools and setting up user accounts or credentials. Initialization scripts help you automate these tasks instead of doing them manually after the server deploys.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since you will be deploying a Node.js application to this server, you need to ensure that Node is installed on it. You will also need the <code>git<\/code> CLI tool to interact with the repository and pull in the updated code from upstream. And, since the project uses <code>yarn<\/code> to manage dependencies and scripts, you will need to install it as well.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To do all that, save the following script in a file named<code> init-script.sh<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">#!\/bin\/bash \nsudo dnf update -y\nsudo dnf install curl dnf-plugins-core -y\nsudo dnf module install nodejs:22 -y\nsudo dnf install git -y\nnpm install --global yarn<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Remember to add the line <code>#!\/bin\/bash<\/code> to the top of the script to make sure the server host understands what kind of interpreter it needs to run this script. You will pass the location of this <code>init-script.sh<\/code> file in the server create command.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Creating the server<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you understand all of the configuration options for the server and have collected the SSH keys and initialization script, here\u2019s the command you need to run to create the server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">upctl server create \\\n  --title \"Random Facts Generator Server\" \\\n  --zone sg-sin1 \\\n  --os \"AlmaLinux 9\" \\\n  --hostname random-facts-generator-server \\\n  --ssh-keys id_rsa_fact-gen_ci.pub \\\n  --plan DEV-1xCPU-1GB-10GB \\\n  --user-data \"$(cat init-script.sh)\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s a quick explanation of the arguments and values used:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>title<\/code>: sets the name of the server<\/li>\n\n\n\n<li><code>zone<\/code>: allows you to choose the location of the server.<\/li>\n\n\n\n<li><code>os<\/code>: allows you to choose the operating system for your server. Not including this would set up the server with Ubuntu Server 24.04<\/li>\n\n\n\n<li><code>hostname<\/code>: allows you to set up the hostname<\/li>\n\n\n\n<li><code>ssh-keys<\/code>: allows you to provide the public SSH key for the server as a file<\/li>\n\n\n\n<li><code>plan<\/code>: allows you to choose the server plan.<\/li>\n\n\n\n<li><code>user-data<\/code>: allows you to provide an initialization script to the server. This takes in a string value, so the command above has been configured to access the script stored in the file init-script through the cat command.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Once you run the command, you will receive a similar output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">\u2713 Creating server random-facts-generator-server                                                                                                              9 s\n  \n  UUID         00ac84b2-48f4-4708-b115-696c8431fab4     \n  IP Addresses 2a04:3543:1000:2310:78a8:8fff:feba:0833, \n               10.10.3.6,                               \n               213.163.194.16            <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can run <code>upctl server list <\/code>to view the list of active servers along with their state:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">\u2717 upctl server list\n\n UUID                                   Hostname                        Plan                 Zone      State   \n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n 00ac84b2-48f4-4708-b115-696c8431fab4   random-facts-generator-server   DEV-1xCPU-1GB-10GB   sg-sin1   started <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once the state is <strong>started<\/strong>, you can SSH into the server using the command <code>ssh root@&lt;server-ip-address&gt;<\/code>. You can use upctl to retrieve the server IP address by running the command <code>upctl server show &lt;server-name&gt;<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">\u2717 upctl server show random-facts-generator-server\n  \n  Common\n    UUID:          00ac84b2-48f4-4708-b115-696c8431fab4 \n    Hostname:      random-facts-generator-server        \n    Title:         Random Facts Generator Server        \n    Plan:          DEV-1xCPU-1GB-10GB                   \n    Zone:          sg-sin1                              \n    State:         started                              \n    Simple Backup: no                                   \n    Licence:       0                                    \n    Metadata:      True                                 \n    Timezone:      UTC                                  \n    Host ID:       7450935939                           \n    Server Group:                                       \n    Tags:                                               \n\n  Labels:\n\n    No labels defined for this resource.\n    \n  Storage: (Flags: B = bootdisk, P = part of plan)\n\n     UUID                                   Title                              Type   Address    Size (GiB)   Encrypted   Flags \n    \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\n     01841993-b72f-4364-9203-da3c8ad8fd6e   random-facts-generator-server-OS   disk   virtio:0           10   no          P     \n    \n  NICs: (Flags: S = source IP filtering, B = bootable)\n\n     #   Type      IP Address                                      MAC Address         Network                                Flags \n    \u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\n     1   public    IPv4: 213.163.194.16                            7a:a8:8f:ba:21:44   03ec5a97-e295-4201-a0a6-53f32748119c   S     \n     2   utility   IPv4: 10.10.3.6                                 7a:a8:8f:ba:e2:6c   0372fde3-e376-4e4c-a646-22789035cec0   S     \n     3   public    IPv6: 2a04:3543:1000:2310:78a8:8fff:feba:0833   7a:a8:8f:ba:08:33   03000000-0000-4000-8030-000000000000   S     <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019re now ready to deploy the application for the first time!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Deploying the Application for the First Time<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before you start deploying the application, make sure you have forked it to your GitHub account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once ready, SSH into the server and run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\"># Clone your forked repository\ngit clone https:\/\/github.com\/&lt;your-github-username&gt;\/random-facts-generator.git\n\n# Change into the cloned directory\ncd random-facts-generator\n\n# Install dependencies\nyarn\n\n# Start the production server\nyarn start:prod<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will start the Node.js application in a background process on the server. The Express app is configured to run on port 5001, so you should now be able to see the deployed app in action on the web address <code>http:\/\/&lt;your-server-ip&gt;:5001<\/code>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-167-1024x550.png\" alt=\"-\" class=\"wp-image-56269\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This indicates that your server and app have been deployed successfully! Now, it\u2019s time to set up an automated pipeline that redeploys your app whenever you push a new commit to the <code>main<\/code> branch.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Creating a Circle CI Pipeline<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To create the pipeline, you will first need to set up the GitHub VCS connection in your CircleCI account. To do that, first navigate to your CircleCI dashboard:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-168-1024x526.png\" alt=\"-\" class=\"wp-image-56270\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the left navigation pane, click on <strong>Organization settings<\/strong>. On the organization settings page, click on <strong>VCS connections<\/strong> in the left pane to open the VCS connection settings:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-169-1024x526.png\" alt=\"-\" class=\"wp-image-56271\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here, click on the <strong>Install Circle CI GitHub App<\/strong> button and follow the instructions to install the Circle CI app and authorize it to access your GitHub repositories.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once done, head back to the Circle CI dashboard and click on the <strong>Create a project<\/strong> card:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-170-1024x526.png\" alt=\"-\" class=\"wp-image-56273\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Projects<\/em> in Circle CI are used to represent a code repository (from GitHub or Bitbucket) for which you want to build CI pipelines. Clicking the <strong>Create a project<\/strong> card will take you through a guided process of configuring and creating a project. Name your project \u201crandom-facts-generator\u201d, the pipeline \u201cdeploy\u201d, and choose the forked GitHub repo as the repository for the Circle CI project. Choose the default options in all other steps. If you\u2019re confused at any point, Circle CI has <a href=\"https:\/\/circleci.com\/docs\/create-project\/#create-a-project\" target=\"_blank\" rel=\"noopener\">a detailed guide<\/a> to help you through the process.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Writing the Circle CI config file<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once the project is created, you will notice a new <code>.circleci\/config.yml<\/code> file in your repo. This is the file that CircleCI uses to store the configuration details of your pipeline. You need to replace the contents of this file with the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">version: 2.1\n\nexecutors:\n  node-executor:\n    docker:\n      - image: cimg\/node:16.20 # or whatever Node.js version you prefer\n\njobs:\n  deploy:\n    executor: node-executor\n    steps:\n      - checkout\n      - run:\n          name: SSH into Server and Deploy\n          command: |\n            ssh -o StrictHostKeyChecking=no $UPCLOUD_USERNAME@$SERVER_IP \\&lt;&lt; 'EOF'\n              cd ~\/random-facts-generator\n              git pull origin main\n              yarn restart:prod\n            EOF\n\nworkflows:\n  version: 2\n  deploy:\n    jobs:\n      - deploy:\n          filters:\n            branches:\n              only: main<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>version<\/code> node sets the <a href=\"https:\/\/circleci.com\/docs\/configuration-reference\/#version\" target=\"_blank\" rel=\"noopener\">CircleCI configuration version<\/a> to 2.1, which is the latest version available and offers modern features such as reusable executors, commands, and workflows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>executors <\/code>key defines custom environments in which your jobs will run. In this case, we\u2019ve defined an <a href=\"https:\/\/circleci.com\/docs\/executor-intro\/\" target=\"_blank\" rel=\"noopener\">executor<\/a> named <code>node-executor<\/code> that uses a Docker container. Executors allow you to standardize and reuse environment setups across jobs. This helps you avoid repeating image or environment definitions in every job.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The<code> jobs<\/code> node defines the individual units of work that your pipeline will run. In this file, we have a single <a href=\"https:\/\/circleci.com\/docs\/configuration-reference\/#jobs\" target=\"_blank\" rel=\"noopener\">job<\/a> called <code>deploy<\/code>. Jobs contain a series of <code>steps<\/code> that are executed in order.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Within the <code>steps<\/code> block, the <code>checkout<\/code> step pulls your project\u2019s source code from your GitHub repository into the executor environment. This is a built-in CircleCI step and is required if your job depends on your project\u2019s codebase.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, the <code>run<\/code> step performs the deployment. It SSHs into the remote UpCloud server using the <code>$UPCLOUD_USERNAME and $SERVER_IP<\/code> CircleCI environment variables (which you\u2019ll set up next). The SSH command disables strict host key checking to avoid SSH confirmation prompts. Once connected, it navigates to the application directory, pulls the latest changes from the main branch using <code>git pull<\/code>, and restarts the app with the <code>yarn restart:prod<\/code> command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, the <code>workflows<\/code> node defines how your jobs are orchestrated. This node allows you to specify the order, concurrency, and conditions under which jobs should run. In this file, we define a single workflow named <code>deploy <\/code>that includes the deploy job.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using filters, we tell CircleCI to run this job only when changes are pushed to the <code>main<\/code> branch. This ensures that deployments don\u2019t happen from feature branches or during pull requests, which is a common best practice for production environments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You need to commit this file to the GitHub repo. You might notice that CircleCI starts deploying your app but fails. This is because you haven\u2019t provided it with the SSH private key and the environment variables <code>UPCLOUD_USERNAME and SERVER_IP<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Supplying the UpCloud SSH Key<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Unlike most CI platforms, Circle CI offers <a href=\"https:\/\/circleci.com\/docs\/add-ssh-key\/\" target=\"_blank\" rel=\"noopener\">a dedicated feature to add and manage SSH keys<\/a> in your Circle CI projects. This removes the hassle of manually encoding, storing, and securing sensitive SSH keys.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To add an SSH key, head over to the <strong>Project settings<\/strong> page and select <strong>SSH Keys<\/strong> from the left pane. On this page, click the <strong>Add SSH Key<\/strong> button:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-171-1024x523.png\" alt=\"-\" class=\"wp-image-56278\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the dialog box that opens, provide the SSH private key as text and leave the hostname blank. Click on the <strong>Add SSH Key<\/strong> button:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-172-1024x523.png\" alt=\"-\" class=\"wp-image-56279\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once added, here\u2019s what it should look like:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-173-1024x523.png\" alt=\"-\" class=\"wp-image-56281\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, click on <strong>Environment Variables<\/strong> on the left pane in the same page and click the <strong>Add Environment Variable<\/strong> button to add the two environment variables needed for the pipeline (<code>SERVER_IP<\/code> and <code>UPCLOUD_USERNAME<\/code>). Here\u2019s what it should look like when done:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-175-1024x523.png\" alt=\"-\" class=\"wp-image-56286\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>SERVER_IP<\/code> is the same server IP you received when you ran the <code>upctl server create<\/code> command earlier. <code>UPCLOUD_USERNAME<\/code> needs to be set to <code>root<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once done, your pipeline is now ready to run!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Running and Testing the Pipeline<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The pipeline is now set up and working. To test it out, update something in the repo. For example, change the footer text in the <strong>public\/index.html<\/strong> file that says \u201cMade in 2024\u201d to \u201cMade in 2025\u201d, and push a commit to the main branch. You will see that a new build gets triggered automatically:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-176-1024x527.png\" alt=\"-\" class=\"wp-image-56289\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And within a few seconds, the text on your public website will be updated:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/image-177-1024x550.png\" alt=\"-\" class=\"wp-image-56291\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This means that your pipeline has been set up and connected to your UpCloud server successfully!. You can find the code used in the tutorial in <a href=\"https:\/\/github.com\/krharsh17\/random-facts-generator\/tree\/circle\" target=\"_blank\" rel=\"noopener\">the<code> circle<\/code> branch of the GitHub repository<\/a>.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Troubleshooting<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As you\u2019ve seen, CircleCI makes it easy to work with SSH keys, so you\u2019ll usually run into fewer problems than with other CI\/CD tools. On the off chance that you run into a error with the UpCloud server initialization script, such as a missing a -y flag to say yes to downloading packages or a missing or incorrect version tag for a dependency, you need to have access to the script\u2019s execution logs to be able to debug them. You can access that by SSH-ing into the server and running the command: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">sudo grep cloud-init \/var\/log\/messages<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As you\u2019ve seen, deploying a Node.js application to UpCloud using CircleCI brings together the best of automation and performance. With a simple configuration file and a few setup steps, your team (or even a solo developer) can roll out changes automatically, reduce human error, and save hours of manual work. CircleCI\u2019s easy-to-use workflows, when combined with UpCloud\u2019s high-speed infrastructure, create a reliable path to production for any modern web application.Now\u2019s a great time to put this into practice. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/signup.upcloud.com\">Sign up for an UpCloud account<\/a> and experience industry-leading cloud server performance with predictable pricing. Then, connect your GitHub or Bitbucket repo to CircleCI and set up pipelines to automate deployments with ease. As your application grows, take advantage of UpCloud\u2019s <a href=\"https:\/\/upcloud.com\/global\/docs\/guides\/scale-cloud-servers-hot-resize\/\">hot resize<\/a> feature to scale server resources up or down instantly; no downtime required!. With these tools, you\u2019re not just deploying code, you\u2019re building a faster, smarter development workflow.<\/p>\n","protected":false},"author":82,"featured_media":56297,"comment_status":"open","ping_status":"closed","template":"","community-category":[223],"class_list":["post-1864","tutorial","type-tutorial","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial\/1864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/types\/tutorial"}],"author":[{"embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/comments?post=1864"}],"version-history":[{"count":1,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial\/1864\/revisions"}],"predecessor-version":[{"id":6430,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial\/1864\/revisions\/6430"}],"wp:attachment":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/media?parent=1864"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/community-category?post=1864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}