Docker created on restart.

  • Hi. I am new to libreelec, docker and linux.


    I have 3 docker container installed. One for home assistant via docker run -d command. Another 2 through the linux io repo ( duck dns and nginx letsencrypt).


    When i restart libreelec, it took a very long time to boot up . A good 10 mins. I ran docker -ps command. It shows that duck dns and nginx letsencrypt comtainer was just created when it booted up.


    Home assistant docker on the other hand just started the existing container.


    I can see this by the difference in created vs status.


    Is it supposed to be like this or am i doing something wrong.


    Also, is these setup too heavy for a raspberry pi 4 4gb?

  • Hi. I did some reading and came across this

    LinuxServer.io docker addons and general docker info .


    Updater:



    The updater addon is a dependency for all linuxserver docker addons and is responsible for refreshing the docker images in the background. By doing so, it ensures that when Libreelec is restarted, the new container is created based on the latest image, but it doesn't have to download the image, potentially holding up the start process.



    Is there a way for me to turn this off?

  • The docker addons work that way. The containers are created and destroyed when the addon is started and stopped (including during reboot). That is by design, to ensure the containers get updated when there are image updates. It does not however cause delays because container creation takes no more than a second and the image is already local.


    Duckdns is the lightest image/container we provide as it is just curl firing off every 5 minutes via cron. Nginx is also very light. They will run perfectly fine on an rpi4.


    Homeassistant in the other hand is fairly heavy. Not sure how well it runs in a pi, because I don't personally use it.


    There is no reason for you to try and turn off the updater. It works in the background and doesn't slow things down.

  • Hi. thanks for the reply.

    Something must be wrong with my setup then. Libreelec with kodi and home assistant in a docker runs fine and smooth. When I restart libreelec, the HA docker (which I installed using command line) does not get destroyed and recreated.


    Nginx letsencrypt and duck dns gets destroyed and recreated.


    Without nginx letsencrypt and duckdns, i can restart my libreelec (with HA) in about 30 seconds. With nginx letsencrypt and duckdns, its about 10 to 15 mins and kodi appears laggy. I suspect nginx is trying to create ssl certificare on every boot.


    I have now uninstalled nginx letsencrypt and duckdns and not sure how to find the relevant logs. If you can guide me I will provide it. The system becomes unusable with those addons.


    Just to clarify, i did let it run overnight the first time with nginx letsencrypt installed to allow it to process the certificates.

  • You've misunderstood.


    Something must be wrong with my setup then. Libreelec with kodi and home assistant in a docker runs fine and smooth. When I restart libreelec, the HA docker (which I installed using command line) does not get destroyed and recreated.


    Nginx letsencrypt and duck dns gets destroyed and recreated.


    Docker addons are not the same as docker containers you manually create. Addons use systemd to manage the containers in an automated fashion. The destroy/create is part of the automation. It is perfectly fine as docker containers are ephemeral by design. It is how docker is meant to be used. If you ever want to update the homeassistant container you manually created, you will have to destroy and recreate it based on an updated image (manually). Addons do that automatically without user intervention.


    The validation is performed when the container is started for the first time. Nginx won't be up until ssl certs are successfully generated.

    "started for the first time" refers to starting it with no existing persistent data. The persistent data (including the certs) reside in the userdata addon_data folder by default. As long as it's there, certs are not regenerated until they get close to expiration.


    In any case, it sounds like this is a case of the xy problem. Let's focus on the boot delay. I assure you I'm running plenty of docker addons here on an rpi4 with no noticeable delay. The only delay I'm observing is "waiting for network" before kodi starts.


    Check the kodi log to see what's holding things up during boot. Also check the addon logs with journalctl -u docker.linuxserver.letsencrypt and journalctl -u docker.linuxserver.duckdns (you can also try journalctl -u docker.linuxserver.updater).


    With that said, make sure you update your addons and refresh the repos. There was a brief period of time where the addon updater caused a boot delay of about 10 minutes due to a bug in its systemd config. It was fixed shortly after.


    EDIT: As a test, I set up all three containers in question, two as addons and one manually. I even created homeassistant with the same docker run from your other thread, all on an rpi4 with le 9.2.3 and I experience no boot delay at all.

  • Hi, aptalca , thanks for the detailed explanation.

    Docker addons are not the same as docker containers you manually create. Addons use systemd to manage the containers in an automated fashion.

    I did not know that.

    "started for the first time" refers to starting it with no existing persistent data. The persistent data (including the certs) reside in the userdata addon_data folder by default. As long as it's there, certs are not regenerated until they get close to expiration.

    thanks for clarifying.



    Since my earlier setup was unusable, i uninstalled the linux io addons. then, I manually created a contained for nginx/letsencrypt with this command


    docker create --name=letsencrypt --cap-add=NET_ADMIN --net=host -e PUID=1000 -e PGID=1000 -e TZ=Asia/Kuala_Lumpur -e URL=subdomain.duckdns.org -e SUBDOMAINS=www,ha -e VALIDATION=http -e EMAIL=email@gmail.com -p 443:443 -p 80:80 -v /storage/letsencrypt:/config --restart unless-stopped linuxserver/letsencrypt


    I ran duckdns as an integration with HA. i guess i dont need another docker for it.


    Its all working great now with no problems. Just that I dont know if this is a best practice case.


    Having said that, i feel like i owe you a test. I didn't expect you to do so much to help me out. really appreciate it. Thank you alot.


    With that said, make sure you update your addons and refresh the repos. There was a brief period of time where the addon updater caused a boot delay of about 10 minutes due to a bug in its systemd config. It was fixed shortly after.

    This could have been my problem. But then, i also experienced extreme system lag while using kodi.


    Will update


    In the meantime, not sure if this log is any helpful.


    https://pastebin.com/hECnPM9s

  • Hi. Just to update. I changed the sd card and no longer have this problem. I guess my older card is really slow or faulty. changing sd card brings system wide improvement.