Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rolltidehero/e20d63e3b2017d1c84771057e02bd10b to your computer and use it in GitHub Desktop.
Save rolltidehero/e20d63e3b2017d1c84771057e02bd10b to your computer and use it in GitHub Desktop.
Installing Duplicati 2.6 on CentOS 8
# Start this script while logged in as root.
# Preparations:
# Update manually with yum if it's a new OS installation.
# yum update -y && reboot
yum install wget curl -y
mkdir /downloads
cd /downloads
# Install mono as per the instructions on: https://www.mono-project.com/download/stable/#download-lin-centos
# at the time of this writing (2021-05-11) it was as so:
rpmkeys --import "http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x3fa7e0328081bff6a14da29aa6a19b38d3d831ef"
curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo
yum install mono-devel -y
# Install additional requirements:
yum install sqlite gtk-sharp2 -y
# Download the latest Duplicati for CentOS. Get the URL from: https://www.duplicati.com/download
# e.g.:
wget https://updates.duplicati.com/beta/duplicati-2.0.6.1-2.0.6.1_beta_20210503.noarch.rpm
# Install as per the instructions at https://duplicati.readthedocs.io/en/latest/02-installation/ (at the bottom of the page)
# Note that yum install does not work. Use something like:
rpm -ivh --nodeps duplicati-2.0.6.1-2.0.6.1_beta_20210503.noarch.rpm
# Ignore the error about a service not existing.
# Create Duplicati service options file:
echo "# Defaults for duplicati initscript" > /etc/default/duplicati
echo "# sourced by /etc/init.d/duplicati" >> /etc/default/duplicati
echo "# installed at /etc/default/duplicati by the maintainer scripts" >> /etc/default/duplicati
echo "" >> /etc/default/duplicati
echo "#" >> /etc/default/duplicati
echo "# This is a POSIX shell fragment" >> /etc/default/duplicati
echo "#" >> /etc/default/duplicati
echo "" >> /etc/default/duplicati
echo "# Additional options that are passed to the Daemon." >> /etc/default/duplicati
echo "DAEMON_OPTS=\"--webservice-interface=any --webservice-port=8200 --portable-mode\"" >> /etc/default/duplicati
# Create the service:
echo "[Unit]" > /etc/systemd/system/duplicati.service
echo "Description=Duplicati web-server" >> /etc/systemd/system/duplicati.service
echo "After=network.target" >> /etc/systemd/system/duplicati.service
echo "" >> /etc/systemd/system/duplicati.service
echo "[Service]" >> /etc/systemd/system/duplicati.service
echo "Nice=19" >> /etc/systemd/system/duplicati.service
echo "IOSchedulingClass=idle" >> /etc/systemd/system/duplicati.service
echo "EnvironmentFile=-/etc/default/duplicati" >> /etc/systemd/system/duplicati.service
echo "ExecStart=/usr/bin/duplicati-server \$DAEMON_OPTS" >> /etc/systemd/system/duplicati.service
echo "Restart=always" >> /etc/systemd/system/duplicati.service
echo "" >> /etc/systemd/system/duplicati.service
echo "[Install]" >> /etc/systemd/system/duplicati.service
echo "WantedBy=multi-user.target" >> /etc/systemd/system/duplicati.service
systemctl enable duplicati.service
sleep 1
systemctl daemon-reload
sleep 1
# Start the service:
service duplicati start
sleep 4
service duplicati status
# It's ready.
# Access the web interface using the favorite browser at http://ip:8200/ or as set in the config file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment