Unifi-controller container created but does not run

  • What container you’re trying to use

  • Any relevant error messages or logs
    sudo docker start -i unifi
    [sudo] password for mark:
    ERRO[0000] error waiting for container: context canceled
    Error response from daemon: driver failed programming external connectivity on endpoint unifi (e363afa0ed1802552f2fc515096c26c4fc639eebd0e2e423d64bbd2c5e73b540): Error starting userland proxy: listen tcp bind: address already in use

  • Your environment
    intel nuc run ubuntu: Linux cork2 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

  • Your docker run command/docker-compose file (with sensitive information removed)
    sudo docker create --name=unifi -v /home/mark/unifi_config/:/config -e PGID=1000 -e PUID=1000 -p 3478:3478/udp -p 10001:10001/udp -p 8080:8080 -p 8081:8081 -p 8443:8443 -p 8843:8843 -p 8880:8880 -p 6789:6789 linuxserver/unifi-controller

Portainer shows the container has been created, but not running. If I force ir run, as shown above I get the bind error message.

Ideas, what I’ve done wrong?



Something else is already using that port on your host.


I should have noted that, but the put me off. I’m not sure what’s using 8080, so I mapped 8090:8080.

The container now runs. Hopefully that would cause many problems. I see it used by the access points from https://hub.docker.com/r/linuxserver/unifi-controller:

Alternatively to manually adopt a device take these steps:

ssh ubnt@$AP-IP
set-inform http://:8080$address/inform

In the meantime, I’ll try to find what app is currently using 8080.


Found it:
root 2417 3.7 2.5 407004 202204 ? Ssl May13 86:49 /snap/microk8s/522/kube-apiserver --insecure-bind-address= --cert-dir=/var/snap/microk8s/522/certs --etcd-servers=unix://etcd.socket:2379 --service-cluster-ip-range= --authorization-mode=AlwaysAllow --basic-auth-file=/var/snap/microk8s/522/credentials/basic_auth.csv --enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --service-account-key-file=/var/snap/microk8s/522/certs/serviceaccount.key --client-ca-file=/var/snap/microk8s/522/certs/ca.crt --tls-cert-file=/var/snap/microk8s/522/certs/server.crt --tls-private-key-file=/var/snap/microk8s/522/certs/server.key --kubelet-client-certificate=/var/snap/microk8s/522/certs/server.crt --kubelet-client-key=/var/snap/microk8s/522/certs/server.key --secure-port=16443 --insecure-port=8080 --requestheader-client-ca-file=/var/snap/microk8s/522/certs/ca.crt