Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Running NexcloudPi in and unprivileged LXC using Unraid as data directory

Featured Replies

My journey started with trying to run Nextcloud on Unraid.  

No matter which version I tried I could not get Nextcloud to connect to the Collabora server.  I would always get a connection time out error (guessing a network error on my end).  

 

So, I turned to setting up a LXC (unprivileged) container to run NextcloudPi, which had worked for me in the past

Only problem with this was that I had to keep increasing the disk space as I added more data and backups took longer and longer.

 

Nextcloud Pi has an GUI interface that allows for easy moving of your data directory to another location.

Unfortunately, the GUI doesn't like moving the data dir to SMB or NFS shares.  

 

I can across several posts that suggested if you modify the config.php file it would work:

nano /var/www/nextcloud/config/config.php

and change to new location:

 'datadirectory' => '/mnt/NAS/new_location/data',

I initially set up an SMB share on Unraid and gave access to the LXC following these directions:

https://forum.proxmox.com/threads/tutorial-unprivileged-lxcs-mount-cifs-shares.101795/

but apparently Nextcloud doesn't support SMB2 data dir (at least that's what the error message said).

 

I found another post suggesting that NFS is supported.

So, followed this howto:

https://forum.proxmox.com/threads/tutorial-mounting-nfs-share-to-an-unprivileged-lxc.138506/

 

I then created a NFS share in Unraid with 

Export: Yes 

Security: Publix

 

After moving  (copying) all the data to this location I was able to access data and Read/Write

 

Success!

 

To help secure the share I changed Security:Private and added rule

192.168192.168.1."node IP"(async,wdelay,hide,no_subtree_check,fsid=104,anonuid=99,anongid=100,sec=sys,rw,insecure,root_squash,all_squash).1."node IP"(async,wdelay,hide,no_subtree_check,fsid=104,anonuid=99,anongid=100,sec=sys,rw,insecure,root_squash,all_squash)

Be sure to use the IP address of the node and not the container

 

Everything appears to work

I apologize if this isn't formatted properly, I am a bit of a noob, but wanted to share in the hopes I could help someone else

Please let me know if I have done something incorrectly or if there is a better way to implement this.

 

 

 

  • Community Expert

@ich777 lxc assistance regarding mount points to unraid.


Per ich777 ex:

On 2/27/2023 at 1:08 AM, ich777 said:

As I wrote above and this is no typo that the first / is missing at PATHINLXC:

lxc.mount.entry = /mnt/user/YOURSHARE mnt/PATHINLXC none bind 0 0

 

There is nothing like that but it should work as usual.

 

 

I can tell also for sure that it is working since I'm using a path from UD also in a LXC container.


as you will need to stop the lxc, go to the lxc configuration and add data there to make a host / container path to update the lxc data to add a location.

otherwise you will need to leverage fstab to auto smb/nfs mount and use a cron and write a linux sh script to copy/move data out of the lxc...

so you would add your share that your also tryign to share via nfs/smb....

lxc.mount.entry = /mnt/NAS/new_location/data mnt/unraid none bind 0 0


this would mount it at ?/mnt/unraid? in the lxc container... 
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.