Startup Configuration

Introduction

There are several configurations, that can not be changed in the user interface. We start with good default values, but especially if you are a printer manufacturer or if you like to hack how Repetier-Server handles some things, you can still change them.

Most important is the initial configuration that determines where all files get stored, on which ip and port we listen or if the interface should be branded, where to check for updates and so on. This configuration can exist in three parallel files. The last one read changing a setting wins. For that reason you should only add settings you want to change! The first file read is our default RepetierServer.xml file in the installation path. Do not touch this – every update will overwrite it with latest version. Far manufacturer we suggest using same path as our config just with -extra in name, so be default it would be RepetierServer-extra.xml. Now in case users want to change something as well, they should use the STORAGE_DIR/database/RepetierServer.xml file. This also gets backed up using Repetier-Server Monitor.

RepetierServer.xml

Locations

As described in the introduction, there are up to 3 configuration files. 2 of them are in the installation directory or you can call Repetier-Server using the -c (/c for windows) option for the main configuration file. The second file read is same name just with additional “-extra” in filename. Even with manual config file provided, the third file is always RepetierServer.xml in database folder. In the following we use the default name to show positions.

Windows

  • INSTALL_DIR defaults to C:\Program Files (x86)\Repetier-Server
  • STORAGE_DIR defaults to C:\ProgramData\Repetier-Server
  • Our default config: INSTALL_DIR/bin/RepetierServer.xml
  • Manufacturer config: INSTALL_DIR/bin/RepetierServer-extra.xml
  • User config: STORAGE_DIR/database/RepetierServer.xml

Linux

  • INSTALL_DIR defaults to /usr/local/Repetier-Server
  • STORAGE_DIR defaults to /var/lib/Repetier-Server
  • Our default config: INSTALL_DIR/etc/RepetierServer.xml
  • Manufacturer config: INSTALL_DIR/etc/RepetierServer-extra.xml
  • User config: STORAGE_DIR/database/RepetierServer.xml

Mac

  • INSTALL_DIR defaults to /usr/local/Repetier-Serve
  • STORAGE_DIR defaults to /Library/Application Support/Repetier-Server
  • Our default config: INSTALL_DIR/etc/RepetierServer.xml
  • Manufacturer config: INSTALL_DIR/etc/RepetierServer-extra.xml
  • User config: STORAGE_DIR/database/RepetierServer.xml

Basic structure

The minimum empty content looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<server>
  <!-- Your content here -->
</server>

Changing locations

The following settings change where some files are stored. I show first all path options and explain them in order.

<installation-directory>/usr/local/Repetier-Server</installation-directory>
<storage-directory>/var/lib/Repetier-Server/</storage-directory>


Installation directory is the root of our installation where we keep our version of all files. If you have multiple Repetier-Server instances running, they can point all to same directory.

In the storage directory everything the user stores is saved. To preserve a current state that is the only folder you need to backup.

Changing Network

The following settings change network behaviour:

<port>3344</port>
<disableIPV6>false</disableIPV6>
<allow-iframe-embedding>false</allow-iframe-embedding>
<update-info-url>http://download.repetier-server.com/files/server/debian-armhf/updateinfo.txt</update-info-url>
<!--If you want to add your own SSL certificates, please enter here the directory where your certificate is stored. Note: only certificates with the extension .pem will be considered-->
<custom-ssl-certificate-store></custom-ssl-certificate-store>
<unixSocket></unixSocket>

Port allows you to change the port Repetier-Server responds to. Change it if a different software uses it already or if you need multiple simultaneous installations.

If you want, you can disable ipv6 usage with disableIPV6.

Embedding Repetier-Server inside an iframe can allow the parent html file to use clickjacking attacks. So by default this is not possible and leads to an error in your browser. If you write your own html file for embedding you can allow embedding.

Every now and then the Repetier-Server queries our server if new updates are available. If you are a manufacturer with customized branded installation, you should use a own updater. Change the url to your webserver instead so you control which updater is used and when an update gets offered. Check Own updater for Repetier-Server  for more informations about this.

Repetier-Server has an own root certificate list and only trusts files signed starting at one of these routes. If you have self signed certificates or one certificate is missing, you can define a folder with custom-ssl-certificate-store where you store public pem files for certificates that should be trusted.

Last is unixSocket that is empty in this example. You can put a path for a socket file here that Repetier-Server should create to allow direct communication with the API. See Unix Sockets API on how to communicate via socket. The big advantage except speed is, that no password or API key is required, so as manufacturer you can use this for own scripts that need to exchange informations.

Branding

<branding>
    <shadow-www-directory>/usr/local/MyCompany/www</shadow-www-directory>
    <branded-name>MyCompany Server</branded-name>
</branding>

As manufacturer you might want to brand the installation with own name (branded-name).

The shadow-www directory-allows you to add own files and to replace existing files with your version. When you request a url from the server the rule is to first check the shadow directory for the file and only when it does not exists the default version is used. But note that if you replace existing files this can lead to issues when you install an update. If we change a javascript file for new function and your version gets loaded where they are missing, this can cause runtime errors. Same for css and html files that might get new features and when they are missing can lead to ugly layout or just new features not accessible. Only quite safe types are images and text files. If you add other types you should consider using a own updater so on updates your files get replaced as well.

One popular choice for a replaced file is img/logo-60.png to change the user interface icon and of course the favicon files.

Other settings

<default-language>en</default-language>
<logging>true</logging>
<backlog-size>1000</backlog-size>
<max-log-files-per-printer>5</max-log-files-per-printer>

Default language is used at some places for internal messages where it is unknown which language the receiver uses. But most internal messages are always english.

Logging should be enabled so you can better see in case of errors what is going on. This one is responseable for the seerver.log creation.

Backlog-size is just a safety margin – when more then x lines are not written to log file new messages will be discarded.

Normally only the last 5 files are logged. Starting with version 1.4.9 you can change that number with max-log-files-per-printer.

 

extcommands.xml

In STORAGE_PATH/database/extcommands.xml you can define external commands, that Repetier-Server is allowed to execute. By default Repetier-Server will not execute unknown files for security reasons. For the same reason this list is not changeable in the interface.

There are actually 2 lists of files. The first list is for additional menu entries in global or printer menu. The second list are for the @execute command to be run from g-code.

See the user manual chapter Advanced Configuration for more details on this file.