How to manually setup TLS and docker on server

This is driving me crazy, I’ve followed all the instructions but I keep getting the following error
Server:
ERROR: error during connect: Get “https://192.168.86.38:2376/v1.24/info”: x509: certificate is valid for 10.10.10.20, 127.0.0.1, not 192.168.86.38
errors pretty printing info

Can anyone please let me know where I am going wrong. PLEASE

Sorry to tag you @George but would you have an answer to this?

Could you describe what you want to do exactly and when are you getting this error?

Connect to docker on our server through wappler using TLS

Still need more info, to what server are you connecting to? Seems like a local server to me.

Where is it and how was it created?

so it is a Ubuntu server running aapanel
Has Docker installed on it which is working fine.
I can get to it through an external IP of internal IP address.

I’ve followed all the instructions on https://docs.docker.com/engine/security/protect-access/
However I can not get Wappler to connect to it at all, from what I am seeing on dockerd it seems to be a handshake error…

I just want the secure connection from Wappler to the Server

One question @George does there have to be a new certificate for each docker container? or is there one that can cover all?

Yes there has to be a lot certificates for each docker server if you are using TLS. So it is better not to do it manually.

Those are created automatically if you using Wappler docker machine in the project target docker settings when using remote docker.

The new Resource Manager makes this even easier to create dockers servers with any cloud provider. It doesn’t use TLS certificates but just SSH keys which makes the manageability even easier.

So I suggest that you just use the Resource Manager.

problem is there is no where for me to add my server in the resource manage is there?

See:

I know it works with cloud server, but that does not help me as I want to use my own server without leaving Docker insecure…
Currently this is the only way I can connect to it.
Which is why I was asking about the TLS

Docker is setup fully secured by Resource Manager or by the Docker Machine in Wappler. You don’t have to do any additional settings for TLS and such

yes but that is for cloud servers like digital ocean…

I want to use my own ubuntu server with docker on it.

And where is your own Ubuntu server placed? Is it just a local machine on your network?

yes it is a local server on my network. But obviously it is connected to the outside world which is why I need to use TLS.

If I make an insecure connection then no issues, but this leaves it open to pretty much everyone.

well if it is a local server then you need to do quite a lot of more manual work indeed. So generally I wouldn’t advise it, specially if you are exposing it also to the public world.

A cloud provider server is much better, secure and easy to setup .

If you really insist to use and setup your local server, then you can follow indeed the docker guide and create all various certificates for both server and also local access. Then you can specify the local folder with all the local certificates for access.

image

yes have followed that to the letter and it still does not like it.

The error I get in Wappler is
ERROR: error during connect: Get “https://192.168.86.38:2376/v1.24/info”: x509: cannot validate certificate for 192.168.86.38 because it doesn’t contain any IP SANs

20 hours trying to sort it out, its killing me.
Would you being a smart person have any ideas?

So it turns out there I was bringing over the wrong certs and a daeom file needed to be created.
Got it all working now. :slight_smile: