Editing the Hansoft web service configuration file

The configuration file contains information about Hansoft, the web client, and integrations. You must change some of the settings for the web client and integrations to work correctly, but there are also optional settings you can change. We recommend not changing settings unless you know what they control.

If your Hansoft instance is hosted in the cloud by Perforce, contact Support for help.

Note:  If you already have a web server installed on the computer hosting the Hansoft web service, there may be port conflicts. The default port used to connect to the Hansoft web service (WebPort in the configuration file) is 80, which is the default port that Microsoft IIS listens on. You can change this port for the Hansoft web service in the configuration file.

Installation of the Hansoft web service includes a nginx web server. Ports 8080 and 8087 are used for the connection between the between the Hansoft web service and nginx web server, which may be used by other web servers already installed on the computer. If you want to use a different port than 8080, add the LocalPort setting to the configuration file. The 8087 Hansoft port is not configurable. See Example file.

1. Open the HPMWebConfig.json file in the directory where you extracted the web service files.

Tip:  If a HPMWebConfig.json file does not exist, you need to create one. In the directory you extracted the web service files to, make a copy of the HPMWebConfig.json.example file and delete .example from it. The resulting filename must be HPMWebConfig.json.

2. Make any changes to any of the values. Replace the existing values with information about your installation.

3. Save the file.

4. Restart the web service. See Starting and stopping the Hansoft web service.

File values

Make any changes to the setting file values to provide information about your installation.

Setting Description Example value
HansoftHost IP address or DNS name of the Hansoft Server to connect to from the web service. "localhost"
HansoftPort Port of the Hansoft Server specified as the host. "50256"
HansoftDatabase Hansoft database to connect to from the web service. "Company Projects"
HansoftUser SDK account in Hansoft to use to connect from the web service. "HansoftWebSDK"
HansoftPassword Password for the specified Hansoft SDK user. Only the following special characters are allowed: !?&$%-_+
"password"
WebPort Port to connect to the web service. Default is port 80. If another web server is running on the computer, you may need to change the port number to avoid conflicts.

If you set this value to 8080, it will conflict with the default port for the LocalPort setting.
80
WebSSLPort SSL port to connect to the web service. Default is port 443. 443
LocalPort Port to use for the connection between the Hansoft web server and nginx server if you do not want to use the default port, which is 8080. Setting is not included in the file by default. 8090
Domain Domain for the service to use to configure a self-signed certificate. Default is port 443. If not using the default port, you must specify the port after the domain. "hansoft.example.com"
CertificateCountry Two character country code for the service to use to configure a self-signed certificate. "US"
CertificateLocality City name for the service to use to configure a self-signed certificate. "City"
CertificateOrganization Organization name for the service to use to configure a self-signed certificate. "Example organization"
CertificateOrganizationalUnit Unique identifier for the organization responsible for the self-signed certificate. "Development"
IntegrationEnable_Slack Boolean that indicates if the Hansoft Slack integration is enabled.

Valid values:
true — Slack integration is enabled.
false — Slack integration is not enabled.

See the Slack integration help for more information.
"false"
SlackBotOAuthAccessToken Unique token used by the Slack integration. This is provided in the .zip file you can download when configuring the integration.

See the Slack integration help for more information.
 
HelixCoreCommentType Changelist description text automatically added to the description entered by the user when adding a changelist to a Hansoft item. See the integration help for examples of each value.

Valid values:
none — Does not include any additional description text. Default.
url — Includes the URL to the Hansoft item.
database id — Includes the Hansoft database ID.
task description — Includes the Hansoft item description text.
"Url"

Example file

{
	"HansoftHost": "localhost"
	, "HansoftPort": 50256
	, "HansoftDatabase": "Company projects"
	, "HansoftUser": "WebSDK"
	, "HansoftPassword": "hpmadm"

	, "WebPort": 80
	, "WebSSLPort": 443
	, "LocalPort": 8090			

	, "Domain": "hansoft.example.com"
	, "CertificateCountry": "US"
	, "CertificateLocality": "City"
	, "CertificateOrganization": "Example Inc"
	, "CertificateOrganizationalUnit": "Development"

	, "IntegrationEnable_Slack" : "false"
	, "SlackBotOAuthAccessToken" : ""


	, "HelixCoreCommentType" : "url"
}