Why is docker-compose not working anymore with Umbrel 1.0?

root         861     545  0 Mar22 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 2018 -container-ip 10.21.0.8 -container-port 2018
root         869     545  0 Mar22 ?        00:00:00 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 2018 -container-ip 10.21.0.8 -container-port 2018

can you please run this

sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{.Name}}' $(sudo docker ps -aq)| grep '10.21.0.8'

I restartet umbrel now and there is no port 2018 in use anymore. I try now to install public-pool again.

Seems ok now so far:

umbrel@umbrel:~$ umbreld client apps.install.mutate --appId public-pool
true

One last thing than i’m fine with umbrel 1.0.x :wink:
raspi -config is not working anymore even when i install this i got error message after configuring my fan temperature. Is there now another tool for fan settings?

I have the same problem, when I try to install an app from Umbrel UI, it is not working.
When I try to install an app via ssh using the commands that are suggested in this blog post, I get a false response and these are the logs I get:

umbrel@umbrel:~$ umbreld client apps.install.mutate --appId remmina
false
umbrel@umbrel:~$ umbreld client apps.install.mutate --appId file-browser
false
umbrel@umbrel:~$ sudo journalctl -u umbrel -f
Mar 26 10:52:06 umbrel umbreld[801]: [server       ] POST /trpc/apps.install
Mar 26 10:52:06 umbrel umbreld[801]: [apps         ] Installing app remmina
Mar 26 10:52:06 umbrel umbreld[801]: [apps         ] Setting up data directory for remmina
Mar 26 10:52:07 umbrel umbreld[1001942]: network umbrel_main_network was found but has incorrect label com.docker.compose.network set to "umbrel_main_network"
Mar 26 10:52:07 umbrel umbreld[801]: [apps         ] [error] Failed to install app remmina: Command failed with exit code 1: docker compose --project-name umbrel --file /usr/local/lib/node_modules/umbreld/source/modules/apps/legacy-compat/docker-compose.yml up --build --detach --remove-orphans
Mar 26 10:52:23 umbrel umbreld[801]: [server       ] POST /trpc/apps.install
Mar 26 10:52:23 umbrel umbreld[801]: [apps         ] Installing app file-browser
Mar 26 10:52:23 umbrel umbreld[801]: [apps         ] Setting up data directory for file-browser
Mar 26 10:52:24 umbrel umbreld[1002024]: network umbrel_main_network was found but has incorrect label com.docker.compose.network set to "umbrel_main_network"
Mar 26 10:52:24 umbrel umbreld[801]: [apps         ] [error] Failed to install app file-browser: Command failed with exit code 1: docker compose --project-name umbrel --file /usr/local/lib/node_modules/umbreld/source/modules/apps/legacy-compat/docker-compose.yml up --build --detach --remove-orphans

It’s like the command “docker compose” is failing.
Any suggestion?

1 Like

OK, problem solved.
I was running Umbrel v1.0 and after upgrading to v1.0.4, I am now able to install apps. Both using UI in umbrel.local and also using terminal via ssh.

To upgrade to last Umbrel version using ssh, I have used this command:

sudo mender install https://download.umbrel.com/release/1.0.3/umbrelos-pi.update && sudo reboot
1 Like

you mean 1.0.4 instead of 1.0.3 in the script?

1 Like

No, I wrote 1.0.3 in the script:

But version 1.0.4 was installed instead:
image

1 Like

Thanks, this solves some of the problems, but the old app script had more functionality than that…

Mainly, we need a way to run the cli interface of the apps themselves (run command in the main container)

For example, in order to run the LND cli, we could do, e.g.:

umbrel/scripts/app compose lightning exec lnd lncli --help

(had an alias for that…), but this does not work now.

I tried using direct docker commands, but for some reason this does not work in umbrel 1.0 either…

sudo docker exec lightning_lnd_1 lncli --help

gives:

 exec: "lncli": executable file not found in $PATH: unknown

@lukechilds @mayank I am also interested in understanding how we can run commands for e.g. LNCLI now after upgrading to Umbrel 1.x

OK. I think this is a bug (specific to umbrel 10.x on the Pi, at least in my Pi4 installation,). I have opened an issue in Github with some more info.

Meanwhile, for anyone getting the same error I reported above ("lncli": executable file not found...), I have a workaround.
(A bit nasty, but works for me…)

$ sudo docker exec -i -u 0 lightning_lnd_1 sh 

(prompt disappears, but no worries, type the following line and press enter):

chroot --userspec 1000:1000 /run/rugpi/mounts/data/overlay/root

(get some error. Ignore, type the following):

cd ~

This restores the normal prompt. Now you have a “fixed” shell process in the container, and you can happily run the cli

~ $ lncli --help
NAME:
   lncli - control plane for your Lightning Network Daemon (lnd)

USAGE:
...
2 Likes

Nice job @amitar this actually works!!

@amitar Anychance you could drop the steps for the bitcoin-cli also? Just not an expert and don’t want to assume its as easy as replacing the “lightning_lnd_1” with “bitcoin_bitcoind_1”
Thanks ahead of time

@ltc In fact, looks like your guess is right. I’d only add a “-e HOME=/data” to the initial commandine (but I think it would also work without that):

sudo docker exec -i -e HOME=/data -u 0 bitcoin_bitcoind_1 sh
chroot --userspec 1000:1000 /run/rugpi/mounts/data/overlay/root
cd ~
bitcoin-cli --help

Adding more info to make this more general:

  1. To find out the correct container name look in the app’s docker-compose file (find the app under ~/umbrel/app-data/{name}/. In our case: cat ~/umbrel/app-data/bitcoin/docker-compose.yml

  2. The yaml file has a block for each service. You need to find the service that has the cli in its image. Generally there is a service for the web-UI, one for the main app, and maybe some internal services (tor, db etc.). In our case, we need the service that runs the upstream bitcoind image (look in the image: field of each service). We see that the section (service) that is named bitcoind runs lncm/bitcoind:v26 docker image. In the same section, you can find the container name container_name: bitcoin_bitcoind_1

  3. We need to find the user and folder to which we want to switch in the second stage (that’s because we force the first command to start as root with the “-u” parameter, instead of using the image-specified user id). I suppose user 1000 might be the standard for umbrel. For some apps the user might be specified in the docker-compose.yml, but in our case the bitcoind section of the yaml does not have a “user:” settings, so we try to get the relevant settings directly from the image:

sudo docker run --rm --entrypoint=/bin/sh lncm/bitcoind:v26.0 -c 'id; echo $HOME'

( you get uid=1000, gid=1000 and home=/data)

  1. The reason we did not need to set HOME for the lnd case is because the lnd section in ~/umbrel/app-data/lightning/docker-compose.yml contained an environment: subsection which already set this up. In any case, I suspect that the cli for the app will work anyways, even if the HOME is not set up correctly.

Could you tell us how to connect Tailscale then? It is installed but not connected, and after I ssh into Umbrel and type “tailscale up”, I get “tailscale: command not found”, and with the suggestions above, I get “requires docker-compose to be installed”
Thank you

1 Like

What would one do to troubleshoot when an app does not uninstall ?
e.g umbreld client apps.uninstall.mutate --appId bluewallet
message: ‘Command failed with exit code 15: /usr/local/lib/node_modules/umbreld/source/modules/apps/legacy-compat/app-script stop bluewallet’,
code: -32603,
data: {
code: ‘INTERNAL_SERVER_ERROR’,
httpStatus: 500,
stack: ‘Error: Command failed with exit code 15: /usr/local/lib/node_modules/umbreld/source/modules/apps/legacy-compat/app-script stop bluewallet\n’ +
’ at makeError (file:///usr/local/lib/node_modules/umbreld/node_modules/execa/lib/error.js:60:11)\n’ +
’ at handlePromise (file:///usr/local/lib/node_modules/umbreld/node_modules/execa/index.js:124:26)\n’ +
’ at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n’ +
’ at async RetryOperation._fn (file:///usr/local/lib/node_modules/umbreld/node_modules/p-retry/index.js:55:13)',
path: ‘apps.uninstall’,

I think I’m having the same issue, no solution so far