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 Windows version of the Gurobi Optimizer, it will look for the gurobi.lic key file in three different default locations: c:\gurobi, c:\gurobi952 (for Gurobi 9.5.2), and your home directory. Note that these default paths are absolute, so for example Gurobi will look for the license key file in c:\gurobi, even if the software is installed in d:\gurobi. Note that the token server won't look for the license file in your home directory (it runs under username LocalService, so it doesn't have access to your home directory). If you would like to use a non-default license key file location, you can do so by setting a system 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.