DrKK's Definitive Guide to Installing OwnCloud in FreeNAS (or FreeBSD)

Status
Not open for further replies.

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
YOUTUBE VIDEO FOR THIS TUTORIAL.

IMPORTANT UPDATE JULY 2015: The maintainers of the owncloud package for FreeBSD have decided---probably wisely---that the default version of owncloud provided from "pkg install owncloud" will *not* have the sqlite database, but will instead, expect a MySQL database. This tutorial, and my video, are based on the old assumption that the package comes with sqlite3 support. The solution is relatively simple. If you have the know-how, and have no conflicting database on your jail (e.g., MariaDB), then simply proceed, and Google as needed to get everything set up with MySQL; but if you've never done this before, it'll be difficult. If you wish to use the far easier method of sqlite, which is what my video/post show, then instead of typing "pkg install owncloud", you will do the following steps:

  • Type "portsnap fetch extract". This will take a while.
  • Type "cd /usr/ports/www/owncloud"
  • Type "make config"
  • You will now have an options screen. *DISABLE* MYSQL, and ENABLE SQLITE.
  • click ok, and sit back and wait for it to build. If you are asked to set other options, simply accept what's already been selected for you.
  • commence the building process with "make install clean"

UPDATE: I've updated this guide, and turned it into a pretty long video on YouTube which you can access at this link. IT IS IMPORTANT TO WATCH THE VIDEO, since that video contains better, somewhat different, choices and instructions. Also, for those who have asked, this procedure should be just fine for any version of FreeNAS.


What is OwnCloud? In a nutshell: It is like DropBox, but self-hosted. If your main use case for DropBox is just to have your own, personal, storage in the cloud, then you might find OwnCloud to be a useful alternative. Or, maybe it's just epeen to have one. Either way, it's pretty sweet, and installing it is quite educational. You can always delete it later if you don't have a use case. This guide will take you 30-45 minutes to complete.


EDIT: Please see the comments below this post, especially this one. There are more ways to install OwnCloud, to say nothing of its web serving/database stack, than I can possibly count. And I use the word "definitive", in the title, as sort of a joke on this fact.

There are a bunch of decent guides out there for installing OwnCloud. Unfortunately, I didn't like any of them, because they all seem to suffer from one or more of the following:
  • Just robotic, mystical, instructions, with no learning value. (If you want things to "just work", then buy a Macintoaster.)
  • Actual errors, or very sub-optimal choices for FreeNAS install scenarios.
  • A desire to proselytize for people's favorite stack permutations (we don't need forks of MySQL for a stupid OwnCloud guys, come on!).
But "whoa whoa whoa DrKK" you're saying. OwnCloud has a pbi plugin on FreeNAS. Why not just use that? Well, OK. It..."works". But it's not an ideal configuration, it's not an efficient configuration in some peoples' view (I don't know, I haven't tried it), it's not easy to upgrade, and it's certainly not very educational, and some people have had problems. It's really a crutch for people without enough skill and drive to do these things themselves, and accordingly, it's bad for the epeen.

I am offering below a process that I've wasted my whole weekend on honing for everyone to use, that should--thanks to about 20 iterations of me reworking it--take about 30 minutes to get your OwnCloud up and running on your FreeNAS (or, FreeBSD proper, subject to modification of the instructions). I'm going for the following:
  • Reasonably minimal memory and disk requirements.
  • We use a standard jail and the FreeNAS warden -- we will not be touching the FreeNAS appliance.
  • We'll use pre-built packages -- compiling from ports was...interesting. It is possible to do, but there are several gotcha's with some pretty esoteric things, like the event handlers, and I just figure you can't be bothered.
  • Light use case.
  • SSL-enabled, in case you want to open it up to the WAN.
  • You can use the WebGUI for OwnCloud, or the various DAV or dev clients, on files of any size, up to a few GB.
  • Just enough comments sprinkled through as to what's going on so that the process of installing it is at least mildly educational (that's why we're using FreeBSD, right?).
Assumptions:
  • You are familiar with Linux/UNIX-style basic commands and file system. i.e., I can say "go up to the parent directory and check the permissions on file x" and you know what I am saying.
  • I will use the IP address http://192.168.1.200/ to designate our OwnCloud jail. Yours will vary, of course, and you are to use the correct one, obviously, for your installation.
  • You will be creating a jail whose only purpose is to serve OwnCloud. Accordingly, the way I have you do this makes OwnCloud the "root" of your web server, so you will enter http://192.168.1.200/, and not http://192.168.1.200/owncloud/ (and, you will likewise suppress the 'owncloud' in any third-party WebDAV client that you use).
  • FreeNAS 9.2.0 or newer (if you are older than this, there will some things--like accessing the jail command line from the GUI--that you can't do, so you'll have to work around that).
Let's get started, shall we? Those using FreeBSD itself (and not FreeNAS) need not necessarily create any jail. Skip ahead as needed.

1. Create a Standard Jail
Go into the Jails dialogue to create a new jail. (If you have never created a jail before, you'll need to set your jail root and so on. See the FreeNAS docs.) Make sure you create a standard jail type, and uncheck the buttons for "vanilla", "vimage", and "NAT". You don't need any of that. Note the IPv4 address your jail is assigned. At the risk of ambiguity in this guide, I named my jail "owncloud".

2. Setup SSH.
Out of the box, the ssh and sshd config in new jails isn't convenient. We need ssh working well because we have some files to edit and what not. Even though this isn't strictly the "right way" to proceed, I just save myself a lot of trouble by ssh'ing into my main FreeNAS command line, and copying over the entire ssh config from that (which is set up the way I, and presumably you, like it) directly into the jail directory (from the FreeNAS appliance, you can get to any jail directories you want--just not vice versa). My jails root is in /mnt/ssd/jails/, and so my call looks like this:
Code:
[root@freenas] ~# cp /etc/ssh/* /mnt/ssd/jails/owncloud/etc/ssh/

In the above, the "owncloud" in the directory is the name of the jail from step 1.

Now, (assuming you're on at least FreeNAS 9.2.0, you can do this right in the GUI), access the command line of your owncloud jail, and perform the following steps:
  • type passwd to set up your root password in the jail.
  • type service sshd onerestart to actually enable the ssh service.
You're probably going to get a bunch of warnings about services_ssh. It's fine. This part is only for our convenience during install--we'll turn off ssh later.

3. Update pkg, and Get a Text Editor.
Now, log into your jail's IP with your ssh client (putty, whatever), and:
Code:
pkg update
pkg install nano

These two commands should not take very long at all. nano is your basic text editor. If you are newer than 9.2, then pkg update will probably ask you if you want to install it. Do so. It may ask you to type pkg2ng. Just go ahead and do that...if you don't need it, it won't hurt anything.

4. Update pkg.conf and Prepare to Get Software

This is not strictly necessary, the part I mark below as OPTIONAL. Some people with 9.2.1.3 had problems when they did the optional part. So don't do it unless you turn out to need it:

(((BEGIN OPTIONAL)))

Edit your pkg.conf file by typing:
Code:
nano /usr/local/etc/pkg.conf
and changing it to these three lines, which will be very similar to what's already in there (you'll be stripping off the reference to FreeNAS, for example):
Code:
PACKAGESITE: http://pkg.cdn.pcbsd.org/9.1-RELEASE/amd64
PUBKEY: /usr/local/etc/pkg-pubkey.cert
PKG_CACHEDIR: /usr/local/tmp

You may have some other lines (MIRROR for example). Just delete those. You only need these three lines.

Having done this, let's bring ourselves up-to-date with this repository by again typing
Code:
pkg update

(((END OPTIONAL)))
and then typing
Code:
pkg upgrade

This should update the pkg software itself. Type the exact same thing, a second time!
Code:
pkg upgrade

This may now update several built-in packages. In my case, 14 software packages were brought current--for some people on 9.2.1.3, nothing happened. If you type it again a third time, you should see no new updates. Good!

5. Time to Get OwnCloud!
We're now going to get the OwnCloud code, and the dependencies it requires in the pkg's repository. This will download about 50 things, and my research indicates that many of these are not strictly necessary---but who cares.
Code:
pkg install owncloud

It might take a minute or two to fetch and install everything.

EDIT: Please see the additional posts below this one. As of this writing, we've discovered that we're getting OwnCloud scripts that are about 6 months old. It is better to get the latest versions. There are instructions below referring you to Joshua's OwnCloud guide (elsewhere in this forum), and other pointers that you'll want. YOU MAY NOT WANT TO OBEY THIS STEP AS WRITTEN!

6. Get Lightweight Web Server
This is where we sort of get into personal taste. OwnCloud, at its most fundamental level, is nothing but instructions for a web server to serve content (in this regard, it is similar to the GUI in FreeNAS). Accordingly, it needs a web server to be installed to communicate with. OwnCloud "comes with" apache in the repository for this purpose (and that's what you get with the FreeNAS pbi if you use it). But, one can argue, this is a lot like using an M242 to shoot squirrels, or using a school bus to drive to work. It's a bit heavy. Your FreeNAS Web GUI uses something lighter, called nginx for this purpose--famously, it is said (paraphrasing) that "while apache does 1000 different things, nginx only does, say, 5--and it does 4 of those fifty times faster than apache". I'm going to suggest we go even lighter still, and use what's called lighttpd, i.e., "lighty". lighttpd is pretty bad ass, even though it is quite simple, and, for example, serves wikimedia and YouTube pages (or at least did---not sure if it still does).
Code:
pkg install lighttpd

and might as well do this to clean up:
Code:
pkg autoremove
.

Congratulations--at this point, you have all the software in your jail that you'll need. Now, we're down to configuration. Which, alas, is a bit of a pain in the ass. By the way, your jail is probably about 600MB in size now, and we're done downloading software. That isn't bad.

OK, let's do it. This is where I assume you understand basic navigation in a Linux/UNIX environment.

7. Basic lighttpd Configuration
Begin editing the webserver configuration file:
Code:
nano /usr/local/etc/lighttpd/lighttpd.conf

and make, and save, the following changes:
  • Change the server root, by locating the server.document-root line, and setting it to
    Code:
    server.document-root = "/usr/local/www/owncloud/"
  • (IMPORTANT) The compiled pkg of lighttpd was compiled without IPv6 support (odd--especially since IPv6 support is the lighttpd config default), (EDIT: now that I've thought about it some more, I don't know if maybe it's the fact that I didn't configure IPv6 in the jail or the FreeNAS? Either way, this hasn't been a problem in the past when I've installed other webservers, so I don't actually know what the issue is with IPv6 for my install---just take it out to be safe) so you will/may have to take it out. Locate the line that says server.use-ipv6 = "enable" and "comment it out", by placing a "#" in front, like so:
    Code:
    #server.use-ipv6 = "enable"
  • Also, comment out the line (probably the last line in the file) that sets up an IPv4 listening socket on port 80, again, by placing the hash "#" mark:
    Code:
    # IPv4 listening socket
    # $SERVER["socket"] == "0.0.0.0:80" { }
    This one took me quite a while to track down--it turns out for reasons that I don't particularly understand, lighttpd will open this socket ANYWAY, so if you specifically ask for it to be opened, you will get a "0.0.0.0:80 could not open socket, socket already opened" (or something like that) error.
  • Also, you may (optional) want to lower the settings for server.max-fds and/or server.max-connections. I use 256 and 128, respectively. You could go lower. But the defaults are much, much, much, much too high for this use case.
  • (Pro Tip) Don't worry about it if you mess up the configuration file beyond all repair. You will find the unmolested version of the file as lighttpd.conf.sample in the directory, and you can just delete the messed up file, and copy this file over and start anew. Similarly for most other config files we'll be messing with.
8. (Optional) Give It a Test

Code:
service lighttpd onerestart
should start the webserver without any errors if you did step 7 correctly. Now, go to your web browser, and go to the IP of your jail. If everything is working, you will get a 403-forbidden message. Don't panic, that's a sign everything is actually WORKING. There's more to configure. (The problem is that OwnCloud just served up a .php file, and you haven't configured anything to handle PHP--so the fact that you see the error means, ironically, that everything is "working" as much as it can at this point. Excellent!)

9. Set up FastCGI/PHP in lighttpd

We must activate the FastCGI module.
Code:
nano /usr/local/etc/lighttpd/modules.conf
find this line:
#include "conf.d/fastcgi.conf"
and "uncomment" it by removing the "#" at the beginning. Then, edit the fastcgi.conf file itself:
Code:
nano /usr/local/etc/lighttpd/conf.d/fastcgi.conf
and add your own fastcgi.server block (leave all the commented-out examples in there...):
Code:
fastcgi.server = ( ".php" => ((
                    "bin-path" => "/usr/local/bin/php-cgi",
                    "socket" => "/tmp/php.socket",
                    "max-procs" => 1,
                    "bin-environment" => (
                      "PHP_FCGI_CHILDREN" => "3",
                      "PHP_FCGI_MAX_REQUESTS" => "1000"
                    ),
                    "bin-copy-environment" => (
                      "PATH", "SHELL", "USER"
                    ),
                    "broken-scriptfilename" => "enable"
                )))

This sets up a bunch of PHP listeners for the web server, but far, far fewer than would be used in a publicly-available web page that would be accessed by tons of people. This keeps the resources required fairly modest.

10. Set up PHP itself

PHP is tremendously complex and annoying to set up. Don't even try to Google it. Two "sample configurations", both of which are insanely more complex than we need, are in the /usr/local/etc/ directory, namely php.ini-development and php.ini-production. Your PHP configuration depends upon what's in the file php.ini. Which doesn't exist. Yet. So, make a new file by editing it in nano:
Code:
nano /usr/local/etc/php.ini

and simply have it contain the following five lines:
Code:
post_max_size = 2000M
upload_max_filesize = 1999M
upload_tmp_dir = /tmp
cgi.fix_pathinfo = 1
memory_limit = 32M


You might be wondering, "what the hell's with the 1999MB limit on the file size" etc? Great question. And one that I lost some sleep over. Turns out there's a "bug" or something in PHP, where you're not going to be able to use anything over 2GB. After discovering this, and tracking it down, it seems like this git commit will fix this in future versions, but as of right now (March 2014), the PHP that pkg installed for me still had the bug. If you try to use a bigger file size, you'll receive an error, every time you upload ANY file, about the "file size" being "too big for the HTML max filesize specified in the HTML command" or something ridiculous like that. Of course, this is only for the WebGUI/PHP. If you upload to your "cloud" using the OwnCloud client you won't have any such limitations.

11. Test Your OwnCloud!

Let's give it a try!
Code:
service lighttpd onerestart

If it's working, it should have started quickly and without any warnings, and when you type "top" at the command line, you should see a single lighttpd and a few php-cgi processes owned by the www user:
Code:
last pid: 49189;  load averages:  0.33,  0.32,  0.29
13 processes:  1 running, 12 sleeping
CPU:  0.0% user,  0.2% nice,  0.4% system,  0.0% interrupt, 99.4% idle
Mem: 16M Active, 811M Inact, 14G Wired, 4564K Cache, 465M Buf, 589M Free
ARC: 10G Total, 4683M MFU, 4383M MRU, 290K Anon, 207M Header, 1170M Other
Swap: 8192M Total, 8192M Free

  PID USERNAME    THR PRI NICE  SIZE    RES STATE  C  TIME  WCPU COMMAND
45369 www          1  23    0  132M 19080K accept  0  0:03  2.20% php-cgi
45145 root          1  20    0 69588K  5224K select  0  0:02  0.00% sshd
45367 www          1  20    0 33168K  4532K kqread  1  0:01  0.00% lighttpd
44319 root          1  52  10 18636K  2180K wait    1  0:01  0.00% sh
45148 root          1  20    0 17568K  2964K pause  1  0:00  0.00% csh
44467 root          1  20    0 14180K  1596K nanslp  1  0:00  0.00% cron
44293 root          1  20    0 12080K  1576K select  0  0:00  0.00% syslogd
45368 www          1  52    0  128M 11052K wait    0  0:00  0.00% php-cgi
49189 root          1  20    0 16600K  2408K CPU1    1  0:00  0.00% top
49187 root          1  52  10  3816K  1488K nanslp  1  0:00  0.00% sleep
46557 root          1  52    0 46888K  4524K select  0  0:00  0.00% sshd
45370 www          1  52    0  128M 11000K accept  1  0:00  0.00% php-cgi
45371 www          1  52    0  128M 11000K accept  1  0:00  0.00% php-cgi


Awesome, now when you go to your IP address in your web browser, you ought to be greeted by the OwnCloud first-time start up page! Everything is ready to go! One you get it set up, try to drag in a medium sized file (say, 25MB? something like that), and make sure it uploads correctly.

If you want https (SSL) installed, keep reading. If not, skip to Step 14! Congratulations.

12. Create SSL certificate

This is for encryption, and not necessarily authentication. i.e., if you're at Starbucks, and want to get back to your OwnCloud and not have your password typed in the clear or have your OwnCloud data snoopable on the wire, this is what you want.

Make a certificate directory. I chose /usr/local/etc/lighttpd/certs but you can choose whatever you like. Just remember what it is. Navigate to the directory and create your certificate:
Code:
openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 1000 -nodes

Enter the information requested (you can lie if you want, doesn't matter), and then
Code:
chmod 400 lighttpd.pem
.

13. Instantiate an HTTPS Socket in lighttpd

At the bottom of /usr/local/etc/lighttpd/lighttpd.conf, add the following block:
Code:
# https socket
$SERVER["socket"] == ":443" {
  ssl.engine = "enable"
  ssl.pemfile = "/usr/local/etc/lighttpd/certs/lighttpd.pem"
}
where the directory and filename listed is the one you used from step #12.

14. Final Check

Restart everything with
Code:
service lighttpd onerestart


Check the following to your satisfaction:
  • http connection.
  • https connection (if installed).
  • test the upload of a small file in the web browser.
  • test the upload of a larger file in the web browser.
  • verify that any OwnCloud clients you will be using (in practice, people upload and download with the sync'ing owncloud client that they download, similar to how DropBox is done) are working correctly with respect to uploading, downloading, and what not.
  • Everything should be fairly snappy with this configuration.
15. Making it Permanent
  • Make your web server (and hence, OwnCloud) start automatically with the jail by adding it to the sysrc:
    Code:
    sysrc lighttpd_enable=yes
  • Disable ssh until such time as you need it again--this was not a very good/secure set up for ssh. Exit your ssh client, go back to the FreeNAS GUI, bring up your jail's command line, and disable ssh services:
    Code:
    sysrc sshd_enable=no
    and
    Code:
    service sshd onestop
That's it! Try stopping and restarting the jail, and making sure everything is cool! I hope that was useful. I donated an entire weekend to making this process and post :)
 
Last edited:

aufalien

Patron
Joined
Jul 25, 2013
Messages
374
Fantastic write up DrKK, uber cool indeed.

I've been thinking to roll out some kind of cloud service of this type for my user base as they'd appreciate and use it.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Fantastic write up DrKK, uber cool indeed.

I've been thinking to roll out some kind of cloud service of this type for my user base as they'd appreciate and use it.
Just a word to the wise---I've been poring over all the OwnCloud documentation today. There's a *LOT* going on. There is a built-in versioning system, there are cron jobs that have to be scheduled or registered externally---there's really quite a lot going on. It really looks like you have to dig into the learning curve and see what's going on with this stuff to really run a proper OwnCloud.

Anyway, please do let me know how the Guide works for you to get up and running initially.

:)
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Also, another thing. lighttpd does not support the use of .htaccess files. What this basically means is that people might be able to access your files directly in a web browser if they knew what they were doing. You thwart them, however, if you create your data directory *NOT* under the web-document root directory (the default is to, in fact, put it in the web document root!! warning!).

So anyway, definitely, if it's going to be for actual users with privacy/security concerns, you'll want to read up on some of the details.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
ADDITIONAL INFORMATION, FOR FULL DISCLOSURE:

  1. Please note that some of the things I say contradict, at least in part, what are found in this other guide on the same subject that Joshua wrote up. That's a good guide, except it doesn't tell you what the hell you're doing, only what to do. You should observe the differences (for example, a few settings in the php.ini may or may not have relevant security impact), and do your own research, and evaluate what the situation is as it affects you. Part of the learning experience ;)
  2. My guide, as written, as of this date, appears to install an OwnCloud 5.x version from last September, whereas Joshua is using the direct download and is getting a 6.x. Seems that the pkg installer is a bit in arrears. If you are going to use my guide, you may want to consider going with the 6.x version Joshua talks about, and instead of typing pkg install owncloud, you'll follow the step in his guide to "fetch" the latest directly from the OwnCloud people. OwnCloud, being a bunch of PHP scripts, doesn't depend on any particular operating system, really, so you don't have to sweat anything. When I realized the version discrepancy, I went ahead and installed the 6.x version. There are a number of tutorials online on how to upgrade an existing installation. HOWEVER, I RECOMMEND THAT YOU BEGIN WITH THE 6.X VERSION., and instead of typing pkg install owncloud from my guide, that you obey Joshua's guide with respect to obtaining the most up-to-date OwnCloud scripts.
  3. OwnCloud 5.X (I don't know about 6.X) filled up the access log with spamtastic DAV/PHP log entries. There appeared to be no way to turn these off, regardless of the alleged "log level", or whether or not they were logged to the syslog, I still got spamtastic every few seconds log entries. I would up disabling the mod_accesslog module, straight up. This may, or may not, be a problem in 6.x.
  4. Using SQLite made it a hell of a lot easier to upgrade my install to 6.X. For that reason, I'm glad I used the built-in SQLite database, instead of other beefier ones.
  5. Overall, 6.X seems better and more polished than 5.X. I'd do it, from the beginning.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
So slick! Thank you so much. I wish all tutorials followed this format and didn't make assumptions; it just helps to develop learning and avoids excessive questions.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
Why not just update your instructions to get the latest version rather than v5 (even though it did receive an update v5.0.15 on March 3rd, 2014) . It seems as though the consensus is that v6 is superior. Just curious about your reasoning, not slamming.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Why not just update your instructions to get the latest version rather than v5 (even though it did receive an update v5.0.15 on March 3rd, 2014) . It seems as though the consensus is that v6 is superior. Just curious about your reasoning, not slamming.
Meh.

The part of the instructions where one is instructed to get the owncloud scripts includes--right there--a very noticeable bright color warning about getting perhaps newer OwnCloud scripts. Then I point to Joshua's post/guide, which is also very instructive. So, it was kind of an excuse to get people to read also Joshua's guide, the differences in which are, themselves, very elucidating if you're a FreeBSD student.

I guess, in short, I let the instructions stand (but added a warning), to maximize the learning opportunity. The 5.x version of OwnCloud isn't problematic, so there's no harmful side effect.

That was my logic. I'm open to be convinced otherwise though, sir.

Also, it's only a matter of time anyway before the instructions as written provide the most current OwnCloud.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
Ah! Thank you. Sorry, I read through the instructions on Tapatalk and the colors don't display so it easily slipped past me. Much appreciated.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
ALSO:

If you are putting your OwnCloud **ON THE INTERNET** (i.e., not just on your LAN), and you're opening up ports and so on, when you're using lighttpd, you do not have the benefit of .htaccess files. What that means is that if someone knew precisely your directory structure, and where your files are, and what their names are, they CAN get them, without logging into OwnCloud.

Add this line to your modules.conf, which takes advantage of the mod_access module (which is already activated, so that's good), and that will secure your lighttpd from this particular loophole:

Code:
$HTTP["url"] =~ "^/data" {
  url.access-deny = ("")
}
 
$HTTP["url"] =~ "^/($|/)" {
       dir-listing.activate = "disable"
}
 
 


You probably got a "security warning" about this when you first started up your OwnCloud. This little snip of code addresses that issue, and that security warning apparently no longer occurs with this change. While I figured out that first part, credit for the second part goes to our new FreeNAS community member known as "xtuh" in the irc channel.

If you *ARE* exposing your OwnCloud to the whole universe, you will want to aggressive deal with security issues. Consider, also Fail2Ban to complement your security posture.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Very nice writeup. I sincerely like a well thought out guide.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Very nice writeup. I sincerely like a well thought out guide.
I just wish there were fewer "gotchas" out there, and fewer differences that crop up depending on what version of everything you are using. For example, today in the IRC, we discovered that these instructions have some funky parts in 9.2.1.3 (I'm on 9.2.0, so I didn't know). But it's a learning experience. Hopefully people are armed with enough insight as to what we're doing to deal with minor issues that crop up.

By the way, as anyone runs into snafus and so forth with this (or any other "guide" in the forums), please update the post with your discoveries, for both completeness, and to continue to learning journey :)
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
March 31, 2014 UPDATE:
Code:
pkg install owncloud

In Step #5 this now installs Owncloud 6.0.2_1 on FreeNAS 9.2.1.3. Screenshot
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
After successful installation I'm getting:

Your data directory and your files are probably accessible from the internet. The .htaccess file is not working.

and

Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.
(I've seen others with this problem on the forums)

Thoughts?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
The WebDAV warning is explained here, and the common cause is somewhere there too. It has to do with the SSL cert. Read up on the long definition wherever it is and see if it applies.

As for the .htaccess files I have no problems so I can't help. I'm using nginx because that's what is more recommended for Owncloud from what I've read.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Let me explain a little what's going on. I can't speak to the WebDAV thing, mine works great. I'm on FreeNAS 9.2.0.

As for the .htaccess thing: The "standard" web server out there is apache. In apache, you can use .htaccess files to do all kinds of denial/allow operations, in particular, denying the listing of directories, or the direct access of certain files. In lighttpd, there is no .htaccess file support, so you accomplish these things with mod_access and other built-ins.

That's all. The two $HTTP blocks I have a few comments above should take care of most of what the .htaccess was taking care of before.
 

marian78

Patron
Joined
Jun 30, 2011
Messages
210
Excelent work, i use your guide... :)
 

xtuh

Cadet
Joined
Mar 30, 2014
Messages
5
im switching to another solution. on another server (inside esxi) i will create OC VM mysql and apache (i think), then i will give access to dataset with NFS.
 
Status
Not open for further replies.
Top