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. Some enable you to work in containers (e.g, Docker), some allow you to work outside of containers (in a physical or virtual machine running Windows, Linux or macOS), and some allow both. 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 /opt/gurobi).

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


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 Linux version of the Gurobi Optimizer, it will look for the gurobi.lic key file in three different default locations: /opt/gurobi, /opt/gurobi1003 (for 10.0.3), 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.

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.