<?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: Max Scott</title>
    <description>The latest articles on DEV Community by Max Scott (@max_scott_185dee5c05ef192).</description>
    <link>https://dev.to/max_scott_185dee5c05ef192</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4052137%2Fb926d827-8803-4da3-8f30-316220687952.jpg</url>
      <title>DEV Community: Max Scott</title>
      <link>https://dev.to/max_scott_185dee5c05ef192</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/max_scott_185dee5c05ef192"/>
    <language>en</language>
    <item>
      <title>How to Deploy a VPS</title>
      <dc:creator>Max Scott</dc:creator>
      <pubDate>Wed, 29 Jul 2026 01:00:37 +0000</pubDate>
      <link>https://dev.to/max_scott_185dee5c05ef192/how-to-deploy-a-vps-3i51</link>
      <guid>https://dev.to/max_scott_185dee5c05ef192/how-to-deploy-a-vps-3i51</guid>
      <description>&lt;p&gt;This is a tutorial about how to set up a VPS on Linode. By the end, you should be able to "spin up" a server that is ready to serve your applications to the world!&lt;/p&gt;

&lt;p&gt;When things go wrong, don't forget to take a step back and think about what you're doing (beyond just copying and pasting commands). See if there are things you can do to verify the previous steps you have taken worked and read the documentation. Remember, fixing unexpected problems is a part of the process.&lt;/p&gt;

&lt;p&gt;The first step to self hosting a project is to get a virtual privat server to deploy on. I use Linode because it's cheap and has a good CLI tool. You can set up your projects on most any VPS, and the steps will be mostly the same, but beginners may choose to use Linode and follow these steps exactly for the first time.&lt;/p&gt;

&lt;p&gt;I will use the CLI because it's much easier to write down a list of commands to run and copy and paste them later than to remember which buttons to click. It will also help with automating the process or creating a VPS witch you may want one day.&lt;/p&gt;

&lt;p&gt;The CLI docs are here: &lt;a href="https://github.com/linode/linode-cli/wiki/Installation" rel="noopener noreferrer"&gt;https://github.com/linode/linode-cli/wiki/Installation&lt;/a&gt;&lt;br&gt;
and the GitHub link: &lt;a href="https://github.com/linode/linode-cli" rel="noopener noreferrer"&gt;https://github.com/linode/linode-cli&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Your OS
&lt;/h2&gt;

&lt;p&gt;If you are using Windows, I strongly recommend using WSL (Windows Subsystem for Linux). It will let you use Linux commands from your Windows computer.&lt;br&gt;
Here are the docs from Microsoft: &lt;a href="https://learn.microsoft.com/en-us/windows/wsl/install" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/windows/wsl/install&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you are useing macOS or Linux, the commands should be the same as what I use here.&lt;/p&gt;
&lt;h2&gt;
  
  
  SSH keys
&lt;/h2&gt;

&lt;p&gt;After you create the VPS, you will need to connect to it so you can run your application on it. For this, you will need SSH keys so the server knows who you are. So let's create some now!&lt;/p&gt;

&lt;p&gt;Create ssh keys with these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; ed25519 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"your_email@example.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can look at the key to make sure it was created:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.ssh/id_ed25519.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: The ssh key is like a password. Don't share it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Set up the CLI
&lt;/h2&gt;

&lt;p&gt;Now that you have your ssh keys, we can work on getting the VPS. First, go to &lt;a href="https://www.linode.com/" rel="noopener noreferrer"&gt;Linode&lt;/a&gt; and create an account.&lt;/p&gt;

&lt;p&gt;Then go to your terminal.&lt;/p&gt;

&lt;p&gt;Install the CLI tool:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip3 &lt;span class="nb"&gt;install &lt;/span&gt;linode-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then configure the tool&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;linode-cli configure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will open a browser and ask you to log in with the account you created.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using the CLI to create the VPS
&lt;/h2&gt;

&lt;p&gt;Linode calls a VPS a "linode".&lt;br&gt;
The base command you will use is &lt;code&gt;linode-cli&lt;/code&gt;. Commands that have to do with linodes(VPSs) will be followed by the &lt;code&gt;linodes&lt;/code&gt; sub-command and then any other arguments you need to pass. So the commands you will use will look something like &lt;code&gt;linode-cli linodes do-something&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When creating a VPS you will need to say what region it should be in and what type of VPS it is. The region is where the server is physically located in the world. The type determines how much RAM and CPU you will get (more RAM costs more money).&lt;/p&gt;

&lt;p&gt;You will also want to provide the image and authorized_keys. The image is the operating system the VPS will use, and the authorized_keys is the ssh key we created before.&lt;/p&gt;

&lt;p&gt;To see the VPSs (Linodes) use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;linode-cli linodes list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see that you have no VPSs yet.&lt;/p&gt;

&lt;p&gt;To see the possible regions, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;linode-cli regions list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: We use &lt;code&gt;regions&lt;/code&gt; not &lt;code&gt;linodes&lt;/code&gt; because the possible regions a VPS can be in are separate from the VPS itself.&lt;/p&gt;

&lt;p&gt;To see the possible types, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;linode-cli linodes types
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, I'll use&lt;br&gt;
us-lax&lt;br&gt;
g6-nanode-1&lt;/p&gt;

&lt;p&gt;The command to create a VPS is &lt;code&gt;linode-cli linodes create&lt;/code&gt; followed by all the parameters you want to pass:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;linode-cli linodes create &lt;span class="nt"&gt;--type&lt;/span&gt; g6-nanode-1 &lt;span class="nt"&gt;--region&lt;/span&gt; us-lax &lt;span class="nt"&gt;--image&lt;/span&gt; linode/ubuntu24.04 &lt;span class="nt"&gt;--label&lt;/span&gt; project1 &lt;span class="nt"&gt;--authorized_keys&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.ssh/id_ed25519.pub&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note for the curious:&lt;br&gt;
Using &lt;code&gt;$(command)&lt;/code&gt; evaluates a command, letting you use it as input for another command. So $(cat ~/.ssh/id_ed25519.pub) gets turned into the ssh key we created.&lt;/p&gt;

&lt;p&gt;Now you can look at your linodes again and see what has been created. You should see the new linode, along with its ip, id, and status. If the status says pending or creating, just wait and run the command again. It could take a few minutes.&lt;/p&gt;
&lt;h2&gt;
  
  
  Connection to the server
&lt;/h2&gt;

&lt;p&gt;To ssh into your server, use the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh root@server-ip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where server-ip is the ip of your server (3-digit numbers separated by dots).&lt;/p&gt;

&lt;p&gt;You will need to type yes, then you will be connected to the VPS terminal.&lt;/p&gt;

&lt;p&gt;You can try running &lt;code&gt;htop&lt;/code&gt; to see cpu and ram usage if you want.&lt;/p&gt;

&lt;p&gt;To keep your site up you will need to continue to pay linode 5$/month. If you are just testing, you will want to delete the VPS to save money. To do this, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;linode-cli linodes delete vps-id
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where vps-id is the id of you VPS, witch you can get from listing the VPSs you have.&lt;/p&gt;

&lt;p&gt;Congratulations! You now know how to create a VPS that's ready to host your applications.&lt;/p&gt;

&lt;p&gt;shameless plug: If you want personal tutoring on anything I write about (or if you want to hire me as a dev) you can contact me at &lt;a href="mailto:gaspersscottma@gmail.com"&gt;gaspersscottma@gmail.com&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;my personal website: &lt;a href="https://max-gaspers-scott.team-stingray.com/" rel="noopener noreferrer"&gt;https://max-gaspers-scott.team-stingray.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>selfhosting</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
