# Docker Container Only Listening on IPv6

**URL:** https://meta.discourse.org/t/docker-container-only-listening-on-ipv6/149087
**Category:** Self-hosting
**Created:** [April 24, 2020, 1:50am UTC](https://meta.discourse.org/t/docker-container-only-listening-on-ipv6/149087 "2020-04-24T01:50:34Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ghan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ghan/32/177964_2.png) [@Ghan](https://meta.discourse.org/u/Ghan)
#### Post date: [April 24, 2020, 1:50am UTC](https://meta.discourse.org/t/docker-container-only-listening-on-ipv6/149087/1 "2020-04-24T01:50:34Z")

</div>

I’m working on trying to set up a test Discourse instance in a VM so I can work on importing from another software. I’m new to Docker, Discourse, and Ruby, so I’m not yet familiar with what’s going on in the background. So far, I’ve forked the discourse\_docker repo and then used that following the instructions here (using my own local Ubuntu VM instead of a cloud instance): [discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)

After setup, according to netstat, it appears my local VM here has set up the container in such a way that ports 80 and 443 are only listening on the IPv6 IP. I don’t use IPv6 locally, so I can’t access the Discourse instance. How can I correct this? I looked in app.yml but there don’t appear to be any bind settings in there. I’ve search for anyone having a similar issue - there was one hit from I think 2015 where the resolution was to go change the DNS configuration inside the container itself. This sounds like a Bad Idea™ so I’m hoping for something a bit less hacky.

Thanks!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 24, 2020, 1:59am UTC](https://meta.discourse.org/t/docker-container-only-listening-on-ipv6/149087/2 "2020-04-24T01:59:50Z")

</div>

You likely don’t need to fork the repo.

It’s likely a problem with your virtual host. I’ve never seen it before.

---

<div class="post-metadata">

### Author: ![Ghan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ghan/32/177964_2.png) [@Ghan](https://meta.discourse.org/u/Ghan)
#### Post date: [April 24, 2020, 2:03am UTC](https://meta.discourse.org/t/docker-container-only-listening-on-ipv6/149087/3 "2020-04-24T02:03:56Z")

</div>

I forked the repo in an attempt to follow this guide:

> [@Set up an environment to migrate another forum to Discourse](https://meta.discourse.org/t/setting-up-discourse-import-migration-environment-on-digitalocean-droplet/88252):
>
> Want to setup a Discourse import environment? Let’s get started! Setup a Discourse instance on DigitalOcean Setup a Discourse instance on DigitalOcean using our [official guide](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md). Email setup is not required for migration. I accessed the instance using DigitalOcean allotted IP instead of setting up a domain name. Download the import data on server cd /var/discourse/shared/ mkdir import\_data Download the import data (using curl, wget, sftp, etc) and unzip the files if required. Let’s assume the…

I wouldn’t expect that to cause any issues, though.  
I’m running a fresh install of Ubuntu Server (downloaded from [ubuntu.com](http://ubuntu.com)) on ESXi. This is all very standard stuff.

Where does the configuration make the determination on how to bind the services?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 24, 2020, 2:07am UTC](https://meta.discourse.org/t/docker-container-only-listening-on-ipv6/149087/4 "2020-04-24T02:07:50Z")

</div>

It binds to all ips by default.

You can add ips to lines that map the ports, but it’s likely a problem with the vm. It’s it digital ocean?

There are examples here for running an import in a container. They are likely to be better than the one you linked to (but I didn’t look at it, so I could be wrong).

---

<div class="post-metadata">

### Author: ![Ghan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ghan/32/177964_2.png) [@Ghan](https://meta.discourse.org/u/Ghan)
#### Post date: [April 24, 2020, 2:17am UTC](https://meta.discourse.org/t/docker-container-only-listening-on-ipv6/149087/5 "2020-04-24T02:17:38Z")

</div>

No, I have my own VMware host that I’m using to run the VM. I don’t have any trouble reaching the VM over IPv4 either directly or via the DNS name. It’s just that for some reason, the docker services (not default things like SSH server) are only binding to :::80 and :::443 instead of 0.0.0.0.

Is there a relevant log file somewhere that might provide some details?

> There are examples here for running an import in a container. They are likely to be better than the one you linked to (but I didn’t look at it, so I could be wrong).

Well, so far I haven’t gotten to the import part yet. 😛  
Ultimately, I’d like to work on improving this import script for our site. I’ve been struggling so far with a few different guides on getting started but I figured the basic plain install would be the way to go for now.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 24, 2020, 2:39am UTC](https://meta.discourse.org/t/docker-container-only-listening-on-ipv6/149087/6 "2020-04-24T02:39:26Z")

</div>

It’s something in docker or your vm. I’d look at vm and docker guides and start with some hello world container. This isn’t a Discourse problem.
