Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

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

Status
Not open for further replies.

pendergrass

Neophyte
Joined
Apr 18, 2014
Messages
7
Thanks for the Guide and the video DrKK!
I have a working installation of owncloud 8.1.3 on FreeNAS-9.3-STABLE-201509160044.

I am now struggeling with the max upload size. Whatever I change in the php.ini, it is not applied for Owncloud and remains showing the "513 MB".

Code:
upload_max_filesize = 16G
post_max_size = 16G
upload_tmp_dir = /tmp
cgi.fix_pathinfo = 1
memory_limit = 512M
output_buffering = 0
always_populate_raw_post_data = -1


This config is also showing up in my php.info which I use to have in the owncloud directory for testing purpose.
I also tried to use fast cgi instead of cgi as mentioned in the video with no difference.

Could someone point me to the right direction?
 
Joined
Jan 15, 2014
Messages
99
The same changes to post_max_size and upload_max_filesize need to be made in .user.ini and .htaccess in the owncloud directory. Once those are done, it should take care of it.
 

pendergrass

Neophyte
Joined
Apr 18, 2014
Messages
7
I had these both configured, sorry for not mentioning.
Maybe I have created the user.ini in a wrong place?


usr/local/www/owncloud/.htaccess:

Code:
<IfModule mod_php5.c>
php_value upload_max_filesize 16G
php_value post_max_size 16G
php_value memory_limit 512M
php_value mbstring.func_overload 0
php_value always_populate_raw_post_data -1
php_value default_charset 'UTF-8'
php_value output_buffering off
<IfModule mod_env.c>
  SetEnv htaccessWorking true
</IfModule>
</IfModule>


usr/local/www/owncloud/user.ini:
Code:
post_max_size = 16G
upload_max_filesize = 16G
memory_limit = 512M
 
Joined
Jan 15, 2014
Messages
99
You will quickly exhaust my knowledge on the subject, but 2 things. I have mine configured with a 4G limit. Per Dr. KK's original instructions, the upload_max_filesize should be one less unit than the post_max_size, although I do not believe that that is causing your issue. What I do notice is that mine are set as 3999M and 4000M respectively. I do not know if the 16G is a known reference, versus 16000M. I also remember somewhere in the past research that there is a limit imposed by PHP regardless of the specifications in these config files.

I would suggest you re-configure for a limit that is known to work... 3999M and 4000M, and see if you have success. You can always increase from there.
 

pendergrass

Neophyte
Joined
Apr 18, 2014
Messages
7
Unfortunately this did not help. The phpinfo is also getting the right values from the php ini in the master value column.
Could it be "overridden" by something?
 

pendergrass

Neophyte
Joined
Apr 18, 2014
Messages
7
Another question:
Following this guide I am not able to add ftp or smb sources. I tried to install the samba-libsmbclient. Is this the right one?
Also I tried to install the php ftp module in my jail but I was prompted with messages that Owncloud would be removed; probably because the php ftp module requires an older version of php.

Is this the way to go at all or should I mount smb/ftp/nfs shares to my freenas and pass it through to the jail?
 

Elo

Member
Joined
Mar 11, 2012
Messages
119
Hi DrKK. Thank you for you significant effort in making a turtorial for the instalation and configuration og owncloud. I have followed it and got the system to work at least on the surface. I have installed the latest available SW as of today which means owncloud 8.2.

I have the following questions :

  1. In the owncloud admin manual section 12.3.2 Webserver and PHP modules its is expressed and underlined : Note: Lighttpd is not supported with ownCloud, and some ownCloud features may not work at all on Lighttpd. Is this something specific for 8.2 and what is the comnsequence to you recomended instalation. I have experienced several behaviours that I can not get to work. As example: I can not change the upload limit away from the default one. Nor by using your recomendation or through the web admin
  2. I am not able to permanently redirect HTTP to HTTPS. There use to be a button in the ownloads adminstrative settings but that has gone?
 
Last edited:

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Hi DrKK. Thank you for you significant effort in making a turtorial for the instalation and configuration og owncloud. I have followed it and got the system to work at least on the surface. I have installed the latest available SW as of today which means owncload 8.2.

I have the following questions :

  1. In the owncloud admin manual section 12.3.2 Webserver and PHP modules its is expressed and underlined : Note: Lighttpd is not supported with ownCloud, and some ownCloud features may not work at all on Lighttpd. Is this something specific for 8.2 and what is the comnsequence to you recomended instalation. I have experienced several behaviours that I can not get to work. As example: I can not change the upload limit away from the default one. Nor by using your recomendation or through the web admin
  2. I am not able to permanently redirect HTTP to HTTPS. There use to be a button in the ownloads adminstrative settings but that has gone?
Thank you for your kind words.

Unfortunately, I have in the past 6 months of so had continued dissatisfaction with OwnCloud, and the way it is maintained in the ports repository. I began having problems, the users began having problems (e.g., this upload limit thing), and now you say (this is new knowledge to me) that the user manual specifically disclaims use with lighttpd. When one says: "the web-based thing does not work with lighttpd", that's a lot like saying: "this web page only works with Internet Explorer". i.e., it immediately makes you lose confidence in the thing.

Accordingly, I stopped using OwnCloud a few months ago. I cannot speak to how it is has changed since then. We still offer an OwnCloud "plugin" for FreeNAS, but I have never used that, and don't know which web server it uses.

I am sure it's fairly simple to get it working with apache/httpd (the PHP stuff pretty much works out of the box with that), but you'd be on your own for that.
 

Elo

Member
Joined
Mar 11, 2012
Messages
119
Thank you for your kind words.

Unfortunately, I have in the past 6 months of so had continued dissatisfaction with OwnCloud, and the way it is maintained in the ports repository. I began having problems, the users began having problems (e.g., this upload limit thing), and now you say (this is new knowledge to me) that the user manual specifically disclaims use with lighttpd. When one says: "the web-based thing does not work with lighttpd", that's a lot like saying: "this web page only works with Internet Explorer". i.e., it immediately makes you lose confidence in the thing.

Accordingly, I stopped using OwnCloud a few months ago. I cannot speak to how it is has changed since then. We still offer an OwnCloud "plugin" for FreeNAS, but I have never used that, and don't know which web server it uses.

I am sure it's fairly simple to get it working with apache/httpd (the PHP stuff pretty much works out of the box with that), but you'd be on your own for that.
Thanks for Your prompt answer. I a sorry to hear that you are giving up on it as it has served me well for a long time. I have a instalation working based on NGINX and SQL. I had problems in upgrading it and wanted to do a New instalation With a smaller footprint which was more easy to maintain. I will play around wit it in a separate Jail and try to make fresh instal but based on SQLite .
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I will play around wit it in a separate Jail and try to make fresh instal but based on SQLite .
You should install from ports. Do a "portsnap fetch extract", followed by a "portsnap fetch update" in a new jail. Then:
Code:
cd /usr/ports/www/owncloud
and
Code:
make install clean
.

You will be given several config screens. Uncheck "MySQL" and check "SQLite3".

Also, you will have to install one of the web servers that their software will work with. Probably at this point you might as well just go with Apache. You will have to Google for those instructions.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
DrKK,

What have you replaced Owncloud with in your personal applications? Just curious.
Google Drive and/or Dropbox. I didn't have much I needed to sync up with Owncloud, I was more interested in OwnCloud on behalf of the userbase rather than myself. Of course, the problem here, in general, is that now I am sync'ing to servers I don't control, and I am not being a good internet citizen because I am doing a WAN transfer (i.e., using the internet itself) to effectuate a network application that I only intend to use locally. There's a special place in hell for that, in my view. But, I sync files so infrequently that it doesn't matter really.

When I started having trouble with OwnCloud and it started becoming more trouble than it was worth, I asked myself, is OwnCloud actually a solution to a problem I'm having? (This is why you can never have the user experience go downhill for any reason---you don't want your customer asking himself if you're actually a solution to a problem he's having and finding out the answer is "no"). And I discovered the answer was "no".

If someone wanted to replicate the action of OwnCloud as closely as possible, I suppose "SyncThing" is the way to go. Or, they can stick with OwnCloud, but it's hard to say what the future will bring, especially on the FreeBSD environment, and I suspect there will be much Googling in your future.
 
Joined
Jan 15, 2014
Messages
99
DrKK,

You have been an invaluable resource for all of us trying to utilize OwnCloud, and your contributions are sincerely appreciated. I agree completely with you that OwnCloud should be really focused on the user experience, and I am seeing no support from OwnCloud, and in fact with every version it becomes even more complicated to get the entire system to operate without errors.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
DrKK,

You have been an invaluable resource for all of us trying to utilize OwnCloud, and your contributions are sincerely appreciated. I agree completely with you that OwnCloud should be really focused on the user experience, and I am seeing no support from OwnCloud, and in fact with every version it becomes even more complicated to get the entire system to operate without errors.
In fairness, there are many variables here. There is OwnCloud itself, there is PHP, and there are decisions that the FreeBSD package and ports maintainers make with the delivery and packaging of OwnCloud, and PHP, etc, to say nothing of variables potentially introduced by the webserver devs or package/ports maintainers. And of course, often times, the most sensible thing to do (e.g., have something come out of the box in the way that makes most sense for the user that may be using this in a small business or other serious environment), like having MySQL instead of SQLite3, doesn't agree with a typical user/usage profile in one of the customer subcommunities (e.g., in this case, FreeNAS).

So we cannot rule out (without more research than I am willing to put in) that our difficulties have nothing to do with OwnCloud itself, but are rather:
  • the result of wise decisions that improve the product in more important environments
  • quirkiness of FreeBSD and/or the webserver I chose to implement in this popular guide
  • changes in the dependencies to OwnCloud (PHP, for example)
I guess I'm just saying is that OwnCloud has a very good track record (aside from the fact that the Windows client is programmed in C++!!!!), and I don't want to imply, or allow any of us to imply, that any difficulties we are having necessarily are their fault, and not either ours, or someone else's. For whatever reason (and truly, I haven't done enough research to assess the reason), my personal use of OwnCloud on my FreeNAS has exceeded what I believe to be an acceptable hassle-per-usefulness threshhold. Other people will have different threshholds, different usages, and different hassle levels.

If OwnCloud still works well for anyone reading this, more power to you. I do not want to encourage you to stop using it just because I have.
 
Last edited:

Mladen Pokric

Newbie
Joined
Dec 10, 2015
Messages
2
Hi everybody,

I used this tutorial and set up everything fine for owncloud.

I used mariadb for mysql.

Last week, we have power loss, and when we restarted, freenass worked properly, but have internal error with owncloud :

When i want' to connect to the database i'm getting this error :
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

That happen on first day when i set up owncloud. I made a new database and everything worked again... but... make again users, mails....

Today, i have problem with freenas, but owncloud worked well. I made a backup of database.

After restarting freenas, same problem with owncloud :

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

File "myssql.sock" of course exists.

Is that a problem with some permission, how to avoid this in case we need restart of freenas?

Mladen
 

Mladen Pokric

Newbie
Joined
Dec 10, 2015
Messages
2
Hi everybody,

I used this tutorial and set up everything fine for owncloud.

I used mariadb for mysql.

Last week, we have power loss, and when we restarted, freenass worked properly, but have internal error with owncloud :

When i want' to connect to the database i'm getting this error :
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

That happen on first day when i set up owncloud. I made a new database and everything worked again... but... make again users, mails....

Today, i have problem with freenas, but owncloud worked well. I made a backup of database.

After restarting freenas, same problem with owncloud :

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

File "myssql.sock" of course exists.

Is that a problem with some permission, how to avoid this in case we need restart of freenas?

Mladen
For now seems that mysql wasn't set up on correct path. We move database to another server with same data from config.php.
Worked.

Also, today reset freenas, and again it's working.
 

Tenek

Member
Joined
Apr 14, 2014
Messages
93
DrKK,
If versioning is not necessary and no need for apps. Would you think that BitTorrent Sync Plugin (Btsync) will server well to replace owncloud?
I'm not FreeNas/FreeBSD expert and I don't have much time to chase owncloud evolution. Although I need something to sync pretty large amount of files between 3-4 users and many devices.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
DrKK,
If versioning is not necessary and no need for apps. Would you think that BitTorrent Sync Plugin (Btsync) will server well to replace owncloud?
I'm not FreeNas/FreeBSD expert and I don't have much time to chase owncloud evolution. Although I need something to sync pretty large amount of files between 3-4 users and many devices.
I would say SyncThing (which you can install, *or*, there is a FreeNAS plugin) would be a good possibility to look at.,
 

Mohl

Junior Member
Joined
Feb 2, 2015
Messages
13
EDIT: As it turns out, I don't have the privileges to start a new thread, so I recommend following @DrKK's video guide up until 28:00, then do the steps above, then continue with the video.

Hi everyone,

I just installed owncloud in a jail on freenas 9.3 using mysql. I basically followed @DrKK's video guide (big thanks!), but instead of installing owncloud via pkg, i compiled it from ports and installed mysql-server from ports afterwards. I am pretty sure it also works just fine if you install owncloud using pkg, but since there is a strange conflict between pkg's owncloud and pkg's mysql-server (mariadb55-server), at least the latter one must be compiled by hand at the moment.

Here are the steps i took to set up the database:
Code:
portsnap fetch extract    # this line fetches the freebsd ports and extracts them to /etc/ports/. This might take a while, about 15 minutes on my machine, so grab a cup of coffee.
mysql --version    # This line gives you your installed mysql CLIENT version. mine is 5.6, so I installed the mysql server version 5.6. the client and server version number must match in order to work together. If your version number diverges, just go ahead and use the server version that matches your client version, all the other stuff should work exactly the same way.
cd /mnt/ports/databases/mysql55-server/
make configure    # on 5.6, this just says 'nothing to configure'. on 5.7, you can select stuff like OpenSSL and so on. If you don't know what to do, just accept the default values by hitting Enter.
make install clean    # this installs the mysql-server into your jail. This will take a long time, about 30 minutes on my machine. Several configuration windows will pop up, just accept the default values by hitting Enter. This is the most annoying part as a window will pop up every few seconds to minutes.
sysrc mysql_enable='yes'    # just as DrKK's guide enables sshd service to start automatically when the jail is bootet, this like enables the mysql-server service to start automatically.
service mysql-server start    # start the mysql server
mysql -uroot    # this logs you into the mysql console. you can quit it at any time by typing 'quit;'
CREATE DATABASE 'owncloud';    # this creates the database owncloud will store it's internal data to. your data won't go in here. feel free to change the name, but make sure you remember it
CREATE USER owncloud IDENTIFIED BY 'your_password';    # you most definitely, absolutely should change the password, but make sure to remember it ;-)
USE owncloud;    # selects the database you just created
GRANT ALL PRIVILEGES on 'owncloud.*' TO owncloud@localhost;    # allows the user you just created to actually access the database
FLUSH PRIVILEGES;    # makes sure your the rights you just granted are passed to the database.
EXIT;


That's it. You should now be able to run your owncloud installation on mysql instead of sqlite3. I will post a full guide if i get around to it.
 
Last edited:

Raiz

Member
Joined
Nov 26, 2015
Messages
77
*sigh*

You really should update the video or just take it down so people who go to Youtube and find it will not be misled as I was. I only found this thread after watching the video and saw your "BIG RED TEXT" after a couple of wasted hours.

At this point, should I just delete the owncloud jail and start over to get the lite version? Which parts of the video are still correct after doing the "lite" install in the first post of this thread?
 
Last edited:
Status
Not open for further replies.
Top