Retrieving a Web License Service (WLS) client license

Web License Service (WLS) licenses allow you to run Gurobi from any Internet-connected Windows, Linux, or macOS device. They may be configured to work in containers, outside of containers (in a physical or virtual machine running Windows, Linux or macOS), or in both types of environments. To use a WLS license, your application will need to provide valid credentials, which can be done in a number of ways. 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.

The simplest way to use a WLS license is with an API key stored in a gurobi.lic license file. To retrieve an API key for your license, visit the Web License Manager site, log in to your account, click on the API Keys tab, and finally click CREATE API KEY to create and download an API key for that license. We recommend that you store the resulting gurobi.lic file in a default location (either your home directory or c:\gurobi).

The gurobi.lic file should contain three lines like this:

WLSACCESSID=203dec48-e3f8-46ac-0184-92d7d6ded944
WLSSECRET=a080cce8-4e01-4e36-955e-61592c5630db
LICENSEID=12127

These provide the license ID, an 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.

If you are writing an application that calls Gurobi from a programming language API, you can provide your credentials through that API. You do this by retrieving an API key, as above, and setting the LICENSEID, WLSACCESSID, and WLSSECRET parameters to the values associated with that 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:\gurobi1000 (for Gurobi 10.0.0), 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.

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search