Starting TrueNAS Core for New Users

bujingai

Junior Member
Joined
Sep 24, 2007
Messages
29
Reaction score
4
Just setup a new server using TrueNAS. Thanks @TanKianW for the posts. In my previous Unraid, I have plex+sonarr+radarr+delugevpn installed. Is there any guide for these on TrueNAS?
 

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
Just setup a new server using TrueNAS. Thanks @TanKianW for the posts. In my previous Unraid, I have plex+sonarr+radarr+delugevpn installed. Is there any guide for these on TrueNAS?

You could simply find the plugins and install it in the jails of TrueNAS core. It is under Plugins -> click "browse a collection" -> select "Community" plugins. All should be in there, except for your "DelugeVPN"

If you need to torrent, qbittorrent is good too, just turn on encryption.
zgJVyWc.jpg


*I do not know of any step by step guide on these plugins. But if you run into any problem, you should be able to solve it by asking in the TrueNAS core community forum.
 

bujingai

Junior Member
Joined
Sep 24, 2007
Messages
29
Reaction score
4
I wonder what is the problem with my truenas. its almost 20mins now and the installation for the plex still ongoing.
 

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
Last edited:

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
*Updated on Post #4

*TrueNAS Core ZFS Encryption - Setup & Encryption Keys Backup/Restore Process



Points to note:
  • I recommend for home use, ZFS encryption is "Good to have", not a "Must have". You will not want to loose you data when your encryption keys are lost.
  • For production, it should be a "Must Have", but do make sure data are constantly backed up (duplicated) and encryption keys backed up.
  • Do mirror your drives that is containing the encryption keys and also save in a secure location
  • Choosing encryption using paraphrase will requires you to "unlock" the pool every time you reboot. Use saved encryption keys method will unlock itself upon every reboot.
  • If you are using the older version (FreeNAS before 12.0), you will be using the legacy encryption offered. You will not be able to use the new encryption features. The only way is to rebuild the new pool somewhere else using the latest version of TrueNAS 12.0 then copy/migrate the data to the new pool.
  • There will be a slight hit in performance from pool encryption.
 
Last edited:

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
*Update on Post #6

*Hosting Unifi Controller on TrueNAS Core

For TrueNAS Core users with Unifi APs and appliances, you could also choose to locally host the Unifi Controller (personally prefer LTS version), instead of using a dedicated pc, cloud host or cloud key.

The installation is very straight forward. Just look under Plugins -> click "browse a collection" -> select "Community" plugins, followed by download and install the "Unifi Controller" or "Unifi Controller LTS" plugins.
An IP using port 8445 will automatically be created to access the Unifi Controller WebGUI:
rnaYoLl.jpg


The Unifi Controller WebGUI hosted on TrueNAS Core:
GlBvQAe.jpg
 
Last edited:

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
*Updated Post #2*

Add on to the use of cloud sync task with BackBlaze:



Points to note:
  • Tom from Lawrence System is using Backblaze as his cloud back up in the demo. The steps to sync with other cloud providers are pretty similar (using API or login account). In my case, I am using Amazon S3, you can also back up OneDrive or Google Drive on TrueNAS Core.
  • Similar thinking as Tom, I trust no cloud providers to secure my data or to be up 24/7 without downtime. That is the reason why I always prefer backup to also come with locally accessible data backups. Critical data should always have multiple backups and encrypted (locally) before storing to cloud providers.
  • Do read up on the function for data PULL, PUSH and SYNC before choosing the one that best suits your use case. In my case, I prefer to PUSH to my cloud provider.
  • Do test out (create a mockup) the restore-from-cloud process to make sure it works, especially for mission critical. You will not want the restoring to not work during an actual data rescue/recovery.
  • If you are using Nextcloud for backing up your data. I recommend to create separate dataset folder to store the sync’ed data, create snapshots and back it up to cloud providers like AWS and Backblaze.
Create Cloud Credential:
NUQh9QT.jpg


Cloud Sync Task on Backblaze B2:
HqtX26H.jpg

RSJoRNy.jpg


Encrypted data PUSH to Backblaze:
UNwFFel.jpg
 
Last edited:

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
TAKE NOTE:

For those that has been trying to install the "Nextcloud" plugins version 21.0.1 recently on new install, you might be faced with something like "Syntax error" or "MySQL error" when looking through the install log file. This is due to an error on MySQL in the plugin. This will not affect those that has already install the Nextcloud plugin since version 21.0.0.

The error might look like this when you are trying to create the admin user:
  1. Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
  2. Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name does not resolve
  3. Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'dbadmin'@'localhost' (using password: YES)
Some might have sort it out by editing the code (post_install.sh) and manually reinstall the plugins using the occ cmd. Some might have just given up.

Update: I have been monitoring the situation on this error. The edited code has been put up on GitHub the last 2 weeks and incorporated by the TrueNAS developers. You just need to reinstall the plugins and it will work again starting 23 May 2021.

=================================================================================

*Some may have asked how do you revert back to the previous plugin install version if the latest install screw up during updates?
Ans: Create tasks for periodic snapshots to be taken on the iocage (recursively). Any screw ups, just restore the affected jails.
 
Last edited:

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
Update on Post #3

*Nextcloud trouble-shoot (Using Cron on background jobs):

I received help request from TrueNAS users on problem using "Cron" under the setting of nextcloud's background jobs setting: Under Basic settings => Background jobs. The problem will look like this where the background jobs failed to execute :
B1Q7a9u.png


This is a common problem where quite a number of users on the nextcloud help forum could not append the necessary cmd to start the background jobs under the crontab. The documentation could be found here:
https://docs.nextcloud.com/server/l...ion_server/background_jobs_configuration.html

One of the key reasons is that they are unable to key in the command. This is due to the default use of "vi editor" instead of editor like "nano" when you try to append the crontab cmd. "vi editor" is actually commonly use in linux/unix.

If you are more familiar with "nano" you can change the default crontab editor to nano by keying:

Code:
setenv VISUAL /usr/local/bin/nano

OR

You could follow my steps here and just get it done by using the default vi editor to append the crontab cmd to setup "Cron" for back ground jobs on nextcloud:

Code:
Open up the shell from the root of the nextcloud jail, type cmd:

crontab -u www -e         (*instead of www-data)

Next you will be inside the vi editor cmd environment with "~" on the left hand side.
<=

~
~
~
~
~
~
~
~
~
~

type "i" or "a" to enter into cmd mode to edit/append. Your cursor to key will appear at the top.

Followed by append/input the following:

*/5 * * * * /usr/local/bin/php -f /usr/local/www/nextcloud/cron.php    (*slightly diff from the documentation due to diff in run env)

After keying, hit "Esc" to exit from the cmd mode, where the cursor will appear at the bottom.

Type ":wq" and hit "Enter" to exit and save.

ALT: You can exit and save by typing "Shift + zz"

After exit from vi editor, type cmd

crontab -u www -l                (*to verify that the crontab command has been appended.)

You should see output:

*/5 * * * * /usr/local/bin/php -f /usr/local/www.nextcloud/cron.php

type exit and you are DONE!

When you enter into your nextcloud basic setting, this will be the end result you see:
DT9nOxy.jpg


==============================================================================

*If you wish to learn more on vi editor, you can read/watch this:

Basic vi editor cmd:
https://www.cs.colostate.edu/helpdocs/vi.html

 
Last edited:

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
SIDE NOTE:

For those who are interested in improving the performance of their TrueNAS Core system, feel free to try out these settings under System => Tunables. These has been shared by Patrick Kennedy from servethehome in the past. Feel free to check it out.

For copying and pasting:
  • kern.ipc.maxsockbuf = 16777216
  • net.inet.ip.intr_queue_maxlen = 2048
  • net.inet.tcp.recvbuf_inc = 524288
  • net.inet.tcp.recvbuf_max = 16777216
  • net.inet.tcp.recvspace = 4194304
  • net.inet.tcp.sendbuf_inc = 32768
  • net.inet.tcp.sendbuf_max = 16777216
  • net.inet.tcp.sendspace = 2097152
  • net.route.netisr_maxqlen = 2048
StrhFaT.jpg
 
Last edited:

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
*Nextcloud (IaaS) on TrueNAS Core
For some who are still considering whether to set up Nextcloud on their TrueNAS Core system. I encourage you to give it a try. It will take some time to trouble-shoot but definitely worth it. You will be able to create personal cloud share for your personal or work team. Storage limit is totally within your control, not tied to any subscription fees, privacy, near instant sync and response with our current fiber internet. However, you do need to spend some time to setup proper security, maintenance and update for the cloud server.

Personal customizable cloud interface
Customizable Login Page:
t3KHs1D.jpg


Customizable Welcome page:
hszPfTd.jpg


Security setting such as password policy and setting up anti-virus file scanning:
dm7slFJ.jpg


User and Group Admin Control:
JwdQfVM.jpg


Set up Storage Quota warning and notification:
CkBFi3K.jpg


Set up shares or group shares:
jYlX2QP.jpg
 
Last edited:

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
*Updated on Post #3

Setting up ClamAV virus scanning server for Nextcloud on TrueNAS Core

In order to set up ClamAV scanning on your nextcloud server, you could install the ClamAV scanning server in one of the TrueNAS community plugins, then point the nextcloud server to the internal ClamAV scanning server.
TAKE NOTE: Running the ClamAV server will take up some resources.

Step 1: Install ClamAV plugin on TrueNAS core:
uN9aK72.jpg


Step 2: We will set up the ClamAV using cmd:
Code:
Open up the shell cmd on the root of ClamAV jail

Key in:

ee /usr/local/etc/clamd.conf

uncomment the "#" from the lines of:

TCPSocket 3310
TCPAddr 192.168.XX.XX                 (*IP Address of your ClamAV server)

Press Esc, choose "a" to leave and save

restart the ClamAV server using cmd:

/usr/local/etc/rc.d/clamav-clamd restart

After restart, type:

sockstat -l -4

You should be able to see the IP address and configured port of the ClamAV server as output

exit and we are DONE!

Step 3: Complete the set-up by pointing the nextcloud server to the ClamAV daemon host server IP, click "save" and it is done!
RRwNule.jpg


Test it out by uploading a virus test file (Do not use an actual file with virus!):
yzUYcti.jpg
 
Last edited:

blimey

Senior Member
Joined
Jun 5, 2008
Messages
2,221
Reaction score
1
Interesting project.
Are there any cost savings vs getting a ready-made Synology NAS like the DS1821+?
 

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
Interesting project.
Are there any cost savings vs getting a ready-made Synology NAS like the DS1821+?

Setting up a DIY NAS might not always be cheaper since it could easily be spec'ed higher.

Hope this will be of help to you when budgeting:
https://forums.hardwarezone.com.sg/...es-now-part-4.5450855/page-311#post-132708163

I will think another aspect to consider when setting up a NAS is its reliability and resiliency. In this aspect ZFS wins hands down as compared to OTS NAS file system. Want to learn more, visit Page 1 of the post.

Do take note that it is not as simple and straight forward to set up a DIY NAS (using TrueNAS Core) as compared to OTS NAS. This is one of the reasons why I came out with the thread to help the new users to overcome the steeper learning curve.

If you are willing to learn, explore and experience the satisfaction of setting up your own DIY NAS, then this is your choice. To me, if you could get it up and running, you may never look back at OTS NASes.

OR

If you only want to start using your NASes without much hassle, OTS NASes should still be a better choice.


Hope it helps.
 
Last edited:

blimey

Senior Member
Joined
Jun 5, 2008
Messages
2,221
Reaction score
1
Setting up a DIY NAS might not always be cheaper since it could easily be spec'ed higher.

I will think another aspect to consider when setting up a NAS is its reliability and resiliency. In this aspect ZFS wins hands down as compared to OTS NAS file system. Want to learn more, visit Page 1 of the post.

Do take note that it is not as simple and straight forward to set up a DIY NAS (using TrueNAS Core) as compared to OTS NAS. This is one of the reasons why I came out with the thread to help the new users to overcome the steeper learning curve.

If you are willing to learn, explore and experience the satisfaction of setting up your own DIY NAS, then this is your choice. To me, if you could get it up and running, you may never look back at OTS NASes.

OR

If you only want to start using your NASes without much hassle, OTS NASes should still be a better choice.


Hope it helps.
yup it helps. just another query. is there an app in TrueNas and mobile app that's similar to google photos?
I have a synology nas and the new photos app is suppose to come with dsm 7. That's taking forever and I'm thinking of building NAS to backup photos.
 

TanKianW

Master Member
Joined
Apr 21, 2005
Messages
3,687
Reaction score
81
yup it helps. just another query. is there an app in TrueNas and mobile app that's similar to google photos?
I have a synology nas and the new photos app is suppose to come with dsm 7. That's taking forever and I'm thinking of building NAS to backup photos.

Hope this will be of help to you when budgeting:
https://forums.hardwarezone.com.sg/...es-now-part-4.5450855/page-311#post-132708163

I don’t use mobile Android so may not be able to provide you with the best info.

But for iOS platform, what I did is turn on auto photo upload on my nextcloud app (with location services ON) that sync with my iPhone camera roll. I may still need to launch the app (likely due to app and Apple reiOS restrictions) manually at times to sync it to my NAS but it is quite snappy. But my experiences with the app is not the most pleasant too coz it seems to only back up a year worth of my photo on Camera roll. So I end up downloading from iCloud and store in my NAS created photo folder for all the old photos. Then recent photos just use the nextcloud app to sync.

Any more queries, could send me a conversation.

Hope it helps.
 
Last edited:
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ. Forum members and moderators are responsible for their own posts.

Please refer to our Terms of Service for more information.
Top