# Configuring the Service

You can customize certain behaviors for the TERR service by exporting the service properties, editing the file, importing service properties, and then applying the new configuration.

## About this task

Perform this task on the computer where you have installed Spotfire Server.
Note: For general information about configuring services for Spotfire Server, see the Spotfire® Server Installation and Administration user guide.

## Before you begin

- You must have completed the steps outlined in Installing the Service on a Node Manager for a Spotfire Server.
- You must have administrative read-write privileges to save the changed configuration file.

## Procedure

1. Open a command line as administrator and change the directory to the location of the command-line config tool (on Windows, config.bat; on Linux, config.sh).
   The default location is <server installation dir>/tomcat/spotfire-bin.
2. On the command line, issue the following command:

       config export-service-config --capability=TERR --deployment-area=<your deployment area name>

   If you already have a configuration name from previously editing the configuration, and you want to change that configuration, provide the configuration name using the `--config-name=<configuration name>` option.
   The file named custom.properties is exported and written to the directory <server installation dir>/tomcat/spotfire-bin/config/root/conf.
3. When prompted, provide the password for the config tool.
4. Using a text editor, open and edit the file <server installation dir>/tomcat/spotfire-bin/config/root/conf/custom.properties.
   The text file contains comments to provide you with information about each property. Alternatively see the individual reference topics for the properties for more information.
5. Save the changes, and then close the text editor.
6. Optional: Copy any additional files to add to the configuration into the directory <server installation dir>/tomcat/spotfire-bin/config/root/conf/.
   For example, you can add a configuration script. (Configuration scripts must be specified in the custom property `startup.hook.script`. See Startup script for more information.). For a Linux OS deployment, you can add a Dockerfile.
7. From a command line, return to the directory for the command-line config tool.
   The default location is <server installation dir>/tomcat/spotfire-bin.
8. On the command line, issue the following command:

       config import-service-config --config-name=<new-config-name>

   The `config-name` you specify identifies this configuration, so provide a name that is meaningful for the change. For example, if you create a configuration with a specific debugging level, you might name the configuration Debugging.
   Note: You cannot overwrite the default configuration. You must provide a configuration name when you import the custom configuration.

   See the reference topic for `import-service-config` in the Spotfire Server and Environment Installation and Administration user guide for information about additional options.

9. Open a web browser and log in to the administration console for Spotfire Server.
10. Click Nodes & Services.
11. Under Network, select Node managers, and then select the TERR service.
12. Click Edit.
    The Edit service dialog is displayed.
13. In the Configuration drop-down list box, select the configuration name to apply, and then click Save.

## Results

The service is stopped, and then Spotfire Server restarts the service and applies the new configuration. The TERR service begins recording information to the Service Logs. For more information, see Service Logs.
Note: To change the new configuration, export it again, specifying its name. If you do not specify the name, the default configuration is exported.