• Bill Clark
  • Posts
  • Cardano Node at Home: Getting Started

Cardano Node at Home: Getting Started

Part 1: Build a Cardano Node using Docker & Ubuntu Server 22.04.2 LTS

Welcome to the Cardano Node at Home guide, where you’ll learn how to set up Ubuntu Server 22.04.2 LTS on a spare PC and run a Cardano node stack using cardano-compose-stacks from Blink Labs.

By the time you’ve finished this guide, you’ll have your very own dedicated Cardano Node at home, through which you can explore and submit your own transactions to the blockchain.

Installing Ubuntu Server 22.04.2 LTS

Prerequisites

  • You are familiar with Linux or Unix-based operating systems and are at least somewhat comfortable working on a command line.

  • You have a basic understanding of what Docker and Containers are.

  • You are building your node on a spare PC, and know the hardware well enough to make basic boot config changes (booting from USB Flash Devices, setting default boot devices, etc.)

    • Virtual Machines (VMs) are out of scope for this guide, but it’s entirely possible to follow along. The example machine I’m building along with this guide is a VM.

  • Your home network provides DHCP-assigned addresses.

  • Optional, but convenient: Your router provides DNS services to your network (i.e., you can ping other computers on your local network by hostname).

Requirements

  • A spare PC with a keyboard and a monitor or a VM.

    • Recommended configuration is at least 2 CPU cores (or vCPUs), with at least 16GB RAM.

      • This should be an AMD64-based processor (i.e., not ARM-based like Raspberry Pi)

    • 1 Internal SSD or HDD, 250GB or larger

      • For ease of setup, the device should have only one internal SSD or HDD. This drive will be erased during installation of Ubuntu Server!

  • A copy of Ubuntu Server 22.04.2 LTS installer on a USB flash drive (download the ISO here)

    • Ubuntu offers several guides on creating bootable flash drives on macOS, Windows, or Ubuntu.

  • A wired network connection for your new node.

Installation Process

Connect your system to the network, connect your monitor & keyboard, then boot from your USB Flash Drive.

After your system boots from the installer, select Try or Install Ubuntu Server from the menu by hitting Enter.

Language & Keyboard Layout Selection

Now, choose English (or your preferred language) from the list and hit Enter.

You may be prompted to update to the new installer. Use the up arrow to highlight Update to the new installer, then hit Enter.

Select your keyboard layout. Use the arrow keys to navigate. Space engages the drop-down menus. After your selections are made, or to accept the defaults, use the Tab key until Done is highlighted, then hit Enter.

Installation Type Selection

Hit Enter to choose Done. We’ll use the default of Ubuntu Server here.

Networking

You should have received a DHCP address from your network, which is fine for now. Make note of the IP address, you’ll need this later. Hit Done.

For Proxy address, if you have a proxy server enter it here; if not, just hit Enter to select Done. If you have no idea what a proxy server is, you don’t have one. 🙃

Hit Enter to select the default mirror.

Disk Configuration

Use the Tab key to highlight Done here, then hit Enter.

  • We’re going to use the default, which is to use 100% of the disk we’re installing on. If you have more than one disk in your machine, you’ll see multiple disks. Select the correct disk, then highlight Done and hit enter.

Hit Enter here to select Done, accepting the defaults.

Use the Down arrow key to highlight Continue, then hit Enter. This action will overwrite anything on the disk, so be certain you’re ok with wiping that hard drive!

User Configuration

Now, we’ll enter our information, using the tab key to navigate between fields:

  • For Your name, this can be anything you’d like. I used Cardano Node for mine.

  • For Your server’s name, this should be lowercase, alphanumeric, with no spaces. The only special character allowed is a hyphen/dash ( – ). I used cardano01.

  • In Pick a username, this will be your login name. I used cardano. This can be anything you’d like, but stick to all lowercase and no spaces.

  • Finally, when you Choose a password and Confirm your password, choose something long and secure (alphanumeric, mixed case, special characters, etc.)

  • If prompted to upgrade to Ubuntu Pro, just hit Enter to continue. We’ll skip configuring Ubuntu Pro for now.

  • Highlight Done with the Tab key, then hit Enter.

If prompted to upgrade to Ubuntu Pro, just hit Enter to continue. We’ll skip configuring Ubuntu Pro for now.

OpenSSH Server & Additional Packages

Now, on this screen, we want to install OpenSSH Server, so hit the Spacebar, and you’ll see an X next to Install OpenSSH server, as shown below. Now use the Tab key to highlight Done and hit Enter.

Use the Tab key to highlight Done and hit Enter. We’ll manually install the packages we need later.

System Install & Update Process

Now, you’ll see some status messages pass by:

After a few moments, you’ll see Cancel update and reboot at the bottom. Let’s wait until the updates have completed. This could take a few minutes.

Rebooting the System

When the bottom of the screen changes to Reboot Now, use the Tab key to highlight Reboot Now, then hit Enter.

When the reboot is near complete, you’ll see a message requesting you to hit enter after removing the installation medium (the USB Flash Drive, if used). If you’re installing on a VM, just hit Enter. If you’re installing from a USB Flash Drive, disconnect that, then hit Enter.

Logging into the Server

The system will continue reloading, and you’ll see a lot of status messages like the ones above flash by. Once you get to the login screen shown below, log in with the username and password you created in Step 16.

  • If you do not see the login screen below after a few minutes, and nothing on the screen has changed, hit enter a few times, and you should see a login prompt.

Log in using the credentials you created in User Configuration.

Once logged in, you should be at a non-privileged user prompt ($).

Installing Updates

You’ll probably have additional updates available, as you can see in the image above just a few lines above the prompt.

To install updates, type sudo apt update && sudo apt -y full-upgrade and hit Enter. You’ll be prompted for your password, so enter that, then hit Enter again.

If you see a screen like the one below, just use Tab until you get to Ok, then hit Enter.

After updates are complete, you’ll be dropped back to the prompt ($).

One Final Reboot!

Now, type sudo reboot now and hit Enter (enter your login password if prompted).

Congratulations, you’ve finished installing Ubuntu Server!

Installing Docker & Additional Packages

We'll be using Docker to run our cardano-node, so first, we need to install Docker and a few additional packages to help manage Docker.

Install Docker

To install docker, follow the steps using the commands below.

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

TIP: You can preview the steps the script will perform by appending --dry-run to the end of the second command above.

When the Docker installation is complete, you'll see the results and a new command line.

Install Additional Packages

Now that Docker is installed let's install docker-compose and a couple of other packages. Hit Y to accept the install when prompted. The additional packages are docker-compose (for managing our stack), net-tools & dnsutils (both handy for troubleshooting), git (for cloning the repository), and wget (for downloading the config files).

sudo apt install docker-compose net-tools dnsutils git wget

If prompted to restart services (bright pink background again), tab down to Ok and hit Enter to continue.

Add User to Docker Group

Finally, we'll add our user account to the docker user group so we'll be able to execute docker and docker-compose commands without the use of sudo.

USER=$(whoami) sudo usermod -aG docker $USER

Parts 2 &3

In Part 2, you’ll learn how to start and monitor the node; in Part 3, you’ll learn how to send transactions through your node.