docker-duplicacy
docker-duplicacy copied to clipboard
Duplicacy Web Edition in a container
erichough/duplicacy
Duplicacy Web Edition in a container.
Quick Start
-
docker run -p 3875:3875 erichough/duplicacy -
Visit
http://localhost:3875
Production Usage
- Bind-mount a host directory into the container at
/etc/duplicacyto view, edit, and/or backup your configuration files (i.e.duplicacy.jsonandsettings.json). - Bind-mount a host directory into the container at
/var/cache/duplicacyto retain statistics and cached data between container starts, stops, and restarts. - Set your container's timezone using one of the following techniques:
-
Set the
TZenvironment variable to your desired timezone name.docker run -e TZ=America/LosAngeles ... erichough/duplicacy -
Bind-mount
/etc/localtimeand/etc/timezoneinto the container. e.g.docker run \ -v /etc/localtime:/etc/localtime:ro \ -v /etc/timezone:/etc/timezone:ro \ ... \ erichough/duplicacy
-
- Add
--cap-drop=ALLfor extra security. - Add
--restart=alwaysto be able to make changes via the settings page.
Duplicacy license
NOTE: If you don't need to purchase a Duplicacy license, you can safely ignore this section.
Duplicacy identifies the machine via the hostname and machine-id pair. So in order to utilize a license, you'll need to make sure that both of these pieces of data do not change over time.
-
Add
--hostnameto your to yourdocker runcommand to set a persistent hostname for the container. -
Supply a persistent
machine-id, which is a 32-character lowercase hexadecimal string.Here are a few ways to supply a
machine-id; choose whichever your like:-
Option 1. Bind-mount an existing
machine-idinto the container at/var/lib/dbus/machine-id.e. g.
docker run -v /host/path/to/machine-id:/var/lib/dbus-machine-id:ro ... -
Option 2. Supply the
MACHINE_IDenvironment variable to the container. You can generate a random string using online tools (example).e.g.
docker run -e MACHINE_ID=b23c9e0140e92b10c2baaf1f82571a2f ... -
Option 3. Bake
/var/lib/dbus/machine-idinto a custom image. e.g. in aDockerfileFROM erichough/docker-duplicacy COPY files/machine-id /var/lib/dbus/machine-id
-
Sample docker-compose.yml
version: '3.7'
services:
duplicacy:
image: erichough/duplicacy
hostname: duplicacy-web
restart: always
ports:
- 3875:3875
cap_drop:
- ALL
environment:
TZ: America/New_York
MACHINE_ID: 4c601d79a045519397ade28a2f79e3d3
volumes:
- /host/path/to/config:/etc/duplicacy
- /host/path/to/cache:/var/cache/duplicacy
- /host/path/to/some-storage:/storage