Yunohost inside LXD container: Manual installer stops when setting up avahi-daemon



Hello guys,

First of all, great project. Thank you! Please keep up the good work. :slight_smile:

I’m trying to Install and configure a Yunohost server on Debian Jessie running inside an LXD container on top of Ubuntu Server (AMD64).
Reason is I want to run other images on my server plus having the advantage of increased security through Ubuntu Server Edition being hardened and the confinement of my Yunohost system thanks to LXD containers.

The theory…

  • Debian Jessie (amd64) runs inside the container on Ubuntu.
  • Yunohost is manually installed as described here:
  • My physical server accesses the network with static IP, that is directly assigned from the router.

Unfortunately the installation always stops at the same point, when the manual installer wants to set up the avahi-daemon (the graphical installer in the CLI stops at 76%). I have then to manually stop the Debian container, which means actually killing the installation process.

Here is the error log from yunohost-installation.log:

Setting up avahi-daemon (0.6.31-5) ...
Job for dbus.service canceled.
invoke-rc.d: initscript dbus, action "force-reload" failed.
Job for avahi-daemon.service canceled.
invoke-rc.d: initscript avahi-daemon, action "start" failed.
dpkg: error processing package avahi-daemon (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libnss-mdns:amd64:
 libnss-mdns:amd64 depends on avahi-daemon (>= 0.6.16-1); however:
  Package avahi-daemon is not configured yet.

dpkg: error processing package libnss-mdns:amd64 (--configure):
 dependency problems - leaving unconfigured

Here is the full log-file:

Steps I followed so far:

  • Install & Update Ubuntu Server
    Ubuntu Server 17.04 AMD64
  • Connect to Server via SSH
  • Install LXD­

apt install lxd lxd-client

  • Restart PC, because of group lxd or run following command…

newgrp lxd

  • Initialize LXD

sudo lxd init

Do you want to configure a new storage pool (yes/no) [default=yes]? 
Name of the new storage pool [default=default]: 
Name of the storage backend to use (dir, lvm) [default=dir]: 
Would you like LXD to be available over the network (yes/no) [default=no]? yes
Address to bind LXD to (not including port) [default=all]: 
Port to bind LXD to [default=8443]: 
Trust password for new clients: 
Would you like stale cached images to be updated automatically (yes/no) [default=yes]? 
Would you like to create a new network bridge (yes/no) [default=yes]? 
What should the new bridge be called [default=lxdbr0]? 
Would you like to create a new network bridge (yes/no) [default=yes]? 
What IPv4 address should be used (CIDR subnet notation, “auto” or “none”) [default=auto]? 
What IPv6 address should be used (CIDR subnet notation, “auto” or “none”) [default=auto]? none
LXD has been successfully configured.
  • Download and deploy a new lxd container image of Debian Jessie AMD64 on your server. I named this new container yunohostOS

lxc launch images:debian/jessie/amd64 yunohostOS

  • Start image

lxc start yunohostOS

  • To see if your container is up and running. Strangely my IPv4 address is different from my static IP…

lxc list

  • Installation of Yunohost inside LXD
    First I need to open a shell inside the container:

lxc exec yunohostOS – /bin/bash

Then inside the container I followed these instructions:

Here at this point of the process the error as described above happens…

I would appreciate your help, feedback and comments on this problem.
Do you have any idea how I can make the install process run through?



Hello, i don’t know if your problem is linked to. But it seems there’s problem with the lxc container for debian Jessie. The template container for Jessie is not fully fonctional.
I have a different configuration with a proxmox host (based on Jessie) and with multiple lxc containers (2 yunohosts containers with a modified Jessie template )
I used a modified lxc template for Jessie in order to use yunohost.
But i don’t remember exactly what i do, It was a year ago.
If someone confirm.


Look here :

The yunohost install script already has a workaround for installing inside LXC vms, because of avahi. You can find the explanation in the comments.
Maybe the workaround is skipped because avahi is already installed (cf l. 255) in your base image ?


Thank you juju! Meanwhile I found the same bug. But I didn’t know that Yunohost installer already takes care of this.
Do I have to uninstall avahi daemon on my host and inside my container, right?


I have the same problem I have tried to install YunoHost in a lxd container and the installation stuck on setting up avahi-daemon