ronivay / XenOrchestraInstallerUpdater

Xen Orchestra install/update script
GNU General Public License v3.0
1.18k stars 189 forks source link

Cannot change port number #68

Closed Rhandyx closed 3 years ago

Rhandyx commented 3 years ago

Hi

I have try change port number in /opt/xo/xo-server/config-toml I change port = 8085 and restart xo-server but still using port 80

After I try change it on /etc/xo/xo-server/config.toml but not takes any effect.

ronivay commented 3 years ago

Hi,

How about looking at the xo-install.cfg as README instructions tell you to? You can define port number there and it's set to Xen Orchestra configuration during installation/update. Running update in this case is the preferred method and makes sure that port number stays the same for you in the future. Update doesn't run if there aren't any changes compared to current version. If you absolutely have to touch configuration file by hand, you can find it from /root/.config/xo-server/config.toml (assuming you haven't changed XOUSER in script configuration). Just remember to set it in xo-install.cfg as well or otherwise it'll change back when you run update next time.

andrewdbate commented 2 years ago

In fairness to the original poster, it does not say in the README that the usual Xen Orchestra configuration files cannot be edited. In fact, in the XO documentation, it says that the configuration file needs to be edited after installation to change the port number here: https://xen-orchestra.com/docs/configuration.html#configuration

Your comment provides additional information not in the README, which is that we are not supposed to edit configuration files and instead edit the xo-install.cfg and then run the updater script if we need to make a configuration change. (This is how I found this issue in the first place. But how configuration is handled does seem to be touched on in the wiki.)

ronivay commented 2 years ago

Correct, it does not. README instructs to modify xo-install.cfg to suit your needs. Script will generate said XO configuration file based on settings in xo-install.cfg and doing changes to it manually will be overwritten if update is ran with the script. It doesn't mean one cannot edit the config file directly, it's just not the preferred way if options in xo-install.cfg are enough. Script even tells you the exact location of XO configuration file when ran and what to do to prevent it being overwitten if edited manually.

Problem with the original poster was that they were editing wrong config file and editing such setting that this script can do for them, meaning there's no reason to edit XO config file directly

Not every little detail is mentioned in the README. If it instructs to edit some file to match what you want to do, i except people to do that and not mix and match XO's own documentation with this one without knowing what they're doing :) If you think documentation is confusing or inaccurate, I'm more than happy to review improvement pull request(s). I admit that i might overlook some things simply because it’s too obvious to me so please contribute.