Proxmox + OwnCloud

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

T_Minus

Build. Break. Fix. Repeat
Feb 15, 2015
7,641
2,058
113
Wait a sec... did you not just ask about Proxmox NAS?
That's why I said I forgot about this thread and bumped it up :p

Got busy and never got to doing the owncloud/nextcloud like discussed here, LOL!!
only plain proxmox/zfs CLI stuff for me so far.
 
  • Like
Reactions: Patrick

nitrobass24

Moderator
Dec 26, 2010
1,087
131
63
TX
Nextcloud

Also I have given up on dealing with SSL and just got a free account at Cloudflare. They deal with all things SSL, and I get better peering for free.


Sent from my iPhone using Tapatalk
 
  • Like
Reactions: T_Minus

casperghst42

Member
Sep 14, 2015
116
22
18
55
I've used ownCloud, and now nextCloud - one thing I've noticed is that a php memory cache like redis is required to make move.
 

Shankar

New Member
Feb 22, 2018
12
2
3
40
I just set up an instance of NextCloud on Proxmox Container. Set up was a breeze, but I ran into a permissions problems setting it up. The way I have it right now is that an external 8 TB disk is mounted on the proxmox host which is then bind mounted to the proxmox container via a mount point. So far so good, I can read/write anything to the entire disk from the container.

The mount point in the container shows up as owned by root and with 777 perms. NC doesn't like that, and chown/chmod don't seem to work form within the container for any file/folder. I did some research, and found that was because of how permissions are handled from host to containers for mounts. Short of understanding all that and fixing it, do you guys know of any alternative to getting NC to use a directory inside the external disk for all it's files ?

I do understand that setting up a NAS VM/CT with all my disks and data is a better way to go for the long term, but honestly, I hadn't considered that until I ran into this issue. Any help is appreciated.
 

Monoman

Active Member
Oct 16, 2013
410
160
43
I just set up an instance of NextCloud on Proxmox Container. Set up was a breeze, but I ran into a permissions problems setting it up. .........
For me the easy answer wasn't a bind mount point, but I installed NFS and just setup an internal network and mounted it on the guest.
 

Shankar

New Member
Feb 22, 2018
12
2
3
40
For me the easy answer wasn't a bind mount point, but I installed NFS and just setup an internal network and mounted it on the guest.
Looks like that's a better way to set up everything for me, what does your set up for NFS look like in terms of packages/software and configs ? Also, would the NFS throughput be enough to stream using Plex ?
 

Monoman

Active Member
Oct 16, 2013
410
160
43
Looks like that's a better way to set up everything for me, what does your set up for NFS look like in terms of packages/software and configs ? Also, would the NFS throughput be enough to stream using Plex ?
Yep! very easy... You need to give your proxmox host an ip address on a bridge device you shared with your guest. It's really not best practice for production systems but for home use it's awesome!!

so in my example, I used vmbr2. If you're not using a bonded link or vlans then you can ignore/remove the bond0.210 and substitute for your local device (eno... or enp...)

Code:
auto vmbr2
iface vmbr2 inet static
        address  192.168.21.20
        netmask  255.255.255.0
        bridge_ports bond0.210
        bridge_stp off
        bridge_fd 0
#vlan 210 (Storage Net)
Then you install the NFS server packages

Code:
apt install nfs-common nfs-kernel-server
Lastly, you edit /etc/exports

Code:
/mount/location/of/media/you/are/sharing/to/plex/server 192.168.21.0/24(rw,no_root_squash)
then you'll want to update the running nfs shares

Code:
 exportfs -av
Let me know if you have any issues or questions!!
 
  • Like
Reactions: Shankar and T_Minus

Shankar

New Member
Feb 22, 2018
12
2
3
40
Yep! very easy... You need to give your proxmox host an ip address on a bridge device you shared with your guest. It's really not best practice for production systems but for home use it's awesome!!

so in my example, I used vmbr2. If you're not using a bonded link or vlans then you can ignore/remove the bond0.210 and substitute for your local device (eno... or enp...)

Code:
auto vmbr2
iface vmbr2 inet static
        address  192.168.21.20
        netmask  255.255.255.0
        bridge_ports bond0.210
        bridge_stp off
        bridge_fd 0
#vlan 210 (Storage Net)
Then you install the NFS server packages

Code:
apt install nfs-common nfs-kernel-server
Lastly, you edit /etc/exports

Code:
/mount/location/of/media/you/are/sharing/to/plex/server 192.168.21.0/24(rw,no_root_squash)
then you'll want to update the running nfs shares

Code:
 exportfs -av
Let me know if you have any issues or questions!!
That is awesome, thank you for the detailed instructions ! It did not occur to me that I should make the Proxmox host my NFS server. I wanted to have a separate VM/CT for NFS since that will keep the host clean and cutter-free from any configs.

I'm currently testing the VM route, I have a feeling I'll run into the same perms problems, so I'll do the host NFS thingy once I fail with my VM. I'll keep you posted !
 
  • Like
Reactions: Monoman

msg7086

Active Member
May 2, 2017
423
148
43
36
I've never used NC, but for NFS itself, mount-point + no_root_squash and it just works. Samba also works great on that config (I do samba on one of my box using mount-point and works like a charm.)

And I also noticed that you said everything is 777. It's not like that on my side. I'm doing full partition mount point and I can change permissions and owners just fine.

Code:
# cat /etc/pve/nodes/casper8/lxc/199.conf
arch: amd64
cores: 4
hostname: Kitakami
memory: 49152
mp0: /dev/md11,mp=/pub,backup=0
net0: name=eth0,bridge=vmbr0,gw=172.16.0.1,hwaddr=***,ip=172.16.13.199/16,type=veth
onboot: 1
ostype: debian
rootfs: vg0:vm-199-disk-1,size=2G
swap: 1
 
  • Like
Reactions: abq

Shankar

New Member
Feb 22, 2018
12
2
3
40
I still haven't gotten the NFS to work, I'm stuck at the mounting part on the client. I keep getting access denied on the client -
mount.nfs: access denied by server while mounting 192.168.10.120:/media/TV/TV
As for the 777 permissions, I think they're because of my setup, a few of my drives are NTFS mounted on Proxmox host, and they show up as root:root with 777 perms. The other ext4 shows up as root:root with 755 perms. The perms are carried through the mounts, and are unchangeable for NTFS mounts. They are also readonly when bound to containers. I'm hoping to keep those as-is and remedy the perms and readonly situation with NFS.

I can install NFS on both container and VM, but NFS fails to start on the container with nfsd.mount errors, and I think it's because of LXC. NFS starts without issues on a VM, and I can export the files/locations, but I cannot mount them on the clients, I get the error above. I haven't yet dont the NFS on proxmox host, but I have a feeling I'll run into the same perms issue.

This is the fstab for the proxmox host -
Code:
UUID=fd53663a-6ddf-4c3c-8b2c-c4c342429dfe /media/Data ext4 defaults 0 0
UUID=1C342BB7342B92B6 /media/TV ntfs-3g defaults,locale=en_US.utf8 0 0
UUID=01CC5D8ED9352620 /media/Movies ntfs-3g defaults,locale=en_US.utf8 0 0
UUID=3CBE0681BE0633C4 /media/Backup-8T ntfs-3g defaults,locale=en_US.utf8 0 0
I'll split out the Container and VM configs into different posts for easy readability.
 

Shankar

New Member
Feb 22, 2018
12
2
3
40
This is the CT/Container config for NFS
Code:
...
mp0: /media/TV,mp=/media/TV
mp1: /media/Movies,mp=/media/Movies
mp2: /media/Data,mp=/media/Data
rootfs: local-lvm:vm-902-disk-1,size=10G
...
This is the /etc/exports for CT
Code:
...
/media/TV/TV 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/TV/Videos 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Movies 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Data/Photos 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Data/Songs 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Data/Software 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Data/Transmission-Downloads 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
This is the syslog on CT when I do a service nfs-kernel-server start
Feb 25 14:47:02 NFS-CT-Test systemd[1]: run-rpc_pipefs.mount: Failed to reset devices.list: Operation not permitted
Feb 25 14:47:02 NFS-CT-Test systemd[1]: Mounting RPC Pipe File System...
Feb 25 14:47:02 NFS-CT-Test systemd[1]: proc-fs-nfsd.mount: Failed to reset devices.list: Operation not permitted
Feb 25 14:47:02 NFS-CT-Test systemd[1]: Mounting NFSD configuration filesystem...
Feb 25 14:47:02 NFS-CT-Test systemd[1]: nfs-config.service: Failed to reset devices.list: Operation not permitted
Feb 25 14:47:02 NFS-CT-Test systemd[1]: Starting Preprocess NFS configuration...
Feb 25 14:47:02 NFS-CT-Test systemd[1]: Started Preprocess NFS configuration.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: proc-fs-nfsd.mount: Mount process exited, code=exited status=32
Feb 25 14:47:02 NFS-CT-Test systemd[1]: Failed to mount NFSD configuration filesystem.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: Dependency failed for NFS Mount Daemon.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: Dependency failed for NFS server and services.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: Dependency failed for NFSv4 ID-name mapping service.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: nfs-idmapd.service: Job nfs-idmapd.service/start failed with result 'dependency'.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: nfs-mountd.service: Job nfs-mountd.service/start failed with result 'dependency'.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: proc-fs-nfsd.mount: Unit entered failed state.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: run-rpc_pipefs.mount: Mount process exited, code=exited status=32
Feb 25 14:47:02 NFS-CT-Test systemd[1]: Failed to mount RPC Pipe File System.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: Dependency failed for RPC security service for NFS client and server.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: rpc-gssd.service: Job rpc-gssd.service/start failed with result 'dependency'.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: Dependency failed for RPC security service for NFS server.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: rpc-svcgssd.service: Job rpc-svcgssd.service/start failed with result 'dependency'.
Feb 25 14:47:02 NFS-CT-Test systemd[1]: run-rpc_pipefs.mount: Unit entered failed state.
 

Shankar

New Member
Feb 22, 2018
12
2
3
40
This is the Proxmox VM config for NFS
Code:
...
virtio1: /dev/disk/by-id/ata-WDC_WD10JPLX-00MBPT0_JR1000BN31K76E-part1,size=976761560K
virtio2: /dev/disk/by-id/ata-Hitachi_HDS723015BLA642_MN1120F102JSBD-part1,size=1465136001K
virtio3: /dev/disk/by-id/ata-Hitachi_HUS724030ALE641_P8H80XNR-part2,size=2861459M
virtio4: /dev/disk/by-id/usb-WD_easystore_25FB_3753473950503043-0:0-part1,size=7630883M
This is the /etc/fstab on the VM -
Code:
UUID=fd53663a-6ddf-4c3c-8b2c-c4c342429dfe /media/Data ext4 defaults 0 0
UUID=1C342BB7342B92B6 /media/TV ntfs-3g defaults,locale=en_US.utf8 0 0
UUID=01CC5D8ED9352620 /media/Movies ntfs-3g defaults,locale=en_US.utf8 0 0
UUID=3CBE0681BE0633C4 /media/Backup-8T ntfs-3g defaults,locale=en_US.utf8 0 0
This is the /etc/exports on the VM -
Code:
/media/TV/TV 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/TV/Videos 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Movies 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Data/Photos 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Data/Songs 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Data/Software 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Data/Transmission-Downloads 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Backup-8T/NextCloud 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
/media/Backup-8T/ 192.168.10.0/255.255.255.0(rw,no_root_squash,no_subtree_check)
exportfs -av works without problems
Code:
$ sudo exportfs -av
exporting 192.168.10.0/255.255.255.0:/media/Backup-8T
exporting 192.168.10.0/255.255.255.0:/media/Backup-8T/NextCloud
exporting 192.168.10.0/255.255.255.0:/media/Data/Transmission-Downloads
exporting 192.168.10.0/255.255.255.0:/media/Data/Software
exporting 192.168.10.0/255.255.255.0:/media/Data/Songs
exporting 192.168.10.0/255.255.255.0:/media/Data/Photos
exporting 192.168.10.0/255.255.255.0:/media/Movies
exporting 192.168.10.0/255.255.255.0:/media/TV/Videos
exporting 192.168.10.0/255.255.255.0:/media/TV/TV
The NFS exports show up on other containers/systems on my network, .10.120 is my NFS VM -
Code:
$ showmount -e 192.168.10.120
Export list for 192.168.10.120:
/media/Backup-8T                   192.168.10.0/255.255.255.0
/media/Backup-8T/NextCloud         192.168.10.0/255.255.255.0
/media/Data/Transmission-Downloads 192.168.10.0/255.255.255.0
/media/Data/Software               192.168.10.0/255.255.255.0
/media/Data/Songs                  192.168.10.0/255.255.255.0
/media/Data/Photos                 192.168.10.0/255.255.255.0
/media/Movies                      192.168.10.0/255.255.255.0
/media/TV/Videos                   192.168.10.0/255.255.255.0
/media/TV/TV                       192.168.10.0/255.255.255.0
And when I try to mount any location, I get access denied.
Code:
$ sudo mount -t nfs 192.168.10.120:/media/Backup-8T/NextCloud /media/NextCloud
mount.nfs: access denied by server while mounting 192.168.10.120:/media/Backup-8T/NextCloud

$ sudo mount -t nfs 192.168.10.120:/media/Data/Transmission-Downloads /media/NextCloud
mount.nfs: access denied by server while mounting 192.168.10.120:/media/Data/Transmission-Downloads

$ sudo mount -t nfs 192.168.10.120:/media/Movies /media/NextCloud
mount.nfs: access denied by server while mounting 192.168.10.120:/media/Movies
This is more of an NFS client/server issue, since both NTFS and EXT systems are geting the same access denied message. What am I missing ? What am I doing wrong ?
 

Monoman

Active Member
Oct 16, 2013
410
160
43
Switch to CIDR notation on the /etc/exports

192.168.10.0/24

What's the IP of your container? adding in a network CIDR range limits access by ip range.

I would change how you're doing things here. IF you want to let owncloud manage all the shares, just mount a single root folder once to the CT and then let it share from the share folder respectively.

Can you give a little more detailed information about your network setup, different vlans, IP ranges for each as it would help.
 
  • Like
Reactions: T_Minus

Shankar

New Member
Feb 22, 2018
12
2
3
40
Sure, I'm working on containerizing all my stuff, so I have multiple CTs running on Proxmox. Plex, Transmission, Splunk, NextCloud, Gitlab, etc. The mounts are for all the containers, I'll mount each of them as needed on respective CTs. For now, Plex is working with mount points from Proxmox, though they're readonly.

All of my systems/VMs/CTs are on the same network, 192.168.10.*, no VLANs or network separations. NFS VM is on 10.120

I'm only looking to have one mount handled by NC, which is /media/Backup-8T/NextCloud. All data that needs to be handled by NC goes in that location. For NC's use, that mount needs to have 0770 perms, and read/write. Mounting those NTFS locations directly from Proxmox to either CT/VM wouldn't let me switch permissions, which is why I'm leaning towards NFS, hoping NFS will allow me to chmod the NextCloud dir.

The configs I posted earlier are not all related to NC, they're just for the bigger picture.
 

msg7086

Active Member
May 2, 2017
423
148
43
36
For NFS try add this line to your lxc config:

Code:
lxc.aa_profile: unconfined
Not sure if it's the root cause of this, but I think it worth a try.
 

Shankar

New Member
Feb 22, 2018
12
2
3
40
For NFS try add this line to your lxc config:

Code:
lxc.aa_profile: unconfined
Not sure if it's the root cause of this, but I think it worth a try.
For NFS on CT, that's definitely the root cause, disabling AppArmor on CT clears up the NFS start problem, but I'm running into the same access denied by server when mounting. 10.242 is the NFS on CT, data mounted using bind mounts as mentioned above. showmounts tells me it can see everything, but I cannot mount anything.

$ sudo showmount -e 192.168.10.242
Export list for 192.168.10.242:
/media/Backup-8T 192.168.10.0/24
/media/NextCloud 192.168.10.0/24
/media/Transmission-Downloads 192.168.10.0/24
/media/Software 192.168.10.0/24
/media/Music 192.168.10.0/24
/media/Photos 192.168.10.0/24
/media/Movies 192.168.10.0/24
/media/Videos 192.168.10.0/24
/media/TV 192.168.10.0/24
$ sudo mount -t nfs 192.168.10.242:/media/NextCloud /media/NextCloud
mount.nfs: access denied by server while mounting 192.168.10.242:/media/NextCloud
This is the error message I see on the Container when I try to mount -
Feb 25 16:39:35 NFS-CT-Test kernel: [170765.928539] audit: type=1400 audit(1519594775.801:566): apparmor="DENIED" operation="mount" info="failed type match" error=-13 profile="lxc-container-default-cgns" name="/media/NextCloud/" pid=10324 comm="mount.nfs" fstype="nfs" srcname="192.168.10.242:/media/NextCloud"
I can understand NFS on CT running into the Apparmor issue, but why do I have it on a regular VM ?