Serve Servicely behind a reverse proxy
Point the base URL and its start-up script at your own address after you put a reverse proxy in front of Servicely.
A reverse proxy on your own web servers serves your instance from your own address, such as https://support.example.com, and the browser keeps showing that address. Follow this task once the proxy works, so that Servicely builds its links and its single sign-on addresses from your address.
Before you begin
- You need the
administratorrole. - Switch to the Administration workspace with the Workspace selector at the foot of the menu.
- The reverse proxy is set up and tested. Your organisation runs and supports it. A domain or a subdomain both work, as long as you enter the same full address everywhere.
- Tell Servicely Support that you are making the change.
- On a live instance, plan the change for a time outside business hours.
- Copy the current script and, if you use single sign-on, the identity provider’s Login URL and IDP Metadata XML to a file, so you can put them back.
Steps
-
Go to Applications & licensing → Applications → Application properties.

The Applications & licensing menu open at Applications, with Application properties. -
Open
system.baseurl, replace the address in Application properties value with your own, and select Save. -
Go to Scripting & automation → Scripts → System configuration scripts.

The System configuration scripts item under Scripts in the Scripting & automation menu. -
Open “Set initial BaseURL System Property”. The default script runs each time a server node starts and sets
system.baseurlback to the instance’s own Servicely address.
The System configuration scripts list with Set initial BaseURL System Property, of type Node startup. -
Replace the script with this one and select Save. Set
instanceAddressto your instance’s Servicely address andproxyAddressto your own. Enter both without a slash at the end.// See if the property already exists let propertyRecord = ApplicationPropertyManager.getGlobalPropertyRecordByKey("system.baseurl"); let generatedBaseURL = ApplicationPropertyManager.generateDefaultBaseUrl(); let instanceAddress = "https://<instance>.servicely.ai"; // The instance's Servicely address let proxyAddress = "https://support.example.com"; // Your reverse proxy address if (propertyRecord == null) { // It doesn't exist, so create the property ApplicationPropertyManager.createGlobalPropertyRecord( "system.baseurl", generatedBaseURL, "string", "The base URL to use for URL construction (e.g. creating external links)" ); } else { let currentValue = propertyRecord.Value(); if (generatedBaseURL == instanceAddress) { // On the production instance, keep the reverse proxy address if (currentValue != proxyAddress) { propertyRecord .Value(proxyAddress) .update(); } } else { // On any other instance, such as a clone, use its own address if (currentValue != generatedBaseURL) { propertyRecord .Value(generatedBaseURL) .update(); } } }
Result
Servicely builds external links from your address. The address stays after a restart of the production instance. An instance cloned from production sets the base URL to its own Servicely address when it starts.
Variations
Single sign-on is already set up
The identity provider holds addresses built from the old base URL. Replace them after you change system.baseurl.
- Go to Access & security → Authentication → Identity provider and open the identity provider.
- Clear Login URL, IDP Metadata XML and SP Metadata XML, and select Save. Servicely writes SP Metadata XML again from the new base URL.
- In your identity provider’s own administration, replace the Servicely address with yours in the identifier and the reply URL. Keep the rest of each URL, from
/idp_callbackon. - Download the identity provider’s metadata again, paste it into IDP Metadata XML and select Save. Servicely fills in Login URL from it.
- Sign in through single sign-on in a private browser window.
If you set up single sign-on after the proxy, the URLs already use your address.