Create a server variable
Last modified by Aurelie Bertrand on 2025/11/14 11:59
It can sometimes be useful to create a server variable, particularly if you want to have a reference to your parent or root server directory (for example, to automate server creation).
These variables can then be used in this format: ${server.ServerVariableName}.
To create a server variable :
- Stop the server.
- Edit the serversettings.xml file located in the AppData/Enterprise Server/ddenterpriseapi/config directory.
Locate the line <group category="$uisrv.Advanced" id="serverParams" name="$uisrv.ServerParams"></group>
- Replace it with the following :
<group id="serverParams" name="$uisrv.ServerParams" category="$uisrv.Advanced" catMenuName="$uisrv.Servers" menu="0" submenu="5">
<input disabled="false" mandatory="false" name="ServerVariableName" reg="false" sample="" showif="" src="" text="ServerVariableName" type="textfield" userparam="false" value="value of my variable"/>
</group>
<input disabled="false" mandatory="false" name="ServerVariableName" reg="false" sample="" showif="" src="" text="ServerVariableName" type="textfield" userparam="false" value="value of my variable"/>
</group>
in which:
- ServerVariableName is replaced by the desired name.
- Set the value attribute to the desired value.
- Save the file.
- Restart the server.
➡ The server variable is now created.
It is visible, and its value can be modified, in the new Server Variables tab added to Server Parameters.
You can then use it, for example, in a document server in the URL field.

Server variables can also be used to create a database connection that is valid in several environments.