I want to install juju-gui using local provider (re lxc) on a cloud instance. However, the problem I have is that juju-gui will be installed into an lxc container itself and that container will be a non-routeable 10.x.x.x address.

I made some progress following these general instructions

After, creating my key files I made sure that the juju-gui container had a copy of them as well as the host (/etc/ssl/certs and /etc/ssl/private in the host and /var/lib/lxc/cn_name/rootfs/etc/ssl/certs and /var/lib/lxc/cn_name/rootfs/etc/ssl/private in the container).

Pointing my Browser to the Public IP of the Host cloud instance I do get redirected to juju-gui web Admin login page but it just keeps spinning with "Connecting to Juju environment" ??

I'm sure someone has done this before but I'm now stuck trying to figure out what is not configured right.

My goal is to be able to point my browser to the Cloud instance public address, login to juju-gui and because I'm setup for local provider deploy additional charms/services into more LXC containers within that Cloud instance.

  • can you be more specific on what cloud you were testing this on? In order to help us duplicate and debug it'd be helpful. The thing to note is that the GUI talks to Juju over a wss websocket connection and it needs to be able to locate and connect to it in order to function. It sounds like this was not able to occur in your setup. – Rick Jul 1 '14 at 18:04

I finally just used the following IPTABLES commands to forward HTTP and HTTPS access to the LXC container that the JUJU-GUI is running in:

sudo iptables -t nat -I PREROUTING -p tcp -d <host-ip> --dport 443 -j DNAT --to <lxc-ip>:443
sudo iptables -t nat -I PREROUTING -p tcp -d <host-ip> --dport 80 -j DNAT --to <lxc-ip>:80
sudo iptables -A FORWARD -p tcp -d <lxc-ip> --dport 443 -j ACCEPT
sudo iptables -A FORWARD -p tcp -d <lxc-ip> --dport 80 -j ACCEPT

Using the above I am now able to access Juju-GUI running in an LXC container in "local" provider mode from the Internet.

Any charms deployed ... deploy to other LXC containers on the same host.


The short answer is that this is not currently a tested and supported way of setting up the Juju GUI. It needs to have direct wss communication with the juju state servers to function. The team is interested in this though and I'm curious if you could share some more specifics about your setup to see if there's work we can do to enable it and support it.


You just have to use this command on the terminal of your computer to add a static route to your container.

sudo route add -net 10.X.X.X/24 gw SERVERIP

for example if my public server address is and my container's address is the command to use is:

sudo route add -net gw

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.