Named-User or Single-Machine or Single-Use license

To obtain a Gurobi license key you'll need to run the grbgetkey command on your machine to retrieve your Gurobi license key. Note that the machine must be connected to the Internet in order to run this command. An Internet connection is not required after you have obtained your license key.

If your computer isn't connected to the Internet or if your network security system does not allow the command below to function, we also offer a manual license key process. You'll find manual instructions after clicking the Install button in the Gurobi User Portal next to a license at the bottom left (Generate Manually).

The exact grbgetkey command to run for a specific license is indicated when clicking the Install button for a license in the Gurobi User Portal (e.g., grbgetkey 253e22f3-...). We recommend that you use copy-paste to copy the entire grbgetkey command from our website and paste it into a shell window.

The grbgetkey program passes identifying information about your machine back to our website, and the website responds with your license key. Once this exchange has occurred, grbgetkey will ask for the name of the directory in which to store your license key file (gurobi.lic). You should see a prompt that looks like this:

Gurobi license key client (version 10.0.3)
Copyright (c) 2023, Gurobi Optimization, LLC

————————————————————–
Contacting Gurobi key server...
————————————————————–

Key for license ID 146542 was successfully retrieved.

——————————————
Saving license key...
——————————————

In which directory would you like to store the Gurobi license key file?
[hit Enter to store it in /opt/gurobi]:

–> License key saved to file '/opt/gurobi/gurobi.lic'.

You can store the license key file anywhere, but we strongly recommend that you accept the default location (either your home directory or /opt/gurobi) by hitting Enter. Setting up a non-default location is error-prone and a frequent source of trouble.

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

If your license includes the Distributed Add-On and you plan to use any of the Gurobi distributed algorithms, you'll also need to set up Gurobi Remote Services on your distributed worker machines.

Once you have followed the steps above and have 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