TrueNAS Scale: Ultimate Home Setup incl. Tailscale

Thank you and that worked!!! Wendall should have mentioned that


Amazing stuff, thank you! I have learned a lot!

I have everything running up to the point of first log in with nextcloud. it seems to be unable to connect to the DB. I have tried a few things:

  • specifically defining a network
  • use script exactly as is with example passwords and everything
  • removing preconfigured db connection and adding it at fist log in
  • rebuilding everything many times, random slightly different wayts of doing it by looking at other erxamples online

I always get the same outrcome:

SQLSTATE[HY000] [1045] Access denied for user ‘nextcloud’@‘’

Whatever the IP address generated is for DB and app server the one in the message is always the app server address (not db).

Any suggestions welcome, I am new to docker and nextcloud :frowning:


So i seem to have fixed it, not sure i understand the syntax for defining volumes, but it looks like i had to alias the volumes too? e.g.:

      - db:/nfs/nextcloud/database:/var/lib/mysql

I added the “db:” as above in the definition of the DB container and “nextcloud:” for the nextcloud one.

EDIT: nope, this created a seperate unused volume with that name and then some kind of autogenerated volume that stored all the data. :frowning:

EDIT2: i neede to also map a volume for html/data instead. this made it work

      - /nfs/nextcloud/doc-root:/var/www/html
      - /nfs/nextcloud/data:/var/www/html/data

i was able to better understand what was goin on by looking at the volumes section for each running container

Hey All, i’m having a heck of a time getting Debian installed as a vm and getting it up and running. First off, when doing the install, i’m getting an error when it tries to auto configure DHCP, I set the network up manually, which could be part of my issue, but I believe I have that all set up correctly. To do a sanity check, I did the install on my computer that is running linux mint in virtualbox. The network configured automatically without issue during that install. However, when I start up Debian, i’m getting the same error message when trying to do the same commands. I confirmed the SHA256sum and SHA512sum matched after I downloaded the file and then again after I ran into issues. I also used the “primary CD image server in Sweden” as directed by the Debian website.

This is my first attempt at a homelab/server and i’m fairly new to all of this, any help would be appreciated,

You can always try the method in the guide I wrote, it does not involve VMs at all.
you can check it out here:

Sounds good, i’ll give this a try and see if I can get it up and running. I was able to figure out part of my issue, I had to comment out the cdrom line in /etc/apt/sources.list. I did this on my virtualbox instance and was then able to install docker successfully.

However, in truenas scale, I still am not able to get internet access on the vm, I tried every option listed for the vm NIC, created a bridge network based on Wendell’s instructions as well as the documentation on the truenas website, but wasn’t able to get anything to work. I do have 2 physical nics on my motherboard, it’s a MSI MAG B550 tomahawk with a 2.5gb and 1gb nic, so I don’t know if that is part of my issue. When in the vm, I can’t ping anything else on my network or outside my network.

Which TrueNAS are you running? angelfish or bluefin? I think they fixed the bug in bluefin where creating bridges can only be done on the actual NAS and not through the web, but can’t say for certain. Either way, my method also touches on VMs if you need them, but that part is optional.

2023 update here.

  • Debian 11 can’t install out of box on TrueNAS Scale. You are best served to turn off UEFI and do it in CSM, then the installer works.
  • This tutorial does not mention what you need to do as sudo and what not. For example, the mount commands need to be ran as sudo, otherwise they won’t work.
  • Parts of this tutorial do not make sense, or complex steps are glossed over:

Be sure to allow-host the Docker VM by IP.

This is set up in Shares > Select your NFS share > Click Edit pencil > Click Advanced > scroll down > fill in IP of your docker VM that you have previously set to static (either on your router, or in VM).

  1. Tell the NFS share system to treat the “root” user on the client as root on this system. Map user and Map root should both be set to rot.

Sorry I still don’t know what this means. My Maproot User and Maproot Group are set to the user and group I have created earlier in TrueNAS GUI, I don’t know if that is what was intended here or not.

The NFS shares in Linux are nightmarish hell scape, because in decades nobody thought of creating any GUI for this and the convoluted console calls stop making sense when you try to figure out permissions and make it mount automatically on boot (the nonsense with fstab is not even explained in this tutorial). After hours of trying to understand how this mess works, I asked chatgpt to explain this to me and it was kinda helpful, so here is some useful commands I was told to use:

  • The -t in mount command refers to file system being used. That’s why you need to call sudo mount -t nfs.
  • To check whether the mount is actually mounted: df -h
  • To check whether the mount is exposed by the server properly: showmount -e (use IP of your TrueNAS)
  • To unmount a mount, the command is sudo umount /path/to/local/folder
  • To auto-mount the folder on startup, you need to modify the fstab. To do that, sudo nano /etc/fstab and add to the bottom: nfsserver:/nfs/share /mnt/nfs nfs defaults 0 0 the zeros at the end seem to be mandatory and they refer to whether this location should be backed up (no) and checked for errors (also no).

The permissions alone in NFS are really a tragic catastrophe. You have to mount a share as sudo, but then the share only works for sudo, so user is asked (twice) to enter password when just trying to access the directory in browser. It’s a different kind of brokenness when you try to create the directory on your user Desktop instead of in storage root, because then sudo is creating a mount to a folder owned by user, but user, despite being owner, can’t access it. This of course means Docker Desktop can’t work with it, regardless of where you mount it, because it isn’t running as sudo. Sometimes you use usernames and passwords, sometimes you refer to users with their UID and GID, then you need to work with who owns the content and who has access to it (chown, chmod). This archaic museum concept that serves nobody is complete mess. That’s where I am stuck for now.

1 Like

Thanks for the clarification. I was having trouble with fstab line mounting the drive in boot, after reboot it would not work

For me what worked was:

On Debian 11 VM I used

systemctl enable systemd-networkd-wait-online.service

and in fstab I wrote row NFS-Server-IP:/FolderName /mnt/FolderName nfs rw,bg,intr,hard,timeo=600 0 0

Found in Unix/Linux forum “/etc/fstab does not mount automatically on Debian 10”

I think the advice to set up a network bridge is overly complicated / unnecessary. What I think happens is that when you remove the CDROM device, that screws up the naming of the network device within the Debian VM. What I did to fix it:

Do an ip addr list to get the name of your network interface (mine is enp0s4). Then do sudo nano /etc/network/interfaces. What I saw there was a lot of references to enp0s5, not enp0s4.

What I did was changed all those enp0s5 references to enp0s4, rebooted and now everything seems to be working fine.