LogoLogo
  • Duplicati Documentation
  • Getting Started
    • Installation
    • Set up a backup in the UI
    • Running a backup
    • Restoring files
  • Detailed descriptions
    • Choosing Duplicati Type
    • Using the secret provider
      • Local providers
      • Cloud providers
      • Advanced configurations
    • Using remote management
      • Using remote control with agent
    • Migrating Duplicati to a new machine
    • Scripts
    • Sending reports
      • Monitoring with Duplicati Console
      • Sending reports with email
      • Sending Jabber/XMPP notifications
      • Sending HTTP notifications
      • Sending Telegram notifications
      • Custom message content
    • Duplicati Access Password
    • Import and export backup configurations
    • Filters in Duplicati
    • The local database
    • The server database
    • Preload settings
    • Retention settings
    • Using Duplicati with Linux
    • Using Duplicati from Docker
    • Using Duplicati with MacOS
    • Using Duplicati with Windows
    • Running a self-hosted OAuth Server
  • Using tools
    • Encrypting and decrypting files
    • Using Duplicati from the Command Line
    • Recovering from failure
    • Disaster recovery
  • Backup destinations
    • Destination overview
    • Standard based destinations
      • File Destination
      • S3-compatible Destination
      • FTP Destination
      • SFTP (SSH) Destination
      • WebDAV Destination
      • OpenStack Destination
      • Rclone Destination
      • CIFS (aka SMB) Destination
    • Provider specific destinations
      • Backblaze B2 Destination
      • Box.com Destination
      • Rackspace CloudFiles Destination
      • IDrive e2 Destination
      • Mega.nz Destination
      • Aliyun OSS Destination
      • Tencent COS Destination
      • Jottacloud Destination
      • pCloud Destination
      • Azure Blob Storage Destination
      • Google Cloud Storage Destination
      • Microsoft Group Destination
      • SharePoint Destination
      • SharePoint v2 (Graph API)
      • Amazon S3 destination
    • File synchronization providers
      • Dropbox Destination
      • Google Drive Destination
      • OneDrive Destination
      • OneDrive For Business Destination
    • Decentralized providers
      • Sia Destination
      • Storj Destination
      • TahoeLAFS destination
  • Duplicati Programs
    • TrayIcon
    • Server
    • Command Line Interface CLI
    • Service and WindowsService
    • Command Line Tools
      • AutoUpdater
      • BackendTester
      • BackendTool
      • RecoveryTool
      • SecretTool
      • SharpAESCrypt
      • Snapshots
      • ServerUtil
    • Agent
    • LICENSE
      • Duplicati Inc & Open Source
      • License Agreement
    • OAuth Server
  • SUPPORT
  • Installation details
    • Release channels and versions
      • Upgrading and downgrading
      • Downgrade from 2.1.0.2 to 2.0.8.1
    • Package options
    • Developer
  • TECHNICAL DETAILS
    • Architecture Premises
    • Understanding Backup
      • How Backup Works
      • Encryption Algorithms
      • Backup size parameters
    • Understanding Restore
      • How Restore Works
      • Disaster Recovery
    • Database versions
    • Server authentication model
    • Option formats
Powered by GitBook
On this page
  • Securing the database
  • Database location
  • Database location on Windows
  • Database location on Linux
  • Database location on MacOS

Was this helpful?

Export as PDF
  1. Detailed descriptions

The server database

This page describes the database kept by the Duplicati Server

PreviousThe local databaseNextPreload settings

Last updated 4 months ago

Was this helpful?

When the is running, either stand-alone or as part of the or , it needs a place to store the configuration. All configuration data, logs and settings are stored inside the file Duplicati-server.sqlite. As the file extension reveals, this is an database file and as such can be viewed and updated by any tool that works with SQLite databases.

The database file is by default located in a folder that belongs to the user account running it. See the section on the for details on where this is and how to change it.

Securing the database

Due to the nature of Duplicati, this database can contain a few secrets that are vital to ensuring the integrity and security of the backups and also the Duplicati server itself. These secrets include both the user-provided secrets, such as the backup encryption passphrase and the connection credentials, but also server-provided secrets, such as the token signing keys, and optionally an SSL certificate password.

Even though the database is located on the machine that makes the backup, it is important to prevent unauthorized access to the database, as it could be used for privilege escalation. And should the database ever be leaked, it is also important to ensure the contents are not accessible.

To protect the database, Duplicati has support for a field-level encryption password. When activated, any setting that is deemed sensitive will be encrypted before being written to the database. This method ensures that the SQLite database itself is still readable, but the secrets are not readable without the encryption passphrase.

To supply the field-level encryption password, start the Server, TrayIcon, or Agent with the commandline option --settings-encryption-key=<key>. As the commandline can usually be read by other processes, it is also possible to supply this key via the environment variable SETTINGS_ENCRYPTION_KEY=<key>.

If you are aware of the risks, you can also set the commandline argument --disable-db-encryption=true instead of the key. This will remove existing encryption and not warn that the database is not encrypted.

The simplest way to apply an encryption key, is to locate the server database, and create the file preload.json if it does not already exist. The file should contain the following:

{
  "env": {
    "*": { 
      "SETTINGS_ENCRYPTION_KEY": "<key>"
    }
  }
}

Both the commandline arguments and environment variables can be set with the file, which makes it simpler to apply the same settings across executables, and removes the need for changing the service or launcher files.

Database location

When running Duplicati for the first time, it will find a place where it can store the configuration database. Some versions of Duplicati change the location where it looks for the databases, but this is always done backwards compatible, so new versions will also find the database in previous locations. Due to this logic, the locations can change a bit depending on what version of Duplicati was originally installed.

It is possible to pick a different location for the database with the commandline option --server-datafolder=<path> or use the environment variable DUPLICATI_HOME.

To change the folder of an existing instance of Duplicati, perform these steps:

  1. Stop Duplicati

  2. Move the Duplicati folder from the old location to the new location

  3. Change the startup parameters (environment variables, commandline arguments, or preload.json)

  4. Start Duplicati again

Database location on Windows

The default location for users running Duplicati is %LOCALAPPDATA%\Duplicati which usually resolves to something like C:\Users\username\AppData\Local\Duplicati. This folder is the non-roaming folder. Older versions of Duplicati used %APPDATA%\Duplicati which is the roaming folder, causing files to be synchronized across machines. However, since Duplicati is not meant to be an app that is useful for roaming, it is now using the non-roaming folder.

When running Duplicati as a Windows Service, the %LOCALAPPDATA%\Duplicati folder resolves to:

C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati

Since this folder is under C:\Windows the contents may be deleted on major Windows upgrades (usually when the version number changes). For that reason, Duplicati will detect an attempt to store files in the C:\Windows folder and emit a warning. From version 2.1.0.108 and forward, Duplicati will choose to use C:\Users\LocalService\Duplicati as the storage folder, if it would otherwise be under C:\Windows.

Database location on Linux

The default location when running Duplicati on Linux is ~/.config/Duplicati. For most distros, running Duplicati as a service means running it as the root users, resulting in /root/.config/Duplicati.

However, due to some compatibility mapping, the mapping is sometimes missing the prefix, causing Duplicati data to be stored in /Duplicati. From version 2.1.0.108, this location is avoided and the location /var/lib/Duplicati is used instead, if possible.

Database location on MacOS

The default location when running Duplicati on MacOS is ~/Library/Application Support/Duplicati. Duplicati version 2.0.8.1 and older used the Linux-style ~/.config/Duplicati but this is avoided since version 2.1.0.2.

For additional protection of the encryption key, the , can be used to further secure the encryption key.

Server
TrayIcon
Agent
SQLite
database location
Preload settings
operating system Keychain, or an external secret provider