# Configure ports for using LeanFT in a multi-session environment

LeanFT supports working in a multi-session environment such as a Windows server or a Citrix server. A separate instance of the LeanFT engine runs in each session.

To run a separate instance of the LeanFT engine in each session, you must configure unique port numbers for each session.

In each session, do the following:

1. Configure the config.json file locally

   1. Open your local config.json file in a text editor.

      On Windows, the file is located in %localappdata%\LeanFT\config\. If this folder does not exist, create it.

      On Linux/Mac, open the config.json file for editing from the following location:

      Linux | ~/.leanft/config
      Mac | ~/Library/Application Support/LeanFT/config

   Note: If this is your first time editing the configuration file, the config folder will be empty. You need to copy the file from:<LeanFT installation>/lwe/lightweight-engine/config

   Caution: The format of the file has changed from the previous version of LeanFT. If you had a previous version of LeanFT installed and had customized this file and you want to make additional modifications, then you must copy this file again. Make sure to make all your previous customizations along with any new changes.

   2. Define the connection port:

      1. If the port property is not displayed, add the following:

         "port":<CONNECTION PORT>

      2. Define the connection port. Make sure that this port is available on the client machine. By default, the connection port is 5095.

   3. Add the following line, and enter a port where the browser and the agent can communicate with each other. Make sure that this is an available port on the client machine.

          "browser-agent-port":<AVAILABLE PORT>

   4. In LeanFT versions earlier than 14.53:

      Add the following line and enter an available port number (by default LeanFT listens on port 5097):

          "rest-api-port":<AVAILABLE PORT>

   5. Save the file.

2. Configure the Functional Testing Agent in your browser:

   In your browser, open the Functional Testing Agent options.

   Chrome and Firefox (version 57 or later) | Open chrome://extensions/ (in Chrome) or about:addons (In Firefox) Find Functional Testing Agent. Click Options. Change the LeanFT Server Port to the port you defined for the browser-agent-port in step 1 above.
   Firefox (version 56 or earlier) | Go to about:config. Find extensions.FT.FirefoxAgent@hpe.com.sdk.LeanFTServerPort Set the value for LeanFT's server port to the port you defined for the browser-agent-port in step 1 above.

3. Update your LeanFT projects' configuration files

   For each LeanFT project:

   1. Open the configuration file (App.config or leanft.properties)

      In the connection address property, change the port to match the connection port that you defined in config.json in step 1 above.

          <sdk mode="replay">
            <connection address="ws://localhost:<CONNECTION PORT>">
              <connect timeout="60" />
              <response timeout="600"/>
            </connection>
            <server autolaunch="true" />
          </sdk>

   2. Save the file.

https://admhelp.microfocus.com LeanFT 8942
Tips to improve your search results...TOC Lean Functional Testing Help Center LeanFT Help Center 14.50 - 14.53 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version:(Undefined variable: _rscC_Basic_Variables.FloatingTocShow)