Setting a custom IP doesn't work?

Hello everyone,
recently I tried to discourse on my debian server everything went ok expect that I could not access the site due to I tried to change the port to access it but only nginx shows up so I figured the problem out so I tried to set a custom ip with a custom network what would point out to my network but I couldn’t access it it keep on giving me errors this is the error I get:

 ./launcher start app --docker-args --network discourse_back --ip 192.168.1.4
x86_64 arch detected.
docker: Error response from daemon: network -i not found.
Your Docker installation is not working correctly

See: https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam

I also tried it before using hello-world and it worked

docker run -it --network discourse_back --ip 192.168.1.4 hello-world

Hello from Docker!

. . .

does anyone have a idea how do I fix it? Thanks in advance!

Maybe try this:

 ./launcher start app --docker-args '--network discourse_back --ip 192.168.1.4'

So I finally got it running but now it comes “Welcome to nginx” but I entered my hostname “discourse.simonz.local” (that is also written in the app.yml at

DISCOURSE_HOSTNAME: discourse.simonz.local

did I done something wrong?

Production discourse won’t work without https.

Maybe you have some other nginx that’s showing that message?

You should get a standard install working before trying something more fancy.

If you intend for this instance to be available on the internet, using a .local domain in app.yml is going to break things. Maybe this is something you’re only intending to use at home or only for testing, just thought it was worth mentioning.

Assuming your docker networking works correctly, making the container reachable on that IP address from outside the host machine, you would also need DNS to point discourse.simonz.local to that IP address.

It sounds like what’s happening is that the domain is resolving to the host machine and you aren’t specifying the port (e.g. discourse.simonz.local:1234) when trying to access it, so it’s just reaching nginx instead of the docker container.

If you want Discourse available on a different port, you probably don’t need it on a different IP address. If you want it available on the standard port, as well as nginx on the standard port, you need DNS to direct you to the correct IP or you need nginx to proxy Discourse.

.local domains are typically announced by the system based on its configured hostname. Discourse doesn’t really have any need to do that normally, so the container might not have anything to do it.

If you want to go the standard port, different IP, DNS route, that’s really outside the scope of Discourse and setting it up will depend on various factors in your network.

If your goal is just to have something available in nginx as well as Discourse on the same host, I would recommend the proxy approach linked above. While also technically an unsupported install, it’s a more common setup and one more people will be able to help with.

It will work only on standard ports.

it should not be accessed via internet it should be in a local enviorment to try it out, the ports are pretty much the ip is correct

can’t I already have something running on port 80 and I didn’t saw an option to change the IP it should use in the Normal installation

I already undo that change it runs again on the normal port 80 and 443

If you know how to get your reverse proxy to work you can run it on another host name. Https and standard ports are required.

If you’re only setting it up locally temporarily to try it out, I would just spin up a virtual machine rather than trying to get it running alongside nginx.

The virtual machine can be given its own IP, will likely automatically give itself a .local address and you can just do a standard Discourse install inside it.

When done, throw away the virtual machine and you don’t need to worry about reverting any changes to nginx or anything else.

1 Like

I use the docker compose version it seems like it comes with an nginx and it is already inside a VM but I am trying to run it with the same VM but one things goes out as …1.3 (my other site) and the other as …1.4 (discourse)

I just realized yes I already did the standard install I just want to change the IP where it response to my default ip is 192.168.1.3 but I want to react to it to 192.168.1.4 both of these ips are on the device already configured

If the VM has two IP addresses, you don’t need to do anything with the docker container IP address, you just need firewall routing so that …1.3:80/443 goes to the host and …1.4:80/443 goes to the docker container.

If this is Linux, AFAIK iptables and ufw are the most common software. You would probably need to look at the documentation or ask in their communities for help with how to set up that routing.

Unless you need to test this kind of setup for where you would ultimately want to install Discourse though, I would still recommend just running a second VM for this trial. Any complexities of running Discourse alongside other HTTP/HTTPS software goes away with it running inside its own VM.

Well thanks anyway so I was able to start it up but I just don’t get a response probally I messed something up but thanks for helping I will try it another time maybe I will get a new result thanks everyone for the help and have a great day ^^