Retrieving a Web License Service (WLS) client license

Retrieving a Web License Service (WLS) client license

A WLS license allows you to run Gurobi from within a containerized environment. Your application will need to provide valid credentials for your WLS license, either through a license file or through an API key. When your application starts a Gurobi environment, it will communicate with the Gurobi WLS server over the Internet to retrieve a token that will allow it proceed.

While some container environments may run macOS or Windows binaries, Gurobi currently only supports Linux containers.

The simplest way to use a WLS license is with a gurobi.lic license file. To retrieve one, visit the Web License Manager site, log in to your account, click on the Licenses tab, and finally click Download for the WLS license you plan to use. We recommend that you store the resulting gurobi.lic file in /opt/gurobi, which is the default location on Linux.

The gurobi.lic file you get will always contain the following three lines:

These give the WLS license ID, the access ID for that license, and the corresponding secret key. These credentials are private and should not be shared with anyone who is not entitled to use your license.

As noted earlier, you can also provide your credentials through a Gurobi programming language API using an API key.

Using a non-default license file location

When you run the Linux version of the Gurobi Optimizer, it will look for the gurobi.lic key file in three different default locations: /opt/gurobi, /opt/gurobi951 (for 9.5.1), and your home directory. If you would like to use a non-default license key file location, you can do so by setting an environment variable GRB_LICENSE_FILE to point to the license key file. See Setting environment variables for details on how to do this.

Important note: the environment variable should point to the license key file itself, not to the directory that contains the file.

Next steps

Once you have followed the steps above and obtained a license key file, your next step is to test your license.