Change port to 8080 from 80

I am already using 80 port for some other my project also I am trying to use one of my webiste with Cloudflare and ssl of Cloudflare. But, the Cloudflare project is not allowing me to change 80 port to 8080. I mean the website that time is not returning. May I know what should I do?

Port 8080 is specifically for HTTP on Cloudflare, so you can’t use HTTPS. Why do you need port 8080?

I am not using for HTTPS the 8080. For SSL I am using the 8443. I have two nginix project the one is simple websites the other one is using nginx as microservice. When I am trying to run that micreservice via docker than I am facing that issue. So, I must to change 80 Port to someother port like 8080. But that time my all website and microservices are working expect Cloudflare website.

ERROR: for nginx Cannot start service nginx: driver failed programming external connectivity on endpoint nginx (191b9ce11c3cda3911a2e0420d39ce473a30ad3619b96a1deed6737ed945d266): Error starting userland proxy: listen tcp4 bind: address already in use

Use Cloudflare Tunnels - they’ll let you reverse proxy multiple hostnames to non-standard ports whilst serving the website on 80/443 normally.

1 Like

Well, you cannot run two services on the same port, but I would suggest you get the services up and running as you wish (on Cloudflare ports) and once that works, you can add Cloudflare to the mix.

Another solution would be to use Tunnel and have your server connect to Cloudflare - - that may be an option too.

1 Like

I know I can not run two services on the same port so I just changed to 8080 from 80. All websites are woring well expect one website which is using ssl of clouflare.

Well, your error message shows that you were trying to run them on the same port.

As I said, get everything to work without Cloudflare, then it will work with Cloudflare too.

1 Like

What you mean
‘get everything to work without Cloudflare, then it will work with Cloudflare too’ Can you demonstrate for me because I am naive for that…
Also, I am just started using the tunnels as well but stil I am facing the same error. If anyone could help me I would really appraciate.

You need to make sure your entire setup works without Cloudflare. If it does, then it will work on Cloudflare as well.

As you can see the microservice project is using subdomain of Cloudflare website. Just instance my website name is and the microservice is using also and both should work with ssl. May I know how can I run the project and website without Cloudflare despite I am using for ssl?

That’s the point, the whole setup needs to work without Cloudflare, otherwise you have exactly the issues you are currently having.

Also, Cloudflare does not provide any more SSL than you already need to have anyhow.

Hence again, get the setup working without Cloudflare, then it will work with Cloudflare as well.

My suggestion, run the two services on different ports and install a local reverse proxy which proxies to these services based on the path. Then you can also configure a proper SSL certificate for that proxy and place the whole thing behind Cloudflare if you like.

But again, your setup needs to work without Cloudflare first.

May I know how I will run the ssl without Cloudflare?

By installing a certificate on your server? Like any other service does, which does not use Cloudflare.

Cloudflare is not intended for SSL. They just issue a certificate for the proxies, but your server still needs to be secure as well.

Yes, but I don’t know to use free ssl service in Docker container :frowning: I have knowledge to use for websites but not for micro services. May I know what’s magic of Tunnels ? Is not worth for my case ?

In that case I would recommend you read more about these services and how to configure them properly. If your sites are not working fine, you’ll only run into issues when using Cloudflare.

As for Tunnel, that will mostly be useful for services which run behind a firewall or on non-standard ports, but you will still need to decide how to set it up, as you will still have to separate the services logic-wise. But if you have a specific Tunnel question you best cover this in your other thread.

I am confused why everone suggest me to use Tunnel then :slight_smile: Thanks for all

I am not sure who everyone is, but I briefly suggested it, because it certainly is an option, but you can still not merge two services with it. So you will need at least two distinct hostnames and that you can achieve with a traditional setup as well.

But again, you should really focus for now on getting the services up and running without Cloudflare and once that works, Cloudflare should work out of the box.

I can only emphasise this once more :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.