How to change the hostname of your Project Server

Last modified by Christian Reiber on 2021/05/10 07:26

What is it

The hostname is an important part of all URLs used to contact your Project Server's services. Changing this hostname is not as lightweight as it sounds because it involves a complete recreation of the reverse proxy setup.

Prerequisites

Determine the new, fully-qualified hostname and make sure that the new name is resolved by the Domain Name System (DNS).

If your IP adress remains the same you may ease migration by having both the old and the new hostname in the DNS. Be advised though that after having executed the hostname change in your PS it will immediately start to issue links with the new hostname. Then, if your browser is unable to resolve the new hostname you cannot work with your Project Server anymore. As a temporary workaround you can enter the new hostname in your local hosts file (Windows: C:\WINDOWS\system32\drivers\etc\hosts, Unix and MacOS: /etc/hosts, modifying these files needs administrator privileges). You should remove this entry once you are able to resolve the hostname through DNS.

How to achieve it

  1. As a side effect this procedure will update all stacks to their current version. If you want to avoid this note the version ids of the currently installed stacks by running docker-stack status using the version id's in column "Installed".
  2. Uninstall all PS4 stacks. This will not eliminate your data, just remove the software container. To uninstall execute docker-stack uninstall all.
  3. t.b.d.: How to change the PSA hostname. Must imply running "psa configure". 
  4. As user root issue this command: docker-stack configure host <hostname>. (If your IP address changes, too, also provide the new IP address: docker-stack configure host <hostname> <ip-address>.)
  5. If you are using HTTPS to access your PS4 you need a new TLS/SSL certificate which reflects the changed hostname.
    • If your TLS mode is make then execute docker-stack configure tls make. This generates a certificate for the new hostname.
    • If your TLS mode is take you have to provide a new certificate consisting of a certificate file, a key file and a chain file and install it by executing  docker-stack configure tls take <crt-file> <key-file> <chain-file>.
  6. Now reinstall all PS4 stacks using command docker install <stackname>. This is will install the current version of the stack. If you want to return to the very same version you had installed before use the version id you noted above and issue the command docker install <stackname>@<version>.

Good to know

Tags:
Created by Christian Reiber on 2020/03/24 21:09

Navigation