Skip to content

Instantly share code, notes, and snippets.

View mayankchhabra's full-sized avatar
☂️
Focusing

Mayank Chhabra mayankchhabra

☂️
Focusing
View GitHub Profile
@mayankchhabra
mayankchhabra / cloudflare-ntp.sh
Last active April 21, 2024 14:32
Use Cloudflare NTP server on umbrelOS
#!/bin/bash
# Ensure the script is run as root
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
echo "Current date is: $(date -R)"
# Update packages
@mayankchhabra
mayankchhabra / sh
Created August 2, 2023 11:54
Umbrel Home factory reset
cd ~ && sudo ~/umbrel/scripts/stop && sudo rm -rf ~/umbrel && curl -L https://umbrel.sh | bash -s -- --no-install-deps --no-install-start-script && sed -i 's/^check_umbrel_os$/#check_umbrel_os/g' /home/umbrel/umbrel/scripts/umbrel-os/change-password && sed -i 's/if \[\[ -z "${UMBREL_OS:-}" \]\]; then/if [[ -z "${UMBREL_OS:-}" ]] \&\& false; then/g' /home/umbrel/umbrel/scripts/umbrel-os/status-server/set-status && sed -i 's/if \[\[ -z "${UMBREL_OS:-}" \]\]; then/if [[ -z "${UMBREL_OS:-}" ]] \&\& false; then/g' /home/umbrel/umbrel/scripts/umbrel-os/status-server/setup-iptables && sed -i 's/^check_umbrel_os$/#check_umbrel_os/g' /home/umbrel/umbrel/scripts/umbrel-os/service-monitor

Step 1. SSH into your Umbrel

Open the “Terminal” app on Mac/Linux, or “PowerShell” on Windows and run this:

ssh umbrel@umbrel.local

It will prompt for a password, enter your Umbrel's password.

@mayankchhabra
mayankchhabra / umbrel-ubuntu-20-04-x86.md
Last active June 23, 2023 14:28
Installing Umbrel on Ubuntu 20.04 x86

Install Umbrel v0.3.5

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo sysctl vm.swappiness=10
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
sudo sysctl vm.vfs_cache_pressure=50
@mayankchhabra
mayankchhabra / umbrel-offchain-recovery.md
Last active February 13, 2021 19:58
Umbrel off-chain recovery with channel backup file

Off-chain recovery for Umbrel OS (Raspberry Pi installs)

Once you’ve restored from the 24 words, it might take a few minutes to a few hours for it to scan all of your previous Bitcoin (on-chain) transactions and balances. Meanwhile, here's how you can restore the funds in your Lightning channels.

Step 1. Copy over the channel backup file from your computer to your Umbrel.

Open the “Terminal” app on Mac/Linux, or “PowerShell” on Windows and run this:

@mayankchhabra
mayankchhabra / Umbrel-Odroid-H2.md
Last active December 1, 2020 15:31
Running Umbrel on Odroid-H2 with Ubuntu 18.04

After you’ve flashed Ubuntu 18.04 on your microSD card and plugged it into your Odroid H2 board, connect the SSD, ethernet and power supply to it. Turn it on and SSH into your system.

Step 1. Update packages

sudo apt-get update
sudo apt-get upgrade

Step 2. Change system’s hostname to “umbrel”

Keybase proof

I hereby claim:

  • I am mayankchhabra on github.
  • I am mayankchhabra (https://keybase.io/mayankchhabra) on keybase.
  • I have a public key ASBzfoYwFjR4X4exsjNRfsLsHhR2mEvGyulWWadW91kr9Ao

To claim this, I am signing this object: