jcconnell's picture

I'm using the ownCloud appliance offered as a ProxMox template. My container's run on a fast ZFS pool of SSDs and I store data on another, larger ZFS pool.

The TKL template sets the data directory automatically, but I need my data directory to be on a mountpoint that I offer to the LXC container via Proxmox (The mountpoint will be on the data ZFS pool). 

I've read that there are issues regarding moving the data directory after ownCloud has been installed. I have experienced some of these issues first hand with random losses of data or other wierd issues after installation. Can anyone suggest a way to change the data directory so that data is stored on my larger pool? Should I set the mount point to be the same as the directory used by owncloud default?

Additionally, could anyone suggest a way to get Let's Encrypt certificates installed?

Forum: 
Jeremy Davis's picture

TBH I haven't heard of data loss from moving the default ownCloud data dir. And TBH it doesn't make sense to me that that would happen. If Apache is stopped (the ownCloud code runs under Apache), then the whole data directory moved, the config updated (to point to the new dir) and Apache restarted; it should "just work". At least that's how well coded software should behave IMO. Having said that many programmers argue that PHP (what ownCloud is written in) is a pretty flaky, volatile language. As an aside, from what I gather there has been a lot of positive progress in PHP7.

But back to ownCloud, another way to go would be to move the data directory and then bind mount the new location to the old. Bind mounts allow one area of the filesystem (i.e. a directory) to mounted to another area of the same filesystem (i.e. a different directory). Then as far as ownCloud is concerned it wouldn't have moved at all!

Regardless, if you are mounting an external directory into your LXC ownCloud guest, then I would just mount your external data dir to the existing dat location. You need to mount the directory anyway, so why not save yourself some time and avoid the need to reconfigure ownCloud?? Bind mounting is also an alternative here too.

As for Let's Encrypt, we have a helper script in the pipeline, but it's not quite ready yet. So in the meantime, there are plenty of tutorials around on how to set up Let's Encrypt SSL certs. If you keep in mind that under the hood, TurnKey is Debian (v14.x = Debian Jessie) then google should head you in the right direction. But please don't hesitate to ask if you have further specific questions or need further help setting it up.

jcconnell's picture

I attempted to mount the external directory to the data location within the container but the container won't start. I also tried the same on a fresh installation of the TKL template with no luck. Any other ideas?

Jeremy Davis's picture

Did you follow the Proxmox docs?

If not, give that a go! :)

If so then perhaps your issues run deeper? I'd try testing a non-TurnKey LXC container (i.e. Debian or Ubuntu) and see what happens there. At least that will clarify whether it's a TurnKey issue or something else (e.g. Debian upstream? Proxmox?).

Add new comment