Close this search box.

How to Install Consul Server on Ubuntu 22.04

Table of Contents

Unlocking the potential of distributed systems begins with a robust foundation, and Consul Server stands as a beacon of reliability in this realm. In this comprehensive guide, we delve into the intricate steps of installing Consul Server on Ubuntu 22.04, equipping you with the knowledge to seamlessly orchestrate and manage your network infrastructure. Whether you’re a seasoned sysadmin or a curious enthusiast, embark on this journey to harness the power of Consul Server and elevate your system architecture to new heights.



let’s dive into the Consul installation on Ubuntu 22.04 server. First, let’s begin by creating your VPSie Account if you haven’t already done so, and then proceed to install the Ubuntu 22.04 server as per your requirements.

Update the server

Now access your command terminal either directly or via SSH. Then, execute the system update command to ensure it’s up-to-date:


sudo apt update && sudo apt upgrade


Install Consul

To obtain and install Consul packages, you’ll require the GPG key utilized by Hashicorp developers for package signing. Execute the provided command to add the Hashicorp GPG Key.

wget -O- | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg


To install Consul and add the official HashiCorp Consul repository, execute the following command:

echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list


Rebuild APT packages index cache:

sudo apt update



Now, installing Consul via the APT package manager is just like any other application. Run the following command:

sudo apt install consul


To ensure that the installation has been successful on the system, let’s verify the Consul version:

consul version


Configure Consul GUI Dashboard

To access Consul’s GUI Dashboard, you’ll need to enable it in the configuration file.



Execute the subsequent command to open the file:

sudo nano /etc/consul.d/consul.hcl



Scroll down and uncomment (remove the # tags) from the following lines:

enabled = true
server = true

Save the file and then exit the editor.



To remotely access the Consul Dashboard, execute the following command to create a configuration file:

sudo nano /etc/consul.d/ui.json



Add the following lines:

"addresses": {
"http": ""


Save the file and exit.



Restart the Consul service:

sudo systemctl restart consul


Access Consul Web Interface

Please open your web browser and navigate to http://server_ip:8500 in the browser’s address bar.

Just follow the steps outlined in this guide, and you’ll have a robust infrastructure that streamlines service discovery and configuration management. With Consul, you’ll boost reliability, scalability, and overall user experience. So dive in and get your system running smoothly in no time!

Make a Comment
Share on
VPSie Cloud service

Fast and Secure Cloud VPS Service

For a month

The First 1 orders gets free discount today! Try Sign up on VPSie to get a chance to get the discount.