Using Custom Domains and SSL with Let's Encrypt and Traefik

I finally was able to make this work :slight_smile: I had some figuring out to get it right so if this helps anyone.

  1. It’s an experimental feature, so had to enable experimental feature from settings.

  2. You have to enter all the settings: Portainer, Dashboard, username, password etc. I tried it with just the traefik setting on and dashboard as ‘off’, nothing happens. But the UI doesn’t give any indication that dashboard is mandatory or anything.

  3. Then I ran into this error:

ERROR: for traefik Cannot start service traefik: driver failed programming external connectivity on endpoint traefik (703c6972ebf3bf79ebac9823a23c5aa9dc4b0ad73323ba3e0813ee8cbc6946b5): Bind for 0.0.0.0:80 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.
Error Deploying Services on Docker Machine OrderManagementDemo!

This was because my node server was also running on the same port.

I made port as blank in Node, deployed to remote and then apply traefik & portainer settings again, it showed the green lights

and then I changed the host of the Server to my ‘https’ domain.

It worked out in the end.

5 Likes

I was in the process of writing a similar post. I had the same issues, PHP server running on port 80. Probably just needs a note in the instructions to either shutdown the docker web service whilst installing Traefick or change the port number before installing Traefik. Works well once up and running though.

1 Like

Thanks - yes will adjust the docs for the final release.

2 Likes

Got this working, to reiterate the above feedback - you must install both portainer and traefik - this is the part I was missing.

However, neither dashboard appears to be working, neither the portainer.mydomain or traefik.mydomain - can’t access either and when return to the project settings, the user and password are blanked out - even if I continue to save it.

Screen Shot 2020-09-07 at 2.32.57 pm

I am having the same issue. Assigned both subdomains to the server IP and it’s showing the following text: 404 page not found

A post was split to a new topic: Missing Dockerfile when deploy

traefik is running but when I open website in browser it gives me 404 error: {“status”:“404”,“message”:"/ not found."}

Also I managed to install traefic and portainer and they are working well, however the main site is showing me 404 page not found message, with the not secure tag on top, and Your connection is not private. I don’t know where I went wrong?
I followed all the steps and got the green light after deploying but the ssl may have not installed correctly I think.

This is usually because Traefik currently only sets up one host (either www.yourdomain.com or yourdomain.com - not both) there is a workaround for this, while @george and the team add a couple of options to the setup. You can find it here:
Www and non-www certificates in Docker

Hey bpj, actually I don’t have any url forwarding for www.mydomain.com to mydomain.com so I am only using the basic mydomain.com but still after I tried installing ssl through traefic and the steps mentioned above, something went wrong and now the site is not accessible because I am getting this message:

In project settings, is the domain set as https://your domain.com? (Ensure it is https://)

1 Like

Got it working now. Initially it wasn’t working because I had the ip address in there with the https, and I didn’t change it because I thought it was the same thing as writing https://mydomain.com. Thanks

1 Like

5 posts were split to a new topic: Digital ocean managed database connection with SSL

mm found it… :)…

mmm is this applicable to AWS as well (**SSL with Let’s Encrypt and Traefik) or is there a guide on how to setup SSL with AWS?

If you’re using Docker managed by Wappler (you use Wappler to deploy) should be the same

1 Like

Thanks Apple. Its a pitty DO dont have a “node” here in South Africa… best one is London for us… otherwise i would keep to DO…

The topic has been updated to reflect the latest changes in the Resource Manager and project deployment options.

A post was split to a new topic: Error on docker deploy

It is possible to do that without domain? Just with the IP? For use cases when you are testing things or don’t wanna move the domain of the client yet.