License Switch

If the license key/code has changed later or if the license edition has changed (for example, from developer to production), you can upgrade or change the license in PowerServer Web APIs directly without needing to change and re-deploy the PowerServer project in the PowerBuilder IDE. You can

  • Change the license in the PowerServer C# solution > UserExtensions project in SnapDevelop if it has not been compiled and published yet; or

  • Change the license if the Web APIs has been published as a deployable application; or

  • Change the license if the Web APIs has been deployed as a docker container image

To change the license in the PowerServer C# solution > UserExtensions project:

  1. In SnapDevelop, go to the PowerServer C# solution > UserExtensions project > UserConfig.json file.

  2. In the UserConfig.json file, input the new license key and code respectively to the LicenseKey and LicenseCode settings.


  3. Start or restart PowerServer Web APIs.

    The new license key and code will be activated.

To change the license after the Web APIs is published as a deployable app:

  1. Go to the published app folder, and open the UserConfig.json file in a text editor.

    UserConfig.json is by default located at the root of the app folder.

  2. In the UserConfig.json file, input the new license key and code respectively to the LicenseKey and LicenseCode settings.


  3. Start or restart PowerServer Web APIs.

    The new license key and code will be activated.

To change the license after the Web APIs is deployed as a docker container image:

  1. You can pass in the license key and code as parameters when running the container from commands.

    The parameter for the license key must be powerserver:licensekey and the parameter for the license code must be powerserver:licensecode which match exactly with the "PowerServer" > "LicenseKey" and "LicenseCode" keywords in the UserConfig.json file.

    The following example starts the powerserverwebapi container and passes the license code to the container.

    Docker run -itd --name powerserverwebapi -p 9000:80 powerserver:licensecode=xxxxxxxxxxxxxxx

    You can also specify the license key and code as environment variables when starting the container from Docker Explorer in SnapDevelop.

    The variable name for the license key and code must be powerserver__licensekey and powerserver__licensecode.