{"id":931,"date":"2025-06-12T08:01:27","date_gmt":"2025-06-12T13:01:27","guid":{"rendered":"https:\/\/wp.jkhayer.us\/?p=931"},"modified":"2025-06-12T08:01:27","modified_gmt":"2025-06-12T13:01:27","slug":"how-to-create-a-2-node-cluster-in-proxmox","status":"publish","type":"post","link":"https:\/\/wp.jkhayer.us\/?p=931","title":{"rendered":"How to Create a 2-Node Cluster in Proxmox"},"content":{"rendered":"\n<p>In this tutorial, we\u2019re going to look at how to create a 2-node cluster in Proxmox. There is so much functionality that you can gain by configuring a cluster in Proxmox, but in order for it to work properly, there really needs to be three full nodes for quorum.<\/p>\n\n\n\n<p>While three nodes are ideal, many users will be able to run all of their services on two nodes, and adding a third device can increase the overall costs for the device and the electricity costs of running it 24\/7. In situations like this, creating a 2-node cluster makes sense, but you really need a third&nbsp;<em>vote&nbsp;<\/em>in order to ensure that everything works properly.<\/p>\n\n\n\n<p>The third vote is&nbsp;<em>extremely&nbsp;<\/em>important in this, as it will ultimately determine which node is down or disconnected (as two nodes will basically be able to vote against each other).<\/p>\n\n\n\n<p><em>Some links below are Amazon affiliate links which means that I earn a percentage of each sale at no cost to you. Thank you for your support.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Should You Use as a QDevice?<\/h2>\n\n\n\n<p>We\u2019ll be configuring a QDevice in this tutorial for Quorum.&nbsp;<a href=\"https:\/\/pve.proxmox.com\/wiki\/Cluster_Manager#_quorum\" target=\"_blank\" rel=\"noreferrer noopener\">Quorum<\/a>&nbsp;is used to ensure that most of the nodes in a cluster are online, with the overall goal being to have three total votes. The QDevice we\u2019ll be setting up acts as the third vote without actually running the&nbsp;<a href=\"https:\/\/www.wundertech.net\/proxmox-ve-8-quick-upgrade-steps-best-features\/\">Proxmox OS<\/a>.<\/p>\n\n\n\n<p>The steps below can run on any Debian-based device, but we\u2019ll be using a&nbsp;<a href=\"https:\/\/geni.us\/h8FPS\" target=\"_blank\" rel=\"noreferrer noopener\">Raspberry Pi<\/a>&nbsp;specifically because it\u2019s one of the cheapest options you can use. Remember, you don\u2019t need a Raspberry Pi, but you&nbsp;<em>do&nbsp;<\/em>need it to be a separate device from the two Proxmox nodes, so any Linux system should work.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wundertech.net\/wp-content\/uploads\/2023\/11\/image-24.png\" alt=\"how to configure a 2-node cluster in proxmox\" class=\"wp-image-18126\"\/><\/figure>\n\n\n\n<p>This ensures that if one of the two devices goes down, this device will stay up to vote and maintain Quorum.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Video Tutorial on Creating a 2-Node Proxmox Cluster<\/h2>\n\n\n\n<p>We created a step-by-step video tutorial that highlights how to create a 2-node Proxmox Cluster, but refer to the commands below for reference.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/youtube.com\/watch?v=VqyqsKUawRI%3Ffeature%3Doembed\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How to Create a 2-Node Cluster in Proxmox<\/h2>\n\n\n\n<p>Before you look at the steps below, you need to&nbsp;<a href=\"https:\/\/www.wundertech.net\/how-to-set-up-a-cluster-in-proxmox\/\">configure the Proxmox Cluster.<\/a>&nbsp;This is the most important step, but rather than using three nodes, you\u2019ll stop at two. The steps below will configure the QDevice, which will act as the third vote.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Configure Corosync on the QDevice<\/h3>\n\n\n\n<p>1. After configuring the Raspberry Pi OS, run the command below to access the SSH configuration and permit login for root. This will allow you to SSH into the Raspberry Pi at a later step.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/ssh\/sshd_config<\/code><\/pre>\n\n\n\n<p>In the configuration file, uncomment (by removing the # symbol) the line below, then restart the SSH service. Please note, we\u2019re adding&nbsp;<strong>yes<\/strong>&nbsp;so that we can log in with a password.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PermitRootLogin yes\nsudo systemctl restart sshd<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wundertech.net\/wp-content\/uploads\/2023\/11\/image-15.png\" alt=\"permitting root login with the raspberry pi.\" class=\"wp-image-15216\"\/><\/figure>\n\n\n\n<p>2. Now that we\u2019ve permitted root, you can install the two necessary components by running the command below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install corosync-qnetd -y &amp;&amp; sudo apt install corosync-qdevice -y<\/code><\/pre>\n\n\n\n<p>3. After the packages are installed, we need to modify the root user\u2019s password by running the command below and setting a password.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo passwd root<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Configuring Both Nodes in Proxmox<\/h3>\n\n\n\n<p>Now that we\u2019ve configured the Raspberry Pi (or whatever device you\u2019re using), we need to add this device to both Nodes. Before you can do that, you have to install this package&nbsp;<strong>on each node<\/strong>&nbsp;by accessing the&nbsp;<strong>shell&nbsp;<\/strong>and running the command below. After that\u2019s done, you can add the device below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install corosync-qdevice<\/code><\/pre>\n\n\n\n<p>1. Open Proxmox, select the first Node, and then open the&nbsp;<strong>Shell&nbsp;<\/strong>for that node. Run the command below, substituting the IP address of the device we configured above.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvecm qdevice setup &#91;IP ADDRESS]<\/code><\/pre>\n\n\n\n<p>After the device connects, you\u2019ll have to sign in to it using the&nbsp;<strong>root&nbsp;<\/strong>password for your QDevice. As soon as you do, it\u2019ll be configured on that device.<\/p>\n\n\n\n<p>2. After you do, you can run the command below to list out the nodes, and you should see one listed as&nbsp;<strong>Qdevice<\/strong>. This will be the device that will act as the third vote. You&nbsp;<em>do not&nbsp;<\/em>need to run this on both nodes, but I\u2019d suggest checking both to ensure they display the QDevice.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvecm nodes<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wundertech.net\/wp-content\/uploads\/2023\/11\/image-17.png\" alt=\"running the command to see the proxmox nodes.\" class=\"wp-image-15218\"\/><\/figure>\n\n\n\n<p>At this point, the nodes are configured, and the Raspberry Pi will act as the final vote, so if one of the Proxmox nodes goes down, everything will continue to function as expected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Migrating VMs or Configuring High Availability<\/h2>\n\n\n\n<p>At this point, your cluster is configured, and migrating VMs will work, as well as configuring high availability. However, high availability requires shared storage or VM replication.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.wundertech.net\/wp-content\/uploads\/2023\/11\/image-23.png\" alt=\"vm replication\" class=\"wp-image-18125\"\/><\/figure>\n\n\n\n<p>Both are solid options, but your requirements will determine which makes the most sense. Check out our article on&nbsp;<a href=\"https:\/\/www.wundertech.net\/how-to-set-up-a-cluster-in-proxmox\/#Proxmox_High_Availability_HA\">high availability<\/a>&nbsp;or&nbsp;<a href=\"https:\/\/www.wundertech.net\/proxmox-replication\/\">replication<\/a>&nbsp;to implement either option.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion &amp; Final Thoughts: Should You Use a 2-Node Cluster?<\/h2>\n\n\n\n<p>Setting up a 2-node Cluster in Proxmox simplifies everything as you may not need a third device. However, utilizing a cheap Raspberry Pi and configuring Quorum will ensure that you have three votes at all times, and your Proxmox cluster will function the same way with only two nodes, as a fully functional three-node system would.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we\u2019re going to look at how to create a 2-node cluster in Proxmox. There is so much<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-931","post","type-post","status-publish","format-standard","hentry","category-proxmox"],"_links":{"self":[{"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/posts\/931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=931"}],"version-history":[{"count":1,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/posts\/931\/revisions"}],"predecessor-version":[{"id":933,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=\/wp\/v2\/posts\/931\/revisions\/933"}],"wp:attachment":[{"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jkhayer.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}