I’ve seen the odd newbie ask how to install web on Linux. I was inspired by @Christoph 's post Automatically update duplicacy web. I don’t think i could have figured out the latest download without his code.
Please remember this is created by a noob, for noobs. It’s not intended to be some enterprise grade thing.
As always - review, make adjustments, and use at your own risk!
It downloads and installs the “latest” version of Duplicacy (i think that’s stable, right? Because it’s governed by what is on Duplicacy.com). And creates the systemd service (and prompts if you want to start/enable it). It can also do a force re-install if for some reason you want/need to.
With the help of ChatGPT, I created an installer based off his bash script. For what it’s worth, here 'tis
I’ve only tested it on Linux Mint. Suggestions welcome.
use an editor of your choice and paste:
#!/bin/bash
# Function to prompt the user
prompt_install() {
read -p "Duplicacy is not installed. Would you like to install it? (yes/no): " choice
case "$choice" in
y|Y|yes|Yes|YES ) install_duplicacy;;
* ) echo "Installation aborted.";;
esac
}
# Function to install Duplicacy
install_duplicacy() {
echo "Identifying latest version from the website..."
latest=$(curl -s "https://duplicacy.com/download.html" | grep -E -o "https://acrosync\.com/duplicacy-web/duplicacy_web_linux_x64_[[:digit:]]\.[[:digit:]]\.[[:digit:]]" | grep -E -o "duplicacy_web_linux_x64_[[:digit:]]\.[[:digit:]]\.[[:digit:]]")
echo "Latest version is $latest"
echo "Downloading latest version..."
wget "https://acrosync.com/duplicacy-web/$latest" -P /tmp/
if [ $? -ne 0 ]; then
echo "Failed to download. Exiting."
exit 1
fi
echo "Installing to /usr/bin/..."
mv "/tmp/$latest" /usr/bin/
chmod 700 "/usr/bin/$latest"
ln -s -f "/usr/bin/$latest" /usr/bin/duplicacy-web
echo "Creating systemd service file..."
cat << EOF > /etc/systemd/system/duplicacy-web.service
[Unit]
Description=Duplicacy Web service
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/duplicacy-web
[Install]
WantedBy=default.target
EOF
echo "Systemd service file created: /etc/systemd/system/duplicacy-web.service"
read -p "Would you like to start and enable the duplicacy-web service? (yes/no): " choice
case "$choice" in
y|Y|yes|Yes|YES )
echo "Starting and enabling the duplicacy-web service..."
sudo systemctl daemon-reload
sudo systemctl enable duplicacy-web
sudo systemctl start duplicacy-web
echo "Duplicacy-web service started and enabled."
echo ""
echo "press 'q' to exit status"
echo ""
systemctl status duplicacy-web
;;
* )
echo "Service was not started or enabled. You can start and enable it manually with:"
echo "sudo systemctl daemon-reload"
echo "sudo systemctl enable duplicacy-web"
echo "sudo systemctl start duplicacy-web"
;;
esac
echo "Duplicacy successfully installed!"
echo ""
echo "WebUI running on: http://127.0.0.1:3875/"
echo ""
exit 0
}
# Check if Duplicacy is installed
if ! command -v duplicacy-web &> /dev/null; then
prompt_install
else
echo "Duplicacy is already installed."
read -p "Would you like to force reinstall Duplicacy? (yes/no): " choice
case "$choice" in
y|Y|yes|Yes|YES ) install_duplicacy;;
* ) echo "Reinstallation aborted.";;
esac
fi
chmod +x duplicacyInstall.sh
then
sudo ./duplicacyInstall.sh
Should be good to go
If you want to run it as user, instead of with sudo, change the script to put the systemd files in /home/[user]/.config/systemd/user
(at least on my system that’s where they go). And also add --user
to all the systemctl commands, e.g.: systemctl --user enable --now duplicacy-web
.
I hope this helps the newbies