# Owncloud in FreeBSD Jail



## scewing (Sep 3, 2016)

I'm considering setting up Owncloud on my FreeBSD 10.3 server in a jail, but I'm wondering about being able to connect to files outside the jail. I have a pretty sizeable file collection (photos, docs, etc.) on the server  now (not jailed) that I will want to connect to from Owncloud inside the jail.

Does anyone have any experience with doing this? Will it be an issue?

Thanks!


----------



## robroy (Sep 3, 2016)

scewing, use nullfs(5) to make directories outside of the jail accessible from inside the jail.

This example makes /turkey accessible read-write from inside of the jail located in /jails/doorknob:

/etc/jail.conf:

```
exec.start = "/bin/sh /etc/rc";
exec.stop  = "/bin/sh /etc/rc.shutdown";
exec.clean;
mount.devfs;

doorknob {
    path = /jails/doorknob;
    host.hostname = doorknob;
    ip4.addr = 192.168.16.4;
    interface = igb1;
    mount = "/turkey /jails/doorknob/turkey nullfs rw 0 0";
}
```

PS.  I've never used OwnCloud before, but my guess is that it'd work fine with a configuration similar to what's above.


----------



## scewing (Sep 3, 2016)

Awesome! Thanks a million. I've got almost zero experience with jails. Looks like that's going to change now. 
Thanks again!


----------



## robroy (Sep 3, 2016)

You're welcome scewing!


----------



## rigoletto@ (Sep 3, 2016)

Just to point out most people are switching to Nextcloud. And it is already on ports.


----------



## scewing (Sep 3, 2016)

lebarondemerde said:


> Just to point out most people are switching to [URL='https://nextcloud.com']Nextcloud





lebarondemerde said:


> . And it is already on ports.


 [/URL]
Thanks, lebarondemerde. Looking into it now.


----------



## al mello (Aug 2, 2017)

lebarondemerde said:


> Just to point out most people are switching to Nextcloud. And it is already on ports.



lebarondemerde (Interesting name  )

I'm using OC for years without a problem. What's your experience with Nextcloud?


----------



## forquare (Aug 2, 2017)

al mello said:


> I'm using OC for years without a problem. What's your experience with Nextcloud?



I've been using www/nextcloud for about a year now inside a jail (not sharing any directories as per the OP) without a problem.  I transitioned from OC on Linux and noticed a slight speed boost, but who knows if that was FreeBSD or Nextcloud...


----------



## rigoletto@ (Aug 2, 2017)

I was not using www/owncloud since years and so I cannot comment on it. When I decided to install it again, it was just at the announcement the fork. 

The fork (IIRC) supposedly was due to the lack of interest of the people leading the project to deal with the needs/desires of the community (owncloud.org), but just with the enterprise clients (owncloud.com) - _also there was some kind of business deal to happens with ownCloud_ _what I do not remember what it was_. Apparently, they were not caring to create/fix anything unless it was a request from an enterprise client.

That said,  many ownCloud devs leaved the project and joined the www/nextcloud, and so I suppose it is being developed faster and more "healthy". At least it seems to be.

In regards to my experience, I have not experienced a single issue with it in about a year from the installation. However, I am a home user, the situation may be different for/from whom are running it in a business.

The sync client still the same of ownCloud but there is a Nextcloud themed one what is not in ports yet.

Cheers!


----------



## rigoletto@ (Aug 2, 2017)

Wozzeck.Live

ownCloud/Nextcloud are webdav based, you can mount them locally in FreeBSD using sysutils/fusefs-wdfs for instance.

EDIT: www/neon should also work.

For Linux there is mout.davfs yet.


----------



## al mello (Aug 3, 2017)

forquare said:


> I transitioned from OC on Linux and noticed a slight speed boost, but who knows if that was FreeBSD or Nextcloud...



Running OC on a VM and created a jail yesterday for NC to test. 



lebarondemerde said:


> The fork (IIRC) supposedly was due to the lack of interest of the people leading the project to deal with the needs/desires of the community (owncloud.org),



That's one of the main factor that I'll consider. Looking at change logs both are still active. Only the future will tell...


----------



## stratacast1 (Aug 9, 2017)

I've been using Nextcloud since it released. Skip OC, you get A LOT of awesome stuff with NC and a very active and friendly community. I'm running NC in a jail right now after following this guide.

Couple things though: I had to compile iocage from ports, and look at the iocage documentation as some of the commands have changed since the posting of that article. Plus, I didn't mount a zfs filesystem outside of the jail and make metadata changes for the database, but that's just me. I'm a total FreeBSD noob (been learning it for a couple weeks, officially running it for 2 weeks on my server) and it was a good experience setting up NC in a jail. I also skipped the Redis server and compiled APCu for PHP 7.1 thanks to some help from SirDice here. Plus I'm using DuckDNS and Let's Encrypt's way of getting SSL certs on certbot.eff.org. Hope this helps some


----------

