tkrn's blog

random thoughts at best

Menu
  • GitHub repo
  • The Hardware
  • tkrn’s archive
  • OpenPGP Key
  • stack overflow
Menu
Deluge Banner

Deluge Client in a FreeNAS 11 iocage Jail Easy Tutorial

Posted on July 17, 2018December 11, 2024 by tkrn

FreeNAS 11 introduces a new way to manage jails, iocage. As FreeNAS transitions there is a gap for users that leveraged precreated plugins in previous versions of FreeNAS. This guide will help you create a jail in, assign users, permissions and installing Deluge the BitTorrent client in an iocage managed jail.

  1. SSH into FreeNAS as root
  2. Creating the iocage jail
    iocage create -n "deluge" -r 11.1-RELEASE ip4_addr="vnet0|192.168.0.5/24" vnet="on" allow_raw_sockets="1" defaultrouter="192.168.0.1" boot="on" host_hostname="deluge"
  3. Console into the iocage jail
    iocage console deluge
  4. Add the following to /etc/rc.conf
    # Enable SSHD
    sshd_enable="YES"

    # Enable Deluge
    deluged_enable="YES"
    deluge_web_enable="YES"
  5. Install sudo bash and deluge packages
    pkg install sudo bash deluge
  6. (Optional) Create non-root user for interactive logins:
    [root@deluge /root]$ adduser
    Username: patrick
    Full name:
    Uid (Leave empty for default):
    Login group [patrick]:
    Login group is patrick. Invite patrick into other groups? []:
    Login class [default]:
    Shell (sh csh tcsh bash rbash nologin) [sh]: bash
    Home directory [/home/patrick]:
    Home directory permissions (Leave empty for default):
    Use password-based authentication? [yes]:
    Use an empty password? (yes/no) [no]:
    Use a random password? (yes/no) [no]: yes
    Lock out the account after creation? [no]:
    Username : patrick
    Password :
    Full Name :
    Uid : 1001
    Class :
    Groups : patrick
    Home : /home/patrick
    Home Mode :
    Shell : /usr/local/bin/bash
    Locked : no
    OK? (yes/no): y
    adduser: INFO: Successfully added (patrick) to the user database.
    adduser: INFO: Password for (patrick) is:
    Add another user? (yes/no): n
    Goodbye
  7. (Optional) Configure sudo non-root administrator
    echo "user ALL=(ALL) ALL" >> /usr/local/etc/sudoers
  8. Create non-root deluge user to run the services as
    [patrick@deluge /home/patrick]$ sudo adduser
    Username: deluge
    Full name:
    Uid (Leave empty for default):
    Login group [deluge]:
    Login group is deluge. Invite deluge into other groups? []:
    Login class [default]:
    Shell (sh csh tcsh bash rbash nologin) [sh]: bash
    Home directory [/home/deluge]:
    Home directory permissions (Leave empty for default):
    Use password-based authentication? [yes]:
    Use an empty password? (yes/no) [no]:
    Use a random password? (yes/no) [no]: yes
    Lock out the account after creation? [no]:
    Username : deluge
    Password :
    Full Name :
    Uid : 1002
    Class :
    Groups : deluge
    Home : /home/deluge
    Home Mode :
    Shell : /usr/local/bin/bash
    Locked : no
    OK? (yes/no): y
    adduser: INFO: Successfully added (deluge) to the user database.
    adduser: INFO: Password for (deluge) is:
    Add another user? (yes/no): n
    Goodbye
  9. Create directories for deluge services to startup
    sudo mkdir /home/deluge/.config/deluge
    sudo chown -R deluge:deluge /home/deluge/.config
  10. Edit the deluged startup script to use the newly created deluge user
    sudo vi /usr/local/etc/rc.d/delugedLocate the following line and update it from :
    : ${deluged_user:="abcdefghijklmnop"}
    to …
    : ${deluged_user:="deluge"}
    Save and exit.
  11. Edit the deluge_web startup script to use the newly created deluge user
    sudo vi /usr/local/etc/rc.d/deluge_webLocate the following line and update it from :
    : ${deluged_user:="abcdefghijklmnop"}
    to …
    : ${deluged_user:="deluge"}
    Save and exit.
  12. Start the deluge services
    sudo service deluged start
    sudo service deluge_web start
  13. Browse to
    http://hostname:8112
    and enjoy.

Related

6 thoughts on “Deluge Client in a FreeNAS 11 iocage Jail Easy Tutorial”

  1. wanstronian says:
    February 6, 2021 at 10:37 am

    deluged_enable=”YES” or deluge_enable=”YES” in /etc/rc.conf?

    Reply
    1. tkrn says:
      February 8, 2021 at 8:38 am

      Yes. It’s deluged_enable=”YES”. It’s deluged because it’s the daemon not the interface gui. Good question. Thanks.

      Reply
  2. wanstronian says:
    February 6, 2021 at 12:43 pm

    At Step 9, the directory /home/deluge/.config doesn’t exist, so can’t make the deluge subdir. Do I just create it?

    Reply
    1. tkrn says:
      February 8, 2021 at 8:40 am

      Yes. When you added the user it should have created a home directory for deluge which should have set the correct permissions for the deluge user to create the .config file. If it is not, ‘su – deluge’ to become the deluge user then issue a ‘touch /home/deluge/.config’ to create that configuration file. Try that and let me know how it works.

      Reply
  3. wanstronian says:
    February 6, 2021 at 1:50 pm

    You say:

    Browse to
    http://hostname:8112
    and enjoy.

    This asks for a password. At no point have we set a password.

    Reply
    1. tkrn says:
      February 8, 2021 at 8:41 am

      The default password is ‘deluge’ per the user manual here: . Good comment. Thanks!

      Reply

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Nextcloud Virtual File System VFS on Ubuntu 24.10, 24.04, 22.04
  • Site-to-Site OpenVPN between OPNsense and Ubiquiti EdgeRouter EdgeOS
  • Debrand a Dell EMC VxRail Node to a PowerEdge Server
  • HPE ssacli on TrueNAS SCALE
  • Set child encrypted ZFS datasets to inherit the parent – Scripted Fix!

Categories

  • Arcade
  • Development
  • FreeNAS/ZFS
  • Sysadmin
  • Tinkering
  • Uncategorized
©2025 tkrn's blog | Theme by SuperbThemes