r/selfhosted•
DatolyaPalma

Portainer broke: address already in use

Need Help

I've been using Portainer on my local server since day 0. It has been working perfectly without an issue. Recently it broke very seriously: when i attempt to launch portainer i get the following response:

$ docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer-data:/data portainer/portainer-ce:lts
a79bd4639241976d01d382cd5375df93f75e976246036258145add4da4a5be3a
docker: Error response from daemon: Address already in use.

It was weird, because i've never faced this problem. Logically, I asked chatgpt for help in this matter. As per its advice, I've tried restarting the server, I've tried restarting docker with systemctl, stopping it then restarting it, but the problem persisted. I also tried to diagnose what causes the port conflict with:

sudo lsof -i :8000
sudo lsof -i :9443 
sudo netstat -anlop | grep 8000
sudo netstat -anlop | grep 9443

None of them returned anything. I also tried just simply changing the port, when running portainer:

$ docker run -d -p 38000:8000 -p 39443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer-data:/data portainer/portainer-ce:lts
90931285e7c13b977745801fbfec89befd643c3a9c2f057d58bf96eeda47c749
docker: Error response from daemon: Address already in use.

Posted Aug 8, 2025, 9:14 PM UTC

08
Loading comments…