# Setup Server

There are two components to setting up the server:

1. Enabling the server in the CodeMeter WebAdmin application.
2. Configuring and starting the VisionPro Deep Learning Service.

Note: These steps are only necessary when using the network licensing model of the client/server functionality, where the server has the Cognex Security Dongle, and the client does not have a Cognex Security Dongle. If the client devices have their own Cognex Security Dongle attached, this setup is not necessary.

## CodeMeter WebAdmin Configuration (Server)

1. On the server device, from the CodeMeter Control Center, open the WebAdmin in your browser.

2. From the Configuration drop-down menu, select Server, then Server Access.

3. Set the Network Server radio button to Enable.

4. The Network Port setting of the CodeMeter Service is automatically set. The default setting is port 22350.

   Note: If you have another application using port 22350 and you need to change the network port setting, see the Change the Server Network Port Setting.
5. Press the Apply button.

6. After configuring the server, you will need to launch the VisionPro Deep Learning Service application, which will allow the clients to run the inference and training processes.

   Note: The inference and training capabilities are dependent on your VisionPro Deep Learning Licenses configurations. Please contact your Cognex sales representative for more information.

## VisionPro Deep Learning Service Configuration (Server)

After configuring the server using the CodeMeter WebAdmin, you will need to configure and launch the VisionPro Deep Learning Service application, which will allow the clients to run the inference and training processes.

Note: The inference and training processes are dependent on the license configurations. Please contact your Cognex sales representative for more information.

1. Navigate to the VisionPro Deep Learning Service application, located in C:\Program Files\Cognex\VisionPro Deep Learning\3.0\Service.
2. Launch the VisionPro Deep Learning Service application(VisionPro Deep Learning Service.exe) to determine what port number the service will be using, which will be indicated by the "Listening at http://localhost:PortNumber" line (where "PortNumber" will be the port number assigned to the service, for example 8080) after the service starts.
3. Write down the port number and close the service.
4. Right-click the VisionPro Deep Learning Service application and create a shortcut to the application.
5. Navigate to the shortcut version of the VisionPro Deep Learning Service application, right-click the application and select Properties.

6. Select the Shortcut tab, and in the Target field, append the --http-address=http://*:8080 argument to the target.

   The Target field should be the following: "C:\Program Files\Cognex\VisionPro Deep Learning\3.0\Service\VisionPro Deep Learning Service.exe": --http-address=http://*:8080

   Note: You can also specify the exact IP address of the server, using the following argument: --http-address=http://10.10.10.10:PortNumber
7. Press OK to close the Shortcut Properties dialog.

8. When you are ready to start the service, select the shortcut, right-click and select Run as administrator.

   Note:

   If you do not run the service as an administrator, you will get an error and be unable to connect.

9. After launching the service as an administrator, configured clients will be able to connect to the server. The VisionPro Deep Learning Service will display the port number that it is listening to for training requests. Clients will need the IP address and port number of the server to be able to connect to the server.

## VisionPro Deep Learning Service with Firewall (Server)

If you can not access to the server due to the Firewall, please follow this guide.

1. Open Widows Defender Firewall with Advanced Security.
2. Select Inbound Rules and select New Rule.
3. Choose Port and click next.
4. Input 8080 in the Specific local ports and go next.
5. Select Allow the connection.
6. Select "Domain", "Private" and "Public" and click the next button.
7. Fill in the Name box and click the finish button.

## Change the Server Network Port Setting

By default, the CodeMeter Service uses 22350 as the network port. If you have another application that is using that port, you will need to change the port setting. To change the network port setting, perform the following steps:

1. On the server device, from the CodeMeter Control Center, open the WebAdmin in your browser.

2. From the Configuration drop-down menu, select Server, then Advanced.

3. Click the Extra tab, and in the Network Advanced container, press the Edit button.

4. The Network Port field will be enabled, and you can enter the desired Network Port for the Server.

5. After entering the new Network Port value, press the Apply button.

6. The new Network Port value will appear in the field, and you will need to restart the CodeMeter application.