Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change the 80 port #9

Closed
impovich opened this issue Jun 11, 2021 · 8 comments
Closed

Unable to change the 80 port #9

impovich opened this issue Jun 11, 2021 · 8 comments

Comments

@impovich
Copy link

impovich commented Jun 11, 2021

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

@ronivay
Copy link
Owner

ronivay commented Jun 11, 2021

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.

@impovich
Copy link
Author

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.

@ronivay
Copy link
Owner

ronivay commented Jun 11, 2021

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.

@impovich
Copy link
Author

impovich commented Jun 11, 2021

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

@impovich
Copy link
Author

I think the easiest way to solve my issue is to change TrueNas HTTP/HTTPS ports

@ronivay
Copy link
Owner

ronivay commented Jun 14, 2021

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.

@impovich
Copy link
Author

impovich commented Jun 14, 2021

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.

@impovich
Copy link
Author

@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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants