# Bind for 0.0.0.0:443 failed: port is already allocated

**URL:** https://meta.discourse.org/t/bind-for-0-0-0-0-443-failed-port-is-already-allocated/151871
**Category:** Self-hosting
**Created:** [18 במאי,‏ 2020,‏ 7:55pm UTC](https://meta.discourse.org/t/bind-for-0-0-0-0-443-failed-port-is-already-allocated/151871 "2020-05-18T19:55:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Rs40x](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Rs40x](https://meta.discourse.org/u/Rs40x)
#### Post date: [18 במאי,‏ 2020,‏ 7:55pm UTC](https://meta.discourse.org/t/bind-for-0-0-0-0-443-failed-port-is-already-allocated/151871/1 "2020-05-18T19:55:50Z")

</div>

Forums are down since rebuild failed during the upgrade (var/discourse/launcher rebuild app).

I tried the solution from [here](https://github.com/moby/moby/issues/25981). The Following solution did not work.

systemctl stop docker  
rm -rf /var/lib/docker/network/files  
systemctl start docker

```plaintext
/usr/bin/docker: Error response from daemon: driver failed programming external connectivity on endpoint app (db53): **Bind for 0.0.0.0:443 failed: port is already allocated**.

# netstat -tulpen | grep 443
tcp6 0 0 :::443 :::* LISTEN 0 488127 30700/docker-proxy  

# docker ps

1d8b7461b27d local_discourse/import "/sbin/boot" 6 weeks ago Up 9 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp import

```

What else can I do to get the forums back online?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Rs40x](https://avatars.discourse-cdn.com/v4/letter/r/f19dbf/32.png) [@Rs40x](https://meta.discourse.org/u/Rs40x)
#### Post date: [19 במאי,‏ 2020,‏ 8:31pm UTC](https://meta.discourse.org/t/bind-for-0-0-0-0-443-failed-port-is-already-allocated/151871/2 "2020-05-19T20:31:08Z")

</div>

[Solution]

1. Update the Docker Container
2. Stop the Container
3. Run rebuild

I missed step 1 and 2. Because the instructions on the UI said to only to run step 3 using the console.

1. To update the Docker Container

```plaintext
apt-get update
apt-get dist-upgrade lxc-docker

```

1. Stop the Docker Container

```plaintext
docker container ps
docker stop containerID

```

1. Manual Upgrade of Docker Container

```plaintext
cd /var/discourse/
git pull
./launcher rebuild app

```

You may have to run the launcher twice.

Reason for Error “bind was already in use”\>\> Trying to upgrade the discourse while container is running.

I hope this helps someone.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [18 ביוני,‏ 2020,‏ 8:35pm UTC](https://meta.discourse.org/t/bind-for-0-0-0-0-443-failed-port-is-already-allocated/151871/3 "2020-06-18T20:35:34Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
