File: README.md
Installing umbrelOS
umbrelOS is designed for the Umbrel Pro and Umbrel Home, where it includes first-class support for all features. On other devices (like Raspberry Pi or x86 systems), itβs freely available with core functionality, but support and feature availability are best-effort due to hardware differences.
For a detailed feature breakdown, see our comparison guide.
Installation guides
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.
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].
File: containers/tor/README.md
βοΈ Tor
A simple Docker image for Tor
π Build Tor Docker image
Build
docker build -t getumbrel/tor .Run
docker run --rm -u 1000:1000 -e HOME=/tmp getumbrel/torFile: containers/app-proxy/README.md
βοΈ App Proxy
App-proxy is a transparent HTTP proxy to add authentication to Umbrel apps. Every HTTP request and Websocket connection goes through the proxy and each request has the session token checked for validity. The session token is set via App-auth. It runs by-default as a containerized service.
π Getting started
If you are looking to run Umbrel on your hardware, you do not need to run this service on it's own. Just download Umbrel OS and you're good to go.
π Running app-proxy
Make sure umbrel-manager and app-auth are running and available.
Development and testing
cd $UMBREL_ROOT/containers/app-proxy/test
./test.sh docker-compose.app1.ymlWithin the test directory there are several test apps to test different functionality such as Websocket and SSE with the proxy.
Environment variables (dev/testing)
The following environment variables are set in .env file of the project's root:
| Variable | Description | Default |
|---|---|---|
LOG_LEVEL |
Log level for the proxy (http-proxy-middleware) |
info |
PROXY_PORT |
HTTP proxy container port | 4000 |
PROXY_AUTH_ADD |
true/false as to whether the app should be protected with authentication |
true |
PROXY_AUTH_WHITELIST |
A comma seperated list of paths that are whitelisted (e.g. /public/*) |
|
PROXY_AUTH_BLACKLIST |
A comma seperated list of paths that are whitelisted (e.g. /admin/*,/api/*) |
|
APP_HOST |
App's frontend container hostname/IP | |
APP_PORT |
App's frontend container port | |
APP_MANIFEST_FILE |
Location of app's manifest file | /extra/umbrel-app.yml |
UMBREL_AUTH_PORT |
App-auth's exposed (port-forwarded) port | 2000 |
UMBREL_AUTH_SECRET |
A shared secret for manager, app-auth and app-proxy | umbrel |
UMBREL_AUTH_HIDDEN_SERVICE_FILE |
Location of app-auth's Tor HS hostname | /var/lib/tor/auth/hostname |
MANAGER_IP |
Umbrel's manager IP | 10.21.21.4 |
MANAGER_PORT |
Umbrel's manager container port | 9005 |
File: containers/app-auth/README.md
βοΈ App Auth
App-auth is a simple authentication and redirection system for Umbrel apps. It ensures (where applicable) that apps are password (and OTP) protected. It runs by-default as a containerized service.
π Getting started
If you are looking to run Umbrel on your hardware, you do not need to run this service on it's own. Just download Umbrel OS and you're good to go.
π Running app-auth
Make sure umbrel-manager are running and available.
Development and testing
cd $UMBREL_ROOT/containers/app-auth/test
./test.shEnvironment variables (dev/testing)
The following environment variables are set in .env file of the project's root:
| Variable | Description | Default |
|---|---|---|
PORT |
Web server port within container | 2000 |
UMBREL_AUTH_SECRET |
A shared secret for manager, app-auth and app-proxy | umbrel |
MANAGER_IP |
Umbrel's manager IP | 10.21.21.4 |
MANAGER_PORT |
Umbrel's manager container port | 9005 |
File: packages/ui/app-auth/README.md
Local testing
Make sure umbreld is running
cd packages/umbreld
npm run devThen in another terminal
cd packages/ui
pnpm run app-auth:devGo to localhost:3001 and make sure you're logged out.
Then, assuming transmission is installed and running, open:
http://localhost:2001/app-auth/?origin=host&app=transmission&path=%2Ftransmission%2Fweb%2F
In production, it would be:
http://localhost:2000/?origin=host&app=transmission&path=%2Ftransmission%2Fweb%2F
Login with password and 2fa should work and you should be redirected to the right page.
File: packages/ui/src/routes/README.md
Non-route files and folder should be prefixed with an underscore. This is to prevent confusion.
File: packages/ui/README.md
umbrelOS UI
Getting umbrelOS running locally
Prerequisites
npm and pnpm is installed.
First install pnpm. One way is via brew install pnpm on mac, assuming you have homebrew installed.
Clone the repo and checkout the `mark` branch
git clone -b mark [email protected]:getumbrel/private-umbrel.git
Go into the repo
cd private-umbrel
Get frontend running
cd packages/uipnpm installpnpm run dev
Get backend running
- Get back to the root of the repo and
cdinto umbreld:cd packages/umbreld - Make the dir for the data:
mkdir data npm installnpm run dev
Sharing semi-publicly (on Mac)
- Get the CLI
- Add this to your
.zshrcor.bashrc:
alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale"- Run
tailscale serve:
tailscale serve http:3000 / http://127.0.0.1:3000- For production:
tailscale serve http:4000 / http://127.0.0.1:4000Running on HTTP for now. HTTPS would be a bit more complicated. The prod build is especially important for getting a true sense of performance on mobile since the dev build will have extra cruft.
Decisions / common patterns
`keyBy`
Using remeda instead of lodash because it's more typesafe. Lodash keyBy adds 14kb after minifcation and doesn't return proper types.
`foobarDescription` format for static data
For lots of static data we want to maintain order and have it indexed. For a nav menu, we want a slug and a string for each element. We call them descriptions if it's an array with each element having an id and label. So we do this:
const navDescriptions = [
{
id: 'home',
label: 'Home'
}
{
id: 'about',
label: 'About'
}
] as const // <-- important
const navDescriptionsKeyed = keyBy(navDescriptions, 'id')Adding view transition support to elements
EX:
BoxYou can then search the repo for viewTransitionName to find them all
Event handler naming in React components
Use onFooBarClick rather than onClickFooBar
No barrel files
Vite doesn't like them. Haven't tested how bad they are for performance, though.
https://vitejs.dev/guide/performance#avoid-barrel-files
tRPC
Prefer trpcReact over trpcClient because it lets you manage error and loading state, caching, and invalidation. More info here: https://trpc.io/docs/client/vanilla#when-not-to-use-the-vanilla-client
TROUBLESHOOTING
TypeScript errors in code that don't make sense in VSCode
Restarting the TS server via the command palette fixes it. I haven't run into a situation where this doesn't fix it.
File: scripts/backup/README.md
Automatic Encrypted Backups
The backups are encrypted client side before being uploaded over Tor and are padded with random data. Backups are made immediately as soon as the channel state changes. However, Umbrel also makes decoy backups at random intervals to prevent timing-analysis attacks.
These features combined ensure that the backup server doesn't learn any sensitive information about the user's Umbrel.
- The IP address of user is hidden due to Tor.
- User's channel data are encrypted client side with a key only known to the Umbrel device.
- Random interval decoy backups ensure the server can't correlate backup activity with channel state changes on the Lightning network and correlate a backup ID with a channel pubkey.
- Random padding obscures if the backup size has increased/decreased or remains unchanged due to it being a decoy.
Due to the key/id being deterministically derived from the Umbrel seed, all that's needed to fully recover an Umbrel is the mnemonic seed phrase. Upon recovery the device can automatically regenerate the same backup id/encryption key, request the latest backup from the backup server, decrypt it, and restore the user's settings and Lightning network channel data.
There is currently no way to disable backups or recover from them in the dashboard yet. Both of these features will be introduced in the coming updates.