Unable to change the 80 port
impovich opened this issue · comments
Hi,
/var/lib/xo-server doesn't contain config.toml
Is it possible to change the 80 port somehow?
also passing other from root PGID doesn't make any effect,
drwxr-xr-x 4 root root 4 Jun 11 22:55 data
Hi,
Config is in /etc/xen-orchestra/packages/xo-server/.xo-server.toml inside container. Changing config parameters isn't currently supported by container otherwise than fiddling the config manually.
Obviously you should be able to forward any port from the host to containers port 80, so there shouldn't be a reason to change port inside container unless very specific usecase.
Thank you for the prompt reply,
I'm running the container on TrueNas Scale, TrueNas web is on the 80 port itself, so if I set the network to HOST instead of DHCP for the container config I simply can't reach xen-orchestra, and I don' really want to change TrueNas port.
Hi,
I don't have specific instructions for you to try on your truenas, but any system using docker containers usually have the ability to map specific port on the host that's then forwarded to port inside the container.
See the readme examples of docker run command, -p 80:80 will do exactly this. One could change this to 8080:80 and then you would open up http://host-ip:8080 and end up to container that's running with port 80, without modifying the container at all.
That what you have written makes sense and that is how things work, on TrueNas scale docker is under k8s, so basically what I have done I created nodeport 38999:80 and when I type my_nas_ip:38999 I'm getting to the login page of TrueNas
truenas# kubectl get service --all-namespaces
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default kubernetes ClusterIP 172.17.0.1 <none> 443/TCP 4d6h
kube-system kube-dns ClusterIP 172.17.0.10 <none> 53/UDP,53/TCP,9153/TCP 4d6h
ix-transmission transmission-ix-chart NodePort 172.17.164.240 <none> 9091:36019/TCP,51413:36020/UDP 5h8m
ix-xen-orchestra xen-orchestra-ix-chart NodePort 172.17.126.163 <none> 80:38999/TCP 84m
I think the easiest way to solve my issue is to change TrueNas HTTP/HTTPS ports
Hi,
You probably figured this out already, but just wanted to let you know. I refactored the image quite a bit and it now has the option to change listening ports as well. Check out the updated readme if interested.
Hi @ronivay yeah, I stopped using the hostNetwork and forwarded the port properly to a Kubernetes POD so everything is fine.
Thank you, this functionality might be helpful anyway.
@ronivay just in case you are interested to push your image further, there is a project https://github.com/k8s-at-home, they maintain a number of useful services and provide HELM charts for deployment. k8s-at home is used by https://github.com/truecharts/apps which is used by TrueNas Scale and TrueNas Scale is used by a lot of users with homelabs.
Would love to see it there :)