4.1. Configure Web Server

Use the following instructions to configure Web server:

These configuration variables are under the [desktop] section in the hue.ini configuration file.

  1. Specify the Hue HTTP Address.

    Use the following options to change the IP address and port of the existing Web Server for Hue (by default, Spawning or CherryPy).

    # Webserver listens on this address and port
    http_host=0.0.0.0
    http_port=8000

    The default setting is port 8000 on all configured IP addresses.

  2. Specify the Secret Key.

    To ensure that your session cookies are secure, enter a series of random characters (30 to 60 characters is recommended) as shown below:

    secret_key=jFE93j;2[290-eiw.KEiwN2s3['d;/.q[eIW^y#e=+Iei*@Mn<qW5o

  3. Configure authentication.

    By default, the first user who logs in to Hue can choose any username and password and gets the administrator privileges. This user can create other user and administrator accounts. User information is stored in the Django database in the Django backend.

  4. Configure Hue for SSL.

    Install pyOpenSSL in order to configure Hue to serve over HTTPS. To install pyOpenSSL, from the root of your Hue installation path, complete the following instructions:

    1. Execute the following command on the Hue Server:

      ./build/env/bin/easy_install pyOpenSSL
    2. Configure Hue to use your private key. Add the following to hue.ini file:

      ssl_certificate=$PATH_To_CERTIFICATE
      ssl_private_key=$PATH_To_KEY

      Ideally, you should have an appropriate key signed by a Certificate Authority. For test purposes, you can create a self-signed key using the openssl command on your system:

       ### Create a key
      openssl genrsa 1024 > host.key
      ### Create a self-signed certificate
      openssl req -new -x509 -nodes -sha1 -key host.key > host.cert

      [Note]Note

      To upload files using the Hue File Browser over HTTPS, you must have a proper SSL Certificate.


loading table of contents...