Code Monkey home page Code Monkey logo

getumbrel / umbrel Goto Github PK

View Code? Open in Web Editor NEW
6.4K 80.0 490.0 31.12 MB

A beautiful home server OS for self-hosting with an app store. Buy a pre-built Umbrel Home with umbrelOS, or install on a Raspberry Pi 4, Pi 5, any Ubuntu/Debian system, or a VPS.

Home Page: https://umbrel.com

License: Other

Shell 13.80% Python 1.35% CSS 0.66% HTML 2.07% JavaScript 3.24% Dockerfile 0.88% EJS 0.43% TypeScript 77.58%
bitcoin lightning docker raspberry-pi raspberrypi selfhosted self-hosting self-hosted home-server homeserver

umbrel's Introduction

umbrelOS

umbrelOS

A beautiful home server OS for self-hosting
umbrel.com »

Buy an Umbrel Home or install on:
Raspberry Pi 4 · Raspberry Pi 5 · Any x86 system


Watch the umbrelOS 1.0 reveal


At Umbrel, we believe that everyone should be able to enjoy the convenience and benefits of the cloud, without giving up ownership and control of their data.

To achieve our vision, we're building a new kind of personal server OS. Instead of paying ransoms for storing your data on someone else's computer while they auction it off to advertisers — you can now easily spin up a server and self-host your data and services at home.

Just like the cloud, but one that you own and control.



Installing umbrelOS

Umbrel App Store


Here are some of the apps available in the Umbrel App Store. For the complete list of apps, visit apps.umbrel.com.

Bitcoin & Finance

  • Bitcoin Node — Run your personal node powered by Bitcoin Core
  • Electrs — A simple and efficient Electrum Server
  • Mempool — A self-hosted explorer for the Bitcoin community
  • Bitfeed — A beautiful mempool visualizer and block explorer
  • BTCPay Server — Accept Bitcoin payments with zero fees & no 3rd party
  • RoboSats — Simple and Private Bitcoin P2P Exchange
  • Jam — Your sats. Your privacy. Your profit.
  • Samourai Server — Your private backing server for Samourai Wallet
  • Lightning Node — Run your personal Lightning Network node
  • Core Lightning — Run your personal Core Lightning node
  • Lightning Terminal — The easiest way to manage channel liquidity
  • LNBits — Multi-user wallet management system
  • Ride The Lightning — A powerful dashboard for the Lightning Network
  • ThunderHub — Take full control of your Lightning node
  • Invoice Ninja - We'll help with the invoicing

AI

  • LlamaGPT - Self-hosted, offline ChatGPT-like chatbot powered by Llama 2
  • ChatBot UI - ChatGPT but better
  • Chatpad AI - Premium quality UI for ChatGPT

Files & Productivity

  • Calibre Web — A clean web app for your eBooks
  • Nextcloud — Productivity platform that keeps you in control
  • Immich - High performance photo and video backup solution
  • PhotoPrism — Self-host your photo and video library
  • SyncThing — Peer-to-peer file synchronization between your devices
  • Vaultwarden — Unofficial Bitwarden® compatible server

Media

  • Jellyfin — The Free Software Media System
  • Lidarr — Looks and smells like Sonarr but made for music
  • Plex — Stream Movies & TV Shows
  • Prowlarr — Indexer manager/proxy for Sonarr, Radarr, and Lidarr
  • Radarr — Your movie collection manager
  • Sonarr — Smart PVR for newsgroup and bittorrent users

Networking

  • Pi-hole — Block ads on your entire network
  • Tailscale — Zero config VPN to access your Umbrel from anywhere
  • Transmission — A fast, easy and free BitTorrent client
  • Uptime Kuma — Self-hosted uptime monitoring tool
  • Urbit — Run Urbit on your Umbrel
  • Whoogle Search — A self-hosted, ad-free, privacy-respecting metasearch engine

Social

  • Element — A glossy Matrix client compatible with Synapse
  • Invidious — Browse YouTube without tracking or ads
  • LibReddit — An alternative private front-end to Reddit
  • Nitter — Browse Twitter without tracking or ads
  • Nostr Relay - Backup all your Nostr activity with your private relay
  • Synapse — Matrix reference homeserver

Automation

  • Home Assistant — Home automation that puts local control & privacy first
  • n8n - Build complex workflows, really fast
  • Node-RED — Wire together the Internet of Things

Developer Tools

  • Code Server — Run VS Code on your Umbrel
  • Gitea — A painless self-hosted Git service

If an app you're looking for isn't available on our app store yet, feel free to open an issue on the umbrel-apps respository to request it.

Building apps for umbrelOS

If you're interested in building an app for umbrelOS or packaging an existing one, please refer to the Umbrel App Framework documentation.

Setting up a development environment

With the release of umbrelOS 1.0, a lot of the underlying architecture of the project has changed. This section will be re-written with up-to-date development instructions.

License

umbrelOS is licensed under the PolyForm Noncommercial 1.0.0 license. TL;DR — You're free to use, fork, modify, and redistribute Umbrel for personal and nonprofit use under the same license. If you're interested in using umbrelOS for commercial purposes, such as selling plug-and-play home servers with umbrelOS, etc — please reach out to us at [email protected].

License

umbrel.com

umbrel's People

Contributors

aarondewes avatar aphex3k avatar apotdevin avatar bguillaumat avatar christewart avatar cryptosharks131 avatar daveajones avatar dennisreimann avatar djkazic avatar ibz avatar kibotrel avatar knorrium avatar kroese avatar louneskmt avatar lukechilds avatar markmiro avatar mayankchhabra avatar mononaut avatar mopfel-winrux avatar nevets963 avatar nickfarrow avatar nmfretz avatar nolim1t avatar ozomer avatar prusnak avatar rorp avatar scratchscratchscratchy avatar theborakompanioni avatar user411 avatar yzernik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

umbrel's Issues

Change Bitcoin Core and LND's config after IBD is complete

Proposal

Update neutrino-switcher's logic to create a more general-purpose utility (called tip-top?) that removes IBD optimizations once the sync is complete.

What it needs to do:

  • Enable Tor in bitcoin.conf (should be disabled by-default otherwise IBD will end up taking forever)
  • Reduce dbcache in bitcoin.conf to the default 300mb
  • Disable blocksonly in bitcoin.conf
  • Switch lnd's backend from neutrino to bitcoind

Stream logs

Stream logs to dashboard for easier debugging.

Keep LND wallet unlocked at all times

Situation

When running a node it is expected that channels stay open and that LND actually monitors them (right now theres no watchtowers). This allows for our umbrel network to actively route payments to each other.

Solution

  • Have an option with a warning about enabling the lnd unlock functionality
  • Use the lnd-unlock container. The container does not do anything if the unlock password file doesn't exist.

Partitioning failed on a new SSD

Tried to debug an Umbrel for a friend over TeamViewer. It wouldn't start, so I checked the rc.local status for any errors and found this:

Screen Shot 2020-07-10 at 12 20 41 AM

He used a brand new SSD, so it had no partition (no sda1, only sda).

paste (3)

External storage mounter failed on the first boot

umbrel@umbrel:~ $ systemctl status umbrel-external-storage.service
● umbrel-external-storage.service - External Storage Mounter
   Loaded: loaded (/etc/systemd/system/umbrel-external-storage.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2020-08-15 18:14:38 UTC; 25min ago
 Main PID: 361 (code=exited, status=1/FAILURE)

Aug 15 18:14:38 umbrel systemd[1]: Starting External Storage Mounter...
Aug 15 18:14:38 umbrel external storage mounter[361]: Running external storage mount script...
Aug 15 18:14:38 umbrel external storage mounter[361]: No block devices found
Aug 15 18:14:38 umbrel external storage mounter[361]: Exiting mount script without doing anything
Aug 15 18:14:38 umbrel systemd[1]: umbrel-external-storage.service: Main process exited, code=exited, status=1/FAILURE
Aug 15 18:14:38 umbrel systemd[1]: umbrel-external-storage.service: Failed with result 'exit-code'.
Aug 15 18:14:38 umbrel systemd[1]: Failed to start External Storage Mounter.
umbrel@umbrel:~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 931.5G  0 disk 
`-sda1        8:1    0 931.5G  0 part 
mmcblk0     179:0    0  29.8G  0 disk 
|-mmcblk0p1 179:1    0   256M  0 part /boot
`-mmcblk0p2 179:2    0  29.6G  0 part /

Cleanup configuration script

Allow the configuration script to be run multiple times so it can re-configure stuff instead of being a one-time deal.

Support testnet and regtest

Testnet and regtest modes would really help to quickly set up and try out new clean installations for development and testing purposes.

Use debian/ubuntu-based bitcoind and lnd images

The current bitcoind and lnd images we use are alpine-based, and we have not run into any issues...

...yet.

Be careful using Alpine, I wouldn't recommend it for mission critical stuff like Bitcoin
It's uses musl instead of glibc, so lots of software requires patching to compile properly, so then you're using non-standard untested software. Even if software compiles without patching, you can't be sure subtle libc differences won't have significant effects on runtime behaviour.

Maybe the next block hits some strange edge case that triggers a libc bug or one of your patches which effects consensus and you end up on a fork, maybe not an issue if you're just using it for testing but is a big issue if it's used in Umbrel and all Umbrel users get forked off.

The ~100MB you save is not worth the potential headaches it can cause, especially when the core of your system is a 300GB database lol.

Also consider theres a vuln in some 3rd party package, who do you thinks gonna patch it and update their repositories first, a huge project like Debian or a relatively much smaller project like Alpine.

musl is superior to glibc in theory, but in practise until most software is developed and tested against musl you're just asking for issues.

The fact that most distros ship glibc means people generally only develop/test for glibc which means compiling that code against musl could result in unpredictable behaviour.

- As penned down by @lukechilds in the team chat

Going forward, let's look into switching to ubuntu or debian-based bitcoind and lnd images, and also do a performance benchmark test comparing bitcoin sync performance on an alpine container vs an ubuntu/debian container.

Docker images incorrectly pruned by OTA updates

If script 01-run.sh fails for some reason, 03-run.sh prunes currently used Docker images :(

We should bring the pruning logic to script 01-run.sh (right after the new containers are started) so we know for sure that the pruned images are definitely going to be the ones that aren't being used.

Transport layer encryption

Hi,
I just setup umbrel with the provided documentation on a spare pc to test it out. Was a bit shocked that i did not see any HTTPS encryption. Did i do something wrong?
Reason for this is i also run Tor relay nodes and if a user connects to the provisioned tor adress the pw is sent in cleartext....

Can some one point me in the right direction what i did miss? because if this is by design (beta) no one should put any funds on it even for testing purposes.

OTA Updates

We need a way for the users to reliably update their umbrel node over-the-air.

Whenever a new release of umbrel-compose is made, it should prompt the user on his dashboard about the new update, and should only install the update after the user explicitly confirms.

The update prompt should also include a changelog listing all the changes.

My experience with mender.io didn't bear much fruit in this regard, as mender only allows a maximum of 24 hours for the update to be deployed on a device after it's been released (as their product is focused on IoT devices and not end-user interactive devices).

Nonetheless, the update scripts that I wrote when testing mender's update module can still very much be used by our custom solution.

Move and test services out without host networking

For security purposes Move and test services out without host networking.

Only services which should have external access are:

  • bitcoind port 8333
  • lnd port 9735
  • nginx port 80

What needs to happen:

  • LND v0.10.0 upgraded
  • Tor container
  • Generate tor passwords and write to lnd config file

External storage mounter fails on drives with no existing partitions

Tried running the latest release on a brand new SSD with no partitions.

Logs of umbrel-external-storage.service:

Aug 15 11:35:43 umbrel systemd[1]: Starting External Storage Mounter...
Aug 15 11:35:43 umbrel external storage mounter[378]: Running external storage mount script...
Aug 15 11:35:43 umbrel external storage mounter[378]: Found device "External USB3.0"
Aug 15 11:35:43 umbrel external storage mounter[378]: Checking if device contains an Umbrel install...
Aug 15 11:35:43 umbrel external storage mounter[378]: mount: /mnt/data: special device /dev/sda1 does not exist.
Aug 15 11:35:43 umbrel systemd[1]: umbrel-external-storage.service: Main process exited, code=exited, status=32/n/a
Aug 15 11:35:43 umbrel systemd[1]: umbrel-external-storage.service: Failed with result 'exit-code'.

SSD's partition table:

umbrel@umbrel:~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 931.5G  0 disk 

//wrong repo

wrong repository, meant to be posted in umbrel-os

Manually bind mount /sd-root in v0.1.7-beta.2

Because of #115, we need to manually bind mount the SD card root at /sd-root, or else the SD card Umbrel installation won't be upgraded. In future releases, the updated mount script will take care of doing that.

Cannot `docker compose up` on Ubuntu 20.04/Docker version 19.03.8, build afacb8b7f0

Whenever I try to do the docker compose up section of the docs, it fails with the following text:

I'm running these exact commands:

curl "https://raw.githubusercontent.com/getumbrel/umbrel/v0.1.5-beta/install-box.sh" | sh
sudo ./configure-box.sh
sudo docker-compose up -d

Creating dashboard ... done
Creating nginx     ... 
Creating manager   ... error
Creating nginx     ... done
ERROR: for manager  Cannot create container for service manager: invalid volume specification: '.:.:rw': invalid mount config for type "volume": invalid mount path: '.' mount path must be absolute

ERROR: for manager  Cannot create container for service manager: invalid volume specification: '.:.:rw': invalid mount config for type "volume": invalid mount path: '.' mount path must be absolute
ERROR: Encountered errors while bringing up the project.

Automatically configure and use swap

Create a 2GB swapfile on the SSD after the mount. This is crucial for low-RAM devices such as RPi 3 and RPi 4 /w 2GB RAM or else bitcoin crashes during the sync.

Document that Umbrel only works with UID 1000

UID 1000 is hardcoded everywhere for permissions stuff. Docker containers run rootless with UID 1000. Probably not worth supporting non-1000 UID atm but should make it clear in the docs.

Neutrino 🔁 Bitcoin Node Automatic Switching

Issue

  • The user cannot start using his lightning or bitcoin wallet until bitcoind has fully synchronized. This adds a lot of friction due to the long delay, creating a very frustrating experience.

  • If bitcoind lags behind for some reason, such as when the user had his node turned off for a few days/weeks, the same problem reoccurs.

Solution

Neutrino filters can solve this problem. We need an automatic, recurring way to switch lnd's bitcoin mode to neutrino from bitcoind as soon as bitcoind lags behind by a certain number of blocks from its best header.

Ideas

Perhaps it's a good idea to create a new service that runs 24x7 via a container called lnd-switch that uses the following environment variables:

BITCOIN_HOST: "0.0.0.0"
BITCOIN_RPC_PORT: "8332"
BITCOIN_RPC_USER: "umbrel"
BITCOIN_RPC_PASSWORD: "1234567890"
LND_CONFIG_FILE: "/home/umbrel/lnd/lnd.conf"
SWITCH_TO_NEUTRINO: "144" (switch to neutrino when bitcoind is *at least* 144 blocks behind)
SWITCH_TO_BITCOIND: "3" (switch to bitcoind when bitcoind is *at max* 3 blocks behind)

Considering the above example variables, lnd-switch will update the bitcoin node in LND_CONFIG_FILE from bitcoin.node=bitcoind to bitcoin.node=neutrino as soon as bitcoind's headers - blocks >= 144 and update it from bitcoin.node=neutrino to bitcoin.node=bitcoind as soon as bitcoind's headers - blocks <= 3. It also needs a way to restart the lnd container after every config file change.

I'm not sure if this is the right approach or not. If it is, then lnd-switch can be a tiny FOSS project on its own that (I think) many more people will find useful.

cc @nolim1t @meeDamian

Add Bitcoin's RPC user and password to compose file for middleware service

configure-box.sh should add RPC_USER and RPC_PASSWORD to the middleware service in docker-compose.yml.

middleware:
                image: getumbrel/middleware:v0.0.5
                depends_on: [ bitcoin, lnd ]
                logging: *default-logging
                restart: on-failure
                network_mode: host
                volumes:
                    - "${HOME}/lnd:/lnd"
                environment:
                    BITCOIN_HOST: "0.0.0.0"
                    RPC_PORT: "8332"
                    RPC_USER: "<bitcoind rpc username here>"
                    RPC_PASSWORD: "<bitcoind rpc password here>"
                    LND_NETWORK: "mainnet"
                    LND_HOST: "127.0.0.1"

Add more checks to the partition script to check for existing umbrel install

Can't find the old issue but this is still the case right now where if the SD card is reflashed there is a chance the install is st

I've experienced this and have seen it pop up on our telegram a few times.

Notes

  • Affects "Umbrel OS v0.0.4-beta.4", but will check master too and see if this is still the case

Create `install-dependencies` script

We have an issue currently where there is a discrepancy between dependencies installed by the Umbrel OS image builder and dependencies installed on Umbrel OS via OTA updates.

For example if we move the TTY QR script into getumbrel/umbrel we could easily forget that that OTA update also needs to install the python3-qrcode dependency via apt, otherwise all the OTA updated Umbrels will fail to boot after update.

Likewise if we add a new feature directly in getumbrel/umbrel via OTA that needs a dependency but forget to add it to getumbrel/umbrel-os then existing users will be able to update via OTA and boot fine but the Umbrel OS images will be unbootable.

This worries me a bit as it seems like it would be very easy to miss this stuff without automated E2E testing.

Ideally we'd setup E2E testing but a quick solution now to remove the duplication would be to have a script like ./scripts/umbrel-os/install-dependencies inside getumbrel/umbrel that lists all apt packages, pip3 stuff, or whatever other dependencies we need on Umbrel OS.

Any time we need a new Umbrel OS dependency we add it to that script.

Each OTA update should execute that script.

And also the Umbrel OS image builder should execute that same script.

That gives us one central place to keep track of all dependencies for Umbrel OS.

Rollback OTA update on error

Rollback update by recovering from the backup directory in case there's an error during the OTA update, or a power/network failure.

Unable to connect to LND / Bitcoin tor

Try the following hosts (mainnet)

024800ef3df70dc53bd2182dbe913a7abf8c0cb655fcc6ac494dfd250c0b74244f@n3k54z5gwxsv3nndkqwhhkcsyqilv6vrpqo4e3lzq6pkqb65xj3txjad.onion:9735

027cf9967a2d79631c665417b363d7113764bdede6c7bc21897062655448cd3581@flh6m6hd4wg4o2e5bfdelg4cobvsmcp5cxftaujsvwou5wg5iuwe5wad.onion:9735

Just use nc -x localhost:9050 onionname 9735 to test the connections, and they seem to fail

I guess if this doesn't work we might have to revert back to host networking.

Reproducing Information

LND

  1. Install and configure docker-compose framework
  2. Remove all the other services in docker-compose.yml so we just sync up lnd (and tor obviously)
  3. Try to connect to the LND from another server

Bitcoind

  1. Install and configure docker-compose framework
  2. Remove all services except for bitcoind and tor
  3. Grab the tor host docker exec -it bitcoin bitcoin-cli getnetworkinfo
  4. Try to connect to the tor host using nc -x localhost:9050 -vz onionaddress port on another host

Shutdown nginx after manager

When umbrel-dashboard polls for shutdown status, it pings umbrel-manager to determine if the system is up or not. However, if nginx shuts down before umbrel-manager, umbrel-dashboard's request can't make it, and it thus sends a false positive that the system has shut down.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.