Proxy during discourse bootstrap


I was trying to bootstrap while relying on an outbound http proxy, but the bootstrapping script didn’t honor the proxy settings. I created the following file to tell docker to use the a proxy:

$ cat /etc/systemd/system/docker.service.d/docker-http-proxy.conf
Environment="HTTP_PROXY=" "NO_PROXY=localhost,"

This allowed the first steps in the bootstrapping to succeed, but the bootstrapping failed when it tried to clone pups.git from Due to the locally enforced firewall, the connection to was refused.

I’m pretty sure that I had the HTTP_PROXY environment variable and the system-wide git configuration set too.

I’ve since opened up http/s outbound ports, but was hoping that I could bootstrap in a somewhat more restricted environment. Any thoughts about how to encourage the bootstrapping process to use an http proxy?


1 Like

Apparently this has happened before. Install discourse with internet access only via proxy


If you’re stuck on bootstrapping with the proxy method, I’ve had good success with the cached install method that requires no internet at all on the machine you’re installing on: How to install Discourse on an isolated CentOS 7 server

It works the same on any linux distribution that can run a recent version of docker.
I recommend creating a shell script for the git clone steps to save a lot of time when it’s time to update the caches, and to make sure you update everything at the same time.
It quickly becomes a mess if you forget to keep all your plugins in sync with the base discourse.

1 Like