More than one domains on the same server, is it possible?


I successfully could launch my server either on aws with plain ubuntu 16.04 and on my dedicated server using docker.
The successfull combination was to use the attached dockerFile and or use the analogue instructions on plain ubuntu.
What I am missing now is to be able to host TWO domains on the same server, I expected that it could work on docker cloning the image and remapping the porst 4010x to say 5010x, but it seems this is not working.

My question is: is it possible to configure TWO domains with their distinct domain-server and assignment-client with different ports in the same server either with plain ubuntu or BETTER using docker? For instance having the first on 40100 and the second on 50100?


My working dockerfile:

FROM ubuntu:16.04

RUN apt-get update && apt-get upgrade -y
RUN apt-get install software-properties-common python-software-properties -y
RUN add-apt-repository ppa:beineri/opt-qt59-xenial -y
RUN apt-key adv --keyserver --recv-keys E9A40B0F
RUN add-apt-repository "deb [arch=amd64] xenial o2t-hf" -y
RUN apt-get install apt-transport-https -y
RUN apt-get update -y
RUN apt-get install o2t-hifi-stack-stable -y
RUN apt-get install gcc -y

RUN adduser --system --shell /bin/bash --disabled-password --group --home /home/hifi hifi

EXPOSE 40100 40101 40102 40103

domain-server &
assignment-client --max 10 &


I have like 10 domains pointing to mine. In your placename page just point them all to the same server.

Oh, you want to run 2 instances of hifi on the same server… misunderstood your question.


Yes, right, I reread my question and actually it can be read as having more than one names pointing to the same domain, but in fact, I’d like to have TWO distinct domains with different domain-server and assignment-clients acting with different ports. This is to simplify logical distinction among different places, and I think it is too expensive to pay further dollars just to hold an (almost always) empty place.


I dont see much issue with the dockerfile. Are you using docker-compose to reassign the ports or? (Will try it out this weekend though when I start working on a ticket related to the servers).

Did you first get it to work with a single container? What is the issue logs say when trying to connect? etc.

Generally speaking it should be possible to have multiple domain servers running on a single machine, but Id think it would be inadvisable due to the amount of assignment clients needed, unless you have server/host with multiple cores to handle it.

I am not that familiar with the Linux server builds of hifi, so take the following with a grain of salt:

In anycase, I am guessing the biggest blocker came with trying to the client from the docker container domain to the assignment clients in that container.

One test would be try first just the web panel: The 40100 / 40101 ports are hardcoded as the HTTP/S web control ports. They are hard coded into the domain. If you forward these from docker to 50100/50101 that should work as well through the web interface. (this can also be done used health checks for docker compose). if you get that to work, the rest should be doable as well.

The part where it gets tricky is having the to set the server ports for the assignment clients. If running it within the container, make sure that

Otherwise you can always manually point assignment-clients to their domain-server via assignment-client --a hostname --server-port # Note that this is port that ends with 2, so in your primary: 40102, secondary: 50102. When you connect to the domain, check the connection status. If you are connected to the domain, you should have a ping for domain, but if assignment clients haven’t resolved, then other servers in the domain will appear with a negative response time.

But yeah as stated, I havent played around with it my self that much, but it would

Probably a good idea to ask the gitter during office hours if they’d have a faster answer.

Tired of compiling your Linux HiFi server every release? Docker!