Configure Server

These settings define the server configuration, this includes UPnP behavior, selection of database, accounts for the UI as well as installation locations of shared data.


<server> ... </server>
  • Required

This section defines the server configuration parameters.


  • Optional
  • Default: 0 (automatic)

Specifies the port where the server will be listening for HTTP requests. Note, that because of the implementation in the UPnP SDK only ports above 49152 are supported. The value of zero means, that a port will be automatically selected by the SDK.


  • Optional
  • Default: ip of the first available interface.

Specifies the IP address to bind to, by default one of the available interfaces will be selected.


  • Optional
  • Default: first available interface.

Specifies the interface to bind to, by default one of the available interfaces will be selected.


  • Optional
  • Default: Gerbera

Server friendly name, you will see this on your devices that you use to access the server.


  • Optional
  • Default:

This tag sets the manufacturer URL of a UPnP device, a custom setting may be necessary to trick some renderers in order to enable special features that otherwise are only active with the vendor implemented server.


  • Optional
  • Default: Gerbera

This tag sets the model name of a UPnP device, a custom setting may be necessary to trick some renderers in order to enable special features that otherwise are only active with the vendor implemented server.


  • Optional
  • Default: Gerbera version

This tag sets the model number of a UPnP device, a custom setting may be necessary to trick some renderers in order to enable special features that otherwise are only active with the vendor implemented server.


  • Optional
  • Default: 1

This tag sets the serial number of a UPnP device.


<presentationURL append-to="ip">80/index.html</presentationURL>
  • Optional
  • Default: ”/”

The presentation URL defines the location of the servers user interface, usually you do not need to change this however, vendors who want to ship our server along with their NAS devices may want to point to the main configuration page of the device.


  • Optional
  • Default: ”none”

The append-to attribute defines how the text in the presentationURL tag should be treated. The allowed values are:


Use the string exactly as it appears in the presentationURL tag.


Append the string specified in the presentationURL tag to the ip address of the server, this is useful in a dynamic ip environment where you do not know the ip but want to point the URL to the port of your web server.


Append the string specified in the presentationURL tag to the server ip and port, this may be useful if you want to serve some static pages using the built in web server.


  • Required
  • Default: none

Unique Device Name, according to the UPnP spec it must be consistent throughout reboots. You can fill in something yourself. Review the Generating Configuration section of the documentation to see how to use gerbera to create a default configuration file.


  • Required
  • Default: `~/.config/gerbera`

Server home - the server will search for the data that it needs relative to this directory - basically for the sqlite database file. The gerbera.html bookmark file will also be generated in that directory.


  • Required
  • Default: depends on the installation prefix that is passed to the configure script.

Root directory for the web server, this is the location where device description documents, UI html and js files, icons, etc. are stored.


  • Optional
  • Default: empty (disabled)

Files from this directory will be served as from a regular web server. They do not need to be added to the database, but they are also not served via UPnP browse requests. Directory listing is not supported, you have to specify full paths.

The file something.jar is located in /home/myuser/mystuff/javasubdir/something.jar on your filesystem. Your ip address is, the server is running on port 50500. Assuming the above configuration you could download it by entering this link in your web browser:


  • Optional
  • Default: 180, this is according to the UPnP specification.

Interval for broadcasting SSDP:alive messages

If you experience disconnection problems from your device, e.g. Playstation 4, when streaming videos after about 5 minutes, you can try changing the alive value to 86400 (which is 24 hours)


<pc-directory upnp-hide="no"/>
  • Optional
  • Default: no

Enabling this option will make the PC-Directory container invisible for UPnP devices.

independent of the above setting the container will be always visible in the web UI!


  • Optional
  • Default: /tmp/

Selects the temporary directory that will be used by the server.


  • Optional
  • Default: gerbera.html

The bookmark file offers an easy way to access the user interface, it is especially helpful when the server is not configured to run on a fixed port. Each time the server is started, the bookmark file will be filled in with a redirect to the servers current IP address and port. To use it, simply bookmark this file in your browser, the default location is ~/.config/gerbera/gerbera.html


  • Optional
  • Default: disabled

This will limit title and description length of containers and items in UPnP browse replies, this feature was added as a workaround for the TG100 bug which can only handle titles no longer than 100 characters. A negative value will disable this feature, the minimum allowed value is “4” because three dots will be appended to the string if it has been cut off to indicate that limiting took place.


<ui enabled="yes" poll-interval="2" poll-when-idle="no"/>
  • Optional

This section defines various user interface settings.


The server has an integrated filesystem browser, that means that anyone who has access to the UI can browse your filesystem (with user permissions under which the server is running) and also download your data! If you want maximum security - disable the UI completely! Account authentication offers simple protection that might hold back your kids, but it is not secure enough for use in an untrusted environment!


since the server is meant to be used in a home LAN environment the UI is enabled by default and accounts are deactivated, thus allowing anyone on your network to connect to the user interface.


  • Optional
  • Default: yes

Enables (”yes”) or disables (”no”) the web user interface.

  • Optional
  • Default: yes

This setting specifies if icon tooltips should be shown in the web UI.

  • Optional
  • Default: 2

The poll-interval is an integer value which specifies how often the UI will poll for tasks. The interval is specified in seconds, only values greater than zero are allowed.

  • Optional
  • Default: no

The poll-when-idle attribute influences the behavior of displaying current tasks: - when the user does something in the UI (i.e. clicks around) we always poll for the current task and will display it - if a task is active, we will continue polling in the background and update the current task view accordingly - when there is no active task (i.e. the server is currently idle) we will stop the background polling and only request updates upon user actions, but not when the user is idle (i.e. does not click around in the UI)

Setting poll-when-idle to “yes” will do background polling even when there are no current tasks; this may be useful if you defined multiple users and want to see the tasks the other user is queuing on the server while you are actually idle.

The tasks that are monitored are:

  • adding files or directories
  • removing items or containers
  • automatic rescans

Child tags:

<accounts enabled="yes" session-timeout="30"/>
  • Optional

This section holds various account settings.


  • Optional
  • Default: yes

Specifies if accounts are enabled yes or disabled no.

  • Optional
  • Default: 30

The session-timeout attribute specifies the timeout interval in minutes. The server checks every five minutes for sessions that have timed out, therefore in the worst case the session times out after session-timeout + 5 minutes.

Accounts can be defined as shown below:

<account user="name" password="password"/>
<account user="name" password="password"/>
  • Optional

There can be multiple users, however this is mainly a feature for the future. Right now there are no per-user permissions.

<items-per-page default="25">
  • Optional
  • Default: 25

This sets the default number of items per page that will be shown when browsing the database in the web UI. The values for the items per page drop down menu can be defined in the following manner:


Default: 10, 25, 50, 100

this list must contain the default value, i.e. if you define a default value of 25, then one of the <option> tags must also list this value.


<storage caching="yes">
  • Required

Defines the storage section - database selection is done here. Currently sqlite3 and mysql are supported. Each storage driver has it’s own configuration parameters.

Child Tags

  • Optional
  • Default: yes

Enables caching, this feature should improve the overall import speed.

<sqlite enabled="yes>
  • Required if MySQL is not defined

Allowed values are sqlite3 or mysql, the available options depend on the selected driver.

  • Optional
  • Default: yes

Below are the sqlite driver options:

  • Optional
  • Default: gerbera.db

The database location is relative to the server’s home, if the sqlite database does not exist it will be created automatically.

  • Optional
  • Default: off

Possible values are off, normal and full.

This option sets the SQLite pragma synchronous. This setting will affect the performance of the database write operations. For more information about this option see the SQLite documentation:

  • Optional
  • Default: restore

Possible values are restore and fail.

This option tells Gerbera what to do if an SQLite error occurs (no database or a corrupt database). If it is set to restore it will try to restore the database from a backup file (if one exists) or try to recreate a new database from scratch.

If the option is set to fail, Gerbera will abort on an SQLite error.

<backup enabled="no" interval="6000"/>
  • Optional

Backup parameters:

  • Optional
  • Default: no

Enables or disables database backup.

  • Optional
  • Default: 600

Defines the backup interval in seconds.

<mysql enabled="no"/>

Defines the MySQL storage driver section.

  • Optional
  • Default: yes

Enables or disables the MySQL driver.

Below are the child tags for MySQL:

  • Optional
  • Default: “localhost”

This specifies the host where your MySQL database is running.

  • Optional
  • Default: 0

This specifies the port where your MySQL database is running.

  • Optional
  • Default: “gerbera”

This option sets the user name that will be used to connect to the database.

  • Optional
  • Default: no password

Defines the password for the MySQL user. If the tag doesn’t exist Gerbera will use no password, if the tag exists, but is empty Gerbera will use an empty password. MySQL has a distinction between no password and an empty password.

  • Optional
  • Default: “gerbera”

Name of the database that will be used by Gerbera.