Search code examples
wso2wso2-identity-server

How to run 2 WSO2 Identity Server services in the same system


I've used 5.11.0 .deb package and installed it using sudo dpkg -i packagename Now i can run wso2 IS as a service by running sudo service wso2is-5.11.0 start

But i dont know how to run one more service, preferably on port 9444


Solution

  • Easily,

    1. Download the WSO2 Identity Server from [here][1]. [1]: https://wso2.com/identity-server/#

    2. Extract the file to a dedicated directory. For the purposes of this scenario, this is referred to as <IS_HOME_PRIMARY> in this topic.

    3. Make a copy of this folder in the same location and rename it. For the purposes of this scenario, this is referred to as <IS_HOME_SECONDARY> in this topic.

    4. By default, the HTTPS port of the primary IS instance is 9443. Let this be left as it is.

    5. There are two ways to set an offset to a port:(9444)

    option 1: in the <IS_HOME_SECONDARY>/bin Pass the port offset to the server during startup. The following command starts the server with the default port incremented by 1 : ./wso2server.sh -DportOffset=1

    option 2: Set the offset value in the <IS_HOME_SECONDARY>/repository/conf/deployment.toml file as follows:

    [server]
    offset = "" 
    

    Change the Offset value to 1. This changes the HTTPS port in the secondary IS instance to 9444

    In this option 2, Install and run the two Identity Server instances. Go to <IS_HOME_PRIMARY>/bin and <IS_HOME_SECONDARY>/bin in your command line and type the following command for each instance.

    On Linux/Solaris: sh wso2server.sh

    also as @ycr mentioned you can configure the WSO2 identity server as a Linux service https://is.docs.wso2.com/en/5.11.0/setup/installing-as-a-linux-service/#running-the-product-as-a-linux-service