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.
- SSH into FreeNAS as root
- 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"
- Console into the iocage jail
iocage console deluge
- Add the following to /etc/rc.conf
# Enable SSHD
sshd_enable="YES"
# Enable Deluge
deluged_enable="YES"
deluge_web_enable="YES" - Install sudo bash and deluge packages
pkg install sudo bash deluge
- (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 - (Optional) Configure sudo non-root administrator
echo "user ALL=(ALL) ALL" >> /usr/local/etc/sudoers
- 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 - Create directories for deluge services to startup
sudo mkdir /home/deluge/.config/deluge
sudo chown -R deluge:deluge /home/deluge/.config
- Edit the deluged startup script to use the newly created deluge user
sudo vi /usr/local/etc/rc.d/deluged
Locate the following line and update it from :
: ${deluged_user:="abcdefghijklmnop"}
to …
: ${deluged_user:="deluge"}
Save and exit. - Edit the deluge_web startup script to use the newly created deluge user
sudo vi /usr/local/etc/rc.d/deluge_web
Locate the following line and update it from :
: ${deluged_user:="abcdefghijklmnop"}
to …
: ${deluged_user:="deluge"}
Save and exit. - Start the deluge services
sudo service deluged start
sudo service deluge_web start
- Browse to
http://hostname:8112
and enjoy.
deluged_enable=”YES” or deluge_enable=”YES” in /etc/rc.conf?
Yes. It’s deluged_enable=”YES”. It’s deluged because it’s the daemon not the interface gui. Good question. Thanks.
At Step 9, the directory /home/deluge/.config doesn’t exist, so can’t make the deluge subdir. Do I just create it?
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.
You say:
Browse to
http://hostname:8112
and enjoy.
This asks for a password. At no point have we set a password.
The default password is ‘deluge’ per the user manual here: . Good comment. Thanks!