This is a step-by-step guide to get Citadel running on a x86 architecture computer like a desktop PC, laptop or Intel NUC.
The system requirements for running a Citadel are:
• Ubuntu 22.04 / Debian 11 (or later)
• 4GB RAM (minimum)
• 1.5GHz CPU (minimum)
• 1TB SSD
You will also need a USB drive with about 4GB capacity to create a Ubuntu installation disk.
(This guide shows how to install Ubuntu on a new system. If you prefer to run Debian make sure to install version 11 or later.)
First download Ubuntu from the official website. Choose version 22.04 (or later).
Download and install Balena Etcher. You will need it to flash the ubuntu-22.04-desktop-amd64.iso
file you downloaded in the previous step onto your USB drive.
Choose the USB stick as the destination disk. This will erase all data on the USB and turn it into a bootable drive.
If you get stuck you can follow Ubuntu's step-by-step instructions: https://ubuntu.com/tutorials/install-ubuntu-desktop#3-create-a-bootable-usb-stick
After this insert the USB drive into the computer and turn it on. Follow the wizard to install your operating system.
Restart the computer, log in and connect it to your home network via Ethernet or Wi-Fi. For reliability reasons it's recommended to connect your node using a wired connection.
Now we're going to make sure the system is up-to-date. Open up a Terminal and type the following:
sudo apt update && sudo apt upgrade
After this you can install openssh
to connect to the computer remotely using a secure shell.
You'll be able to run commands like the one above without having a monitor or keyboard connected to your node.
To install openssh
use the following command:
sudo apt install openssh-server
To be able to connect to your computer over the network we need to look up it's IP address. Type the following command to find out the IP address of the machine on your home network:
ip addr show
Your local IP will look something like this: 192.168.x.xx
You should also be able to find this on the dashboard of your router (usually accessible under http://192.168.0.1/ or http://192.168.1.1/)
Now we can connect to Ubuntu using ssh
on any other device on our home network.
If you're a MacOS or Linux user open up a terminal. For Windows open the command prompt (cmd) and enter:
(Replace the placeholders with your real username and ip address)
ssh <username>@<ip-address>
Next, type 'yes' and enter your username. After this you should see the green Linux command-line.
Install all the required programs for Citadel:
sudo apt -y install git curl jq rsync fswatch python3-jsonschema python3-dacite python3-semver python3-requests python3-yaml
To install Docker run the following command:
curl -fsSL https://get.docker.com | sh
Verify that you can run docker:
docker run hello-world
You should see a message including this text:
Hello from Docker!
Simply clone Citadel's core repository into the home directory:
git clone https://github.com/runcitadel/core.git ~/citadel
And run the start script:
sudo ~/citadel/scripts/start
After this you can access Citadel through it's local IP address or the other addresses displayed by this command.
First, shut down Citadel:
sudo ~/citadel/scripts/stop
Next, create a new service file:
sudo nano /etc/systemd/system/citadel-startup.service
Add the following text to the file. Replace <username>
with your real username:
[Unit]
Description=Node Service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=forking
Restart=always
RestartSec=1
ExecStart=/home/<username>/citadel/scripts/start
ExecStop=/home/<username>/citadel/scripts/stop
[Install]
WantedBy=multi-user.target
And start the service:
sudo systemctl start citadel-startup.service
Wait for Citadel to start up fully. To confirm the new service is running correctly, log in to your Dashboard like you normally would. If everything works, enable the service to run automatically at system startup:
sudo systemctl enable citadel-startup.service
Enjoy your personal Bitcoin Lightning node.
Is it possible to run umbrel and citadel on the same machine?