# Changing Web Server port in OpManager You will be prompted to change Web Server port during installation. You can also change it after installation. **Note:** It is mandatory to change the OpManager port only from the UI, if any agent-monitored devices are present. [Steps to change the port number in version 126278 and above.](https://www.manageengine.com/network-monitoring/help/changing-ports-in-opmanager.html#new) [Steps to change the port number in versions below 126278.](https://www.manageengine.com/network-monitoring/help/changing-ports-in-opmanager.html#old) ## Steps to change the port number in version 126278 and above The steps to change the port number are as follows: 1. Stop the OpManager server. If you are running OpManager as Windows service, stop the service. 2. Open Command Prompt as Administrator, and navigate to */bin* directory. Then, execute the following command: In Windows, **ChangeWebServerPort.bat ** In Linux, **sh ChangeWebServerPort.sh ** **Note:** - The should be either http or https, and the port will change accordingly. - The **** is the one in which you want to run the Web server now. - Once the script has been executed, start the OpManager server. **In OpManager,** Users can change the port number from OpManager's UI. To change the port number via OpManager settings, Go to **Settings** -> **General settings** -> **Server settings** -> **Change the Server port** and click **Save.** ![Change webserver port in OpManager: Versions above 126278](https://www.manageengine.com/network-monitoring/help/images/change-port.PNG) ## Steps to change the port number in versions below 126278 1. Stop the OpManager server. If you are running OpManager as Windows service, stop the service. 2. Open Command Prompt as Administrator, and navigate to */bin* directory. Then, execute the following command: In Windows, **ChangeWebServerPort ** In Linux, **sh ChangeWebServerPort.sh ** **Note:** - The **** is the one where you want to run the Web server now. - Once the script has been executed, start the OpManager server. **In OpManager,** Users can change the port number from OpManager's UI. To change the port number via OpManager settings, Go to **Settings** -> **General settings** -> **Server settings** -> **Change the Server port** and click **Save.** ![Change webserver port in OpManager: Versions below 126278](https://www.manageengine.com/network-monitoring/help/images/change-port-2.png)