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.
Hi Guys,
I installed ubuntu 24.04 Pro and Docker too. Docker is running ok.
I tryed install citadel but I got these error below. Could anyone get a help with this?
Tks
Downloading apps...
Unable to find image 'harbor.nirvati.org/citadel/app-manager:latest@sha256:a1632e60c4a19d88dc10eff07fe0d681ca171386e335996b364620d5e31420e8' locally
docker: Error response from daemon: unknown: artifact citadel/app-manager@sha256:a1632e60c4a19d88dc10eff07fe0d681ca171386e335996b364620d5e31420e8 not found.
See 'docker run --help'.
Generated configuration successfully
Downloaded all updates
Unable to find image 'harbor.nirvati.org/citadel/app-manager:latest@sha256:a1632e60c4a19d88dc10eff07fe0d681ca171386e335996b364620d5e31420e8' locally
docker: Error response from daemon: unknown: artifact citadel/app-manager@sha256:a1632e60c4a19d88dc10eff07fe0d681ca171386e335996b364620d5e31420e8 not found.
See 'docker run --help'.
Generated configuration successfully
Updating app configuration...
Unable to find image 'harbor.nirvati.org/citadel/app-manager:latest@sha256:a1632e60c4a19d88dc10eff07fe0d681ca171386e335996b364620d5e31420e8' locally
docker: Error response from daemon: unknown: artifact citadel/app-manager@sha256:a1632e60c4a19d88dc10eff07fe0d681ca171386e335996b364620d5e31420e8 not found.
See 'docker run --help'.
Generated configuration successfully
Configuring permissions...
Configuration successful
======================================
============= STARTING ===============
============= CITADEL ================
Setting environment variables...
Starting karen...
Starting status monitors...
Starting backup monitor...
Starting decoy backup trigger...
Starting Docker services...
Traceback (most recent call last):
File "/root/citadel/scripts/../app/app-manager.py", line 197, in
with open(os.path.join(appsDir, "virtual-apps.json"), "r") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/root/citadel/app/../apps/virtual-apps.json'
[+] Running 6/23
✘ app-tor Error 2.4s
✘ tor Error 2.4s
⠼ i2p 9 layers [⠀⠀⠀⠀⠀⠀⠀⠀⠀] 0B/0B Pulling 2.4s
⠦ 213ec9aee27d Pulling fs layer 0.6s
⠦ 8b11a5890c3a Pulling fs layer 0.6s
⠦ 2991b7caceae Pulling fs layer 0.6s
⠦ 167910b7e015 Waiting 0.6s
⠦ c6e955c7c6bc Waiting 0.6s
⠦ cdb60c760b45 Waiting 0.6s
⠦ 29d40baf8aec Waiting 0.6s
⠦ f240a00e01b5 Waiting 0.6s
⠦ 2c7737e53f08 Waiting 0.6s
⠼ bitcoin 5 layers [⠀⠀⠀⠀⠀] 0B/0B Pulling 2.4s
⠦ 8a49fdb3b6a5 Waiting 0.6s
⠦ f1f5f158b8b5 Waiting 0.6s
⠦ 3150053dbe32 Waiting 0.6s
⠦ 371efd7e5100 Waiting 0.6s
⠦ 885750127e6c Waiting 0.6s
⠼ caddy Pulling 2.4s
✘ manager Error 2.4s
✘ app-3-tor Error 2.4s
✘ app-2-tor Error 2.4s
✘ dashboard Error 2.4s
Error response from daemon: unknown: artifact citadel/tor@sha256:fce68374eab2f44d0139f39b8514596ade385652f14a40dc35d66336d767561d not found
Failed to start containers
root@HP-G42:/home/btcguy# sudo ~/citadel/scripts/stop
Stopping installed apps...
Stopping Docker services...
WARN[0000] The "APP_ELECTRUM_IP" variable is not set. Defaulting to a blank string.
root@HP-G42:/home/btcguy# sudo nano /etc/systemd/system/citadel-startup.service
root@HP-G42:/home/btcguy# sudo systemctl start citadel-startup.service
Job for citadel-startup.service failed because the control process exited with error code.
See "systemctl status citadel-startup.service" and "journalctl -xeu citadel-startup.service" for details.
root@HP-G42:/home/btcguy# sudo systemctl enable citadel-startup.service
Created symlink /etc/systemd/system/multi-user.target.wants/citadel-startup.service → /etc/systemd/system/citadel-startup.service.
root@HP-G42:/home/btcguy#