How to run YunoHost on docker with custom port

Hello, I’m considering using YunoHost but I am only interested in running it under Docker. I found a Docker image for it: https://github.com/YunoHost/Dockerfile

I can see that the command binds a variety of ports. However, I have other services running on my server that already use these ports, so I would like to remap everything to my own ports. For example 80 should go to 50000, 443 should go to 50001, etc. Is this possible to do?

While I can easily modify the Docker run command to bind ports as I like, often the programs themselves require altering configuration files to reflect the non-default port. So I suspect simply changing the bound ports will break apps instead.

You should be able to redirect all ports like in this command:

docker run -p 127.0.0.1:$HOSTPORT:$CONTAINERPORT --name CONTAINER -t someimage

If you redirect 443 and 80 you will not be able to use let’s encrypt certificate directly with the yunohost let’s encrypt integration.

Note: this docker image hadn’t be updated since 3 years, probably it’s not working. I know some people has interest on making yunohost running on docker, but i don’t know how they progress.

1 Like