# 4 Installation¶

## 4.1 What’s in the box¶

The MOSEK OptServer is shipped as part of the MOSEK Optimization Suite. It is located in the folder MSKHOME/mosek/8/opt-server, where MSKHOME is the folder MOSEK has been installed in.

The OptServer files are organized in the following folders:

• bin – It contains the executables. i.e.
• var – It contains the working directories and the GUI elements:
• etc – It contains default configuration file and security key.

## 4.2 Requirements¶

OptServer only requires Python 3+ to run the configuration script. It has been tested only on Linux 64 bit.

## 4.3 Installation¶

To install the OptServer you need to execute the install_MosekServer located in the MSKDIR/opt-server/ folder. A set of options can be provided to customize the installation:

--inplace

Set up the server to run directly in the unpacked distro directory

--user

Install in ~/.local

--global

Install in /usr

--prefix DIR

Install in DIR

--certdir DIR

This directory contains valid cert.pem and key.pem for HTTPS. If DIR='', then HTTPS is disabled.

--password PWD

--port PORT

Configure server to listen to port PORT

--disable-gui

Disable GUI and API

--enable-get

Enable fetching submitted data/problem files

--enable-anonymous

Enable submitting without credentials

If the installation succeeds, you can then run the OptServer as described in Sec. 4.4 (Running the Server).

## 4.4 Running the Server¶

The OptServer can be started by running the executable MosekServer from the OPT_SERVER_HOME/bin folder, for instance

OPT_SERVER_HOME/bin/MosekServer


With no command line the server runs using the configurations setup during the installation process, see Sec. 4.1 (What’s in the box). To override the configuration set in the installation, several options can be passed to the server.

Note

Options can be prefixed by a single or a dobule dash, i.e. either - or --.

Some examples follow.

Switching debug mode on

If the server is not working a expected, it may be useful to turn on debugging:

MosekServer -debug=true


Change the port

Changing the port is a pretty standard step.

MosekServer --port=30080


## 4.5 OptServer Options¶

The complete list of options follow.

-base={/var/Mosek/server}

Base directory

-certdir=/etc/Mosek/server/cert

Enable SSL, cert.pem and key.pem in this directory

-cmd=$basedir/script/solve.py$workdir \$task

Solver command

-config=/etc/Mosek/server.conf

Specify configuration file (JSON)

-debug=false

Turn on debugging info (turned off by default). This is a boolean option.

-enable-anonymous-submit=false

Enable anonymous submitting (turned off by default).

-enable-get-problem=false

Enable fetching submitted tasks (turned off by default).

-enable-user-api=false

Enable extended programming API

-enable-user-gui=false

Enable user interface (turned off by default).

-hostname=hostname

Server host name

-logfile=filename

Log file name

-login-expiry=86400

-port=30080
-staticdir=extern
Directory with files served under /static/