Hey Jimmy, stoked to hear that you’re digging the convenience of the one-click install even as a coder.
Have you played around with switching networks in the Bitcoin Node app’s UI yet? This, in combination with running multiple umbrelOS instances (instead of trying to run multiple nodes on the same instance), is probably the easiest way to do what you’re trying to do without having to mess around with portainer, docker-in-docker, stripping out our app proxy, and translating environment variables.
To switch networks:
-
Go to the Bitcoin Node app, click the three dots in the upper right corner of the app, and select Advanced Settings.
-
In the “Network Selection” section, choose
the network you want to switch to and then click “Save and restart bitcoin node”.
-
Your node will now be running on the network you chose (e.g., testnet). Data is persisted no matter which network you are on, so you don’t have to modify any of the data directories or anything like that.
-
The main data directory on the host machine for the bitcoin node app is
~umbrel/app-data/bitcoin/data -
bitcoind data is one level deeper at
~umbrel/app-data/bitcoin/data/bitcoin -
Then it just follows the standard bitcoin data directory structure from there. Writing this bit for others who make their way to this post: your mainnet block data is at
~umbrel/app-data/bitcoin/data/bitcoin/blocks, but any other network gets its own subdirectory… signet for example would be at~umbrel/app-data/bitcoin/data/bitcoin/signet/blocks.
- Restart umbrelOS to make sure dependent apps are running on the correct network.
-
Future updates will make this easier, but for now the most foolproof way to get dependent apps (like LND, Core, electrs, mempool) to switch networks is to just restart umbrelOS completely. This will make sure that all apps have access to the correct environment variable for the network you’re running on.
-
To be extra safe I would do exactly this to avoid third-party apps having difficulty switching if they have already written data related to mainnet:
-
Install Bitcoin Node app
-
Switch networks through Advanced Settings
-
Restart umbrelOS
-
Then install other apps like LND, Core, electrs, mempool, etc.
-
I use what I have described above in my development workflow, so can confirm this works for official umbrel apps like Lightning Node and Electrs, but I know it also works for Mempool.
Ideally, I would like to have these available not just in my private network via tailscale, but also have the option to route to them using DynDNS. That would also mean that there would need to be some sort of ssl cert in the nginx configuration, perhaps a letsencrypt certificate container that renews the certificate, but let’s not get ahead of ourselves.
We have some interesting ideas for this in the future, but haven’t implemented an easy way to do this yet. @lukechilds any advice on the above DynDNS question?
