nostrbird on Nostr: DIY #bitcoin #app #umbrel if have extra hw :-) summary steps ubuntu - docker - umberl ...
DIY #bitcoin #app #umbrel if have extra hw :-) summary steps
ubuntu - docker - umberl -> webUI
Ubuntu Server 20.04 CLI SSH
1 CPU & 4GB RAM minimum (more CPU helps initial sync)
1TB SSD disk minimum (600Gb for bitcoind)
Resize ubuntu-lv to 50G
Create new umbrel-lv for the remaining space and new mount /umbrel
Select 'Install OpenSSH Server'
Do NOT choose the docker feature, this will be installed manually
Reboot after security patching finishes
Login via SSH
++ Docker + Umbrel install++
sudo apt update -y
# In case you want, you can upgrade packages, but do NOT upgrade the OS level from 20.04!
# sudo apt update -y
sudo apt-get install -y fswatch jq rsync curl
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod a+x /usr/local/bin/yq
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo chown $USER:$USER /umbrel
cd /umbrel
curl https://api.github.com/repos/getumbrel/umbrel/releases/latest | grep "tarball_url" | grep -Eo 'https://[^\"]*' | xargs curl -L | tar -xz --strip-components=1
# If you want to install a specific version:
# curl -L https://github.com/getumbrel/umbrel/archive/v0.5.1.tar.gz | tar -xz --strip-components=1
sudo ./scripts/start
# Now is the time to copy over another bitcoin/blocks and bitcoin/chainstate folder before you install the Bitcoin app
# Before v0.5.0 the Bitcoin application data was stored under /umbrel/bitcoin
# Since v0.5.0 the Bitcoin application data is stored under /umbrel/app-data/bitcoin/data/bitcoin
# From the original (source) server, login to SSH and execute:
# (Source in the example is a <v0.5, adjust paths accordingly)
# rsync -azvh /umbrel/bitcoin/blocks umbrel@newservername:/umbrel/app-data/bitcoin/data/bitcoin
# rsync -azvh /umbrel/bitcoin/chainstate umbrel@newservername:/umbrel/app-data/bitcoin/data/bitcoin
# (split the commands because of the time-out in between copying when using &&)
################
# Once these files are copied over, install the Bitcoin app
++create service for auto startup++
cd /etc/systemd/system/
sudo wget https://raw.githubusercontent.com/getumbrel/umbrel/master/scripts/umbrel-os/services/umbrel-startup.service
sudo nano umbrel-startup.service
# Umbrel Startup Service
# Installed at /etc/systemd/system/umbrel-startup.service
[Unit]
Description=Umbrel Startup Service
Wants=network-online.target
After=network-online.target
Wants=docker.service
After=docker.service
# This prevents us hitting restart rate limits and ensures we keep restarting
# indefinitely.
StartLimitInterval=0
[Service]
Type=forking
TimeoutStartSec=infinity
TimeoutStopSec=16min
ExecStart=/umbrel/scripts/start
ExecStop=/umbrel/scripts/stop
User=root
Group=root
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=umbrel startup
RemainAfterExit=yes
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
++Enable automatic security patching++
sudo apt install -y unattended-upgrades apt-listchanges
sudo dpkg-reconfigure -plow unattended-upgrades
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
sudo unattended-upgrades --dry-run
++Upgrade/downgrade to a specific Umbrel version
sudo /umbrel/scripts/update/update --repo getumbrel/umbrel#v0.5.2
++Reset installation
# Please realize that you also need to backup any other configs (channel state f.e.) or whatever comes in the future.
cd /umbrel
sudo systemctl stop umbrel-startup && sudo rm -rf /umbrel/lnd/!(lnd.conf) && sudo rm -f /umbrel/db/user.json && sudo rm -f /umbrel/db/umbrel-seed/seed && sudo systemctl start umbrel-startup
# update manually to the version you want (example 0.5.0)
sudo ./scripts/update/update --repo getumbrel/umbrel#0.5.0
ubuntu - docker - umberl -> webUI
Ubuntu Server 20.04 CLI SSH
1 CPU & 4GB RAM minimum (more CPU helps initial sync)
1TB SSD disk minimum (600Gb for bitcoind)
Resize ubuntu-lv to 50G
Create new umbrel-lv for the remaining space and new mount /umbrel
Select 'Install OpenSSH Server'
Do NOT choose the docker feature, this will be installed manually
Reboot after security patching finishes
Login via SSH
++ Docker + Umbrel install++
sudo apt update -y
# In case you want, you can upgrade packages, but do NOT upgrade the OS level from 20.04!
# sudo apt update -y
sudo apt-get install -y fswatch jq rsync curl
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod a+x /usr/local/bin/yq
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo chown $USER:$USER /umbrel
cd /umbrel
curl https://api.github.com/repos/getumbrel/umbrel/releases/latest | grep "tarball_url" | grep -Eo 'https://[^\"]*' | xargs curl -L | tar -xz --strip-components=1
# If you want to install a specific version:
# curl -L https://github.com/getumbrel/umbrel/archive/v0.5.1.tar.gz | tar -xz --strip-components=1
sudo ./scripts/start
# Now is the time to copy over another bitcoin/blocks and bitcoin/chainstate folder before you install the Bitcoin app
# Before v0.5.0 the Bitcoin application data was stored under /umbrel/bitcoin
# Since v0.5.0 the Bitcoin application data is stored under /umbrel/app-data/bitcoin/data/bitcoin
# From the original (source) server, login to SSH and execute:
# (Source in the example is a <v0.5, adjust paths accordingly)
# rsync -azvh /umbrel/bitcoin/blocks umbrel@newservername:/umbrel/app-data/bitcoin/data/bitcoin
# rsync -azvh /umbrel/bitcoin/chainstate umbrel@newservername:/umbrel/app-data/bitcoin/data/bitcoin
# (split the commands because of the time-out in between copying when using &&)
################
# Once these files are copied over, install the Bitcoin app
++create service for auto startup++
cd /etc/systemd/system/
sudo wget https://raw.githubusercontent.com/getumbrel/umbrel/master/scripts/umbrel-os/services/umbrel-startup.service
sudo nano umbrel-startup.service
# Umbrel Startup Service
# Installed at /etc/systemd/system/umbrel-startup.service
[Unit]
Description=Umbrel Startup Service
Wants=network-online.target
After=network-online.target
Wants=docker.service
After=docker.service
# This prevents us hitting restart rate limits and ensures we keep restarting
# indefinitely.
StartLimitInterval=0
[Service]
Type=forking
TimeoutStartSec=infinity
TimeoutStopSec=16min
ExecStart=/umbrel/scripts/start
ExecStop=/umbrel/scripts/stop
User=root
Group=root
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=umbrel startup
RemainAfterExit=yes
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
++Enable automatic security patching++
sudo apt install -y unattended-upgrades apt-listchanges
sudo dpkg-reconfigure -plow unattended-upgrades
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
sudo unattended-upgrades --dry-run
++Upgrade/downgrade to a specific Umbrel version
sudo /umbrel/scripts/update/update --repo getumbrel/umbrel#v0.5.2
++Reset installation
# Please realize that you also need to backup any other configs (channel state f.e.) or whatever comes in the future.
cd /umbrel
sudo systemctl stop umbrel-startup && sudo rm -rf /umbrel/lnd/!(lnd.conf) && sudo rm -f /umbrel/db/user.json && sudo rm -f /umbrel/db/umbrel-seed/seed && sudo systemctl start umbrel-startup
# update manually to the version you want (example 0.5.0)
sudo ./scripts/update/update --repo getumbrel/umbrel#0.5.0