TrueNAS Core Plugin

Hi All,

I’ve put together a simple iocage plugin to simplify deployment of Duplicacy Web on TrueNAS Core.

Repository: GitHub - arrogantrabbit/iocage-plugin-duplicacy: This is a simple duplicacy_web plugin for TrueNAS Core

To install (right from the TrueNAS shell in the UI):

curl -L https://raw.githubusercontent.com/arrogantrabbit/iocage-plugin-duplicacy/master/duplicacy.json -o /tmp/duplicacy.json
sudo iocage fetch -P /tmp/duplicacy.json

Sample output:

truenas% curl -L https://raw.githubusercontent.com/arrogantrabbit/iocage-plugin-duplicacy/master/duplicacy.json -o /tmp/duplicacy.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   595  100   595    0     0   9459      0 --:--:-- --:--:-- --:--:--  9596

truenas% sudo iocage fetch -P /tmp/duplicacy.json
Plugin: duplicacy
  Official Plugin: False
  Using RELEASE: 13.1-RELEASE
  Using Branch: 13.1-RELEASE
  Post-install Artifact: https://github.com/arrogantrabbit/iocage-plugin-duplicacy.git
  These pkgs will be installed:
    - curl
    - wget
    - jq

Testing Host DNS response to pkg.FreeBSD.org
Testing duplicacy's SRV response to pkg.FreeBSD.org
Testing duplicacy's DNSSEC response to pkg.FreeBSD.org

Installing plugin packages:
  - curl...
  - wget...
  - jq...

Fetching artifact...
Cloning git repository

Branch 13.1-RELEASE does not exist at https://github.com/arrogantrabbit/iocage-plugin-duplicacy.git!
Using "master" branch for plugin, this may not work with your RELEASE

Running post_install.sh
Configuration file does not exist.
Creating default one enabling listening on all interfaces
Configuring netwait to wait for 1.1.1.1
netwait_ip:  -> 1.1.1.1
Enabling netwait and newsyslog services
newsyslog enabled in /etc/rc.conf
netwait enabled in /etc/rc.conf
Starting duplicacy updater
duplicacyupd enabled in /etc/rc.conf
Starting duplicacyupd.
Waiting for duplicacy binary to download
... Still waiting for duplicacy to download
... Still waiting for duplicacy to download
... Still waiting for duplicacy to download
Starting duplicacy service
duplicacy enabled in /etc/rc.conf
Starting duplicacy.
Ready

Admin Portal:
http://10.0.17.10:3875

And looks like so:

Clicking the Manage button takes you to duplicacy web.

There are a few things that can be added if there is interest:

  • An application icon (I don’t think I can just “borrow” an official one)
  • Settings configuration (such as selecting update channel; it’s now hardcoded to “stable”)
  • Configurable update check interval (now hardcoded to every 15 minutes)
  • Older FreeBSD versions support (No idea if anybody wants that)
  • Configurable non-root user ID to run duplicacy (Maybe useful for some)
  • Submit for inclusion to official ixsystems community plugin hub. This is something that @gchen would need to do if this takes off and/or if he wants to.
1 Like

Great! This can be very useful to some users. I’ll setup a TrueNAS to try it.

I really appreciate all your works!

Many thanks for making this. I strongly encourage having this included in the TrueNAS list of plugins.

I’ve installed it on TrueNAS CORE 13.0-U2. No installation issues; however, I do not see a “manage” button - all I see is the standard jail “> SHELL” button. Accessing the GUI directly from a browser (http://[ip]:3875) appears to work fine.

I do think being able to configure backups to run under a non-root user would be useful.

One question: Do backup jobs continue after the browser session is closed? I assume they do, as I’m still seeing traffic on the firewall. My (initial) backups are running so slowly (<2MB/s[16Mb/s]) that I can’t be sure.

Backup speed will be the topic of another thread …

Thanks

Look in Plugins section.

yep!

Urg. Guess looking in the right place would help …

Many thanks again for the help, and for making this.

I’ll try to add that. It’s not obvious how to do conveniently: pre-defined user with a fixed user ID like other plugins do (e.g Plex) is counterintuitive and error prone. I’m not sure if there is a better way.

No problem, glad it’s helpful

While you’re at it, the ability to specify the host name would also be nice to have.

Done. to switch duplicacy to using another user – create that user on your main instance, and then use (assuming user name is duplicacy):

sudo iocage set -P duplicacy_user=$(id -u duplicacy),$(id -g duplicacy) duplicacy

or

sudo iocage set -P duplicacy_user=0 duplicacy

or

sudo iocage set -P duplicacy_user=193,339 duplicacy

The First number is user id, second number – group id. If the second number is missing – user ID and group ID will be the same. If user ID is 0 – root will be used. The last “duplicacy” – is a plugin/jail name

To get current setting:

sudo iocage get -P duplciacy_user duplicacy

This is the standard mechanism TrueNAS configures plugins, it appears they did not get around to implementing UI for it, like it was in a very old version of FreeNAS.

Hostname next :slight_smile: