Hosting my own gBridge


#1

Hi,

I’m trying to host a gBridge instance on my NAS, so that I only have to rely on Google as an external actor and add as many device as I want.

I followed the steps found here: https://doc.gbridge.io/selfHosted/hostItYourself.html

Until the category: Configure your webserver

I’m confused, why do I need an additional webserver ? Isn’t the docker container enough ?

The whole webserver / proxy thing is pretty obscure to me and I don’t understand how it is supposed to work.

Could you help me out ? :slight_smile:

I thank you in advance.

Regards,

Azsde.


#2

The gBridge docker images do not support ssl certificates (but they are required) by default since their configuration is to heterogenous and not well abstractable.

We expect most users to have a running webserver available.

You could possibly edit the config files of the NGINX or Apache webserver running in inside the docker containers directly for your SSL certificates.


#3

So, if I understand correctly, an external webserver that will support SSL certificates is required, and will redirect to the docker for /gbridge/gapi url ?

The docker needs to have its ports accessible from the outside right ? Or are the ports from the external webserver enough to make the whole gBridge setup accessible from the outside ?


#4

Yes - the webserver is required with the manuals. As I’ve said, it is possible to patch the images for direct docker support, but I haven’t tried and documented that yet.

No, docker ports don’t need to be accessible from the outside. Only the “gapi” HTTPS endpoints need to be reachable externally. These are used by the Google servers to issue commands.

You can access your gBridge dashboard to create devices within your local network when accessing the docker host’s IP.


#5

Perfect, I’ll try to make this work when I have the time, thank you so much for all your work and support :slight_smile:


#6

Azsde, you may want to check out Caddy. It’s a web server that automatically requests and renews SSL certificates from Let’s Encrypt without you having to do anything. It’s easier to configure than Apache or nginx. In this case you would use a proxy directive to have the web server act as a reverse proxy to your local gBridge “gapi” endpoint. Caddy would take care of all of the SSL stuff for you and simply forward the requests to your gBridge instance.


#7

Having Caddy and gBridge in one container would be neat.

K