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

Status
Not open for further replies.

Mohl

Dabbler
Joined
Feb 2, 2015
Messages
13
*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?
The Video is just fine up until the point you have to type "pkg install owncloud". Instead of doing this, follow the steps marked red in the first post of this thread: https://forums.freenas.org/index.ph...talling-owncloud-in-freenas-or-freebsd.19605/ (so portsnap fetch extract, and so on).
 

Raiz

Explorer
Joined
Nov 26, 2015
Messages
77
The Video is just fine up until the point you have to type "pkg install owncloud". Instead of doing this, follow the steps marked red in the first post of this thread: https://forums.freenas.org/index.ph...talling-owncloud-in-freenas-or-freebsd.19605/ (so portsnap fetch extract, and so on).
I did that. It also says, "If you are asked to set other options, simply accept what's already been selected for you."

I did that as well. It installed 2.9GB worth of files and took forever. All I did was sit there and hit "ok" for about an hour while it installed more and more stuff. In the end, it still didn't work properly so I deleted it and installed using the owncloud plugin. It's working fine with the plugin. I would have rather installed using a standard jail because others in this thread suggest it can be more secure and easier to update and manage. Unfortunately, I can't spend any more time figuring this out. I just need it to work, and it does.
 
Last edited:

stewpot

Dabbler
Joined
Feb 14, 2016
Messages
10
I'm trying to follow this guide, but falling over at the very start.

I don't have a standard jail template, and this guide doesn't tell me how to install one.

Any ideas please?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I'm trying to follow this guide, but falling over at the very start.

I don't have a standard jail template, and this guide doesn't tell me how to install one.

Any ideas please?
That's a fair question sir. Since 9.3 came out, we have not had differentiated templates for the jails.

Just proceed with the single jail that is now available, select no template.
 

stewpot

Dabbler
Joined
Feb 14, 2016
Messages
10
Thanks.

Got a lot further now, but having installed lighttpd and included the php-cgi module, when I enter the url in a browser and try and create an admin account, under "storage and access" I get........."Configure the database.....Only MySQL/MariaDB is available. Install and activate additional PHP modules to choose other database types."

And then it asks for database user, database password, database name and database host"


Have I missed something?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Have I missed something?
Yes, I'm afraid so.

What you've missed is the GIGANTIC RED WARNING RIGHT AT THE TOP OF THE ORIGINAL POST. Go back to the original post in this thread.
 

stewpot

Dabbler
Joined
Feb 14, 2016
Messages
10
Oops.

So, will I have to delete the jail and start from scratch, but replacing the install owncloud with the steps you list in red?
 

Raiz

Explorer
Joined
Nov 26, 2015
Messages
77
Oops.

So, will I have to delete the jail and start from scratch, but replacing the install owncloud with the steps you list in red?

That's the same thing I did. I recommended that they update the youtube video with the same warning, however I guess that advice hasn't been taken. I eventually just installed the owncloud plugin and it's been working fine for quite a while.
 
Joined
Dec 2, 2015
Messages
730
Thanks DrKK for the guide! I survived the whole thing, and my ownCloud is working nicely.

It took me a little while, and a bit of Googling to get cron setup to run the cron.php script. Here are the highlights of what I learned, to hopefully save someone else a few minutes of their time.

  1. Log in to ownCloud's web interface as a user with admin privileges.
  2. Select the Admin menu and scroll down until you see the Cron section. Select the bottom option, to use cron to run the periodic scripts.
  3. Log in to the jail as root in a terminal window.
  4. Create a crontab for the www user, by running the following command "crontab -u www -e".
  5. This will open the vi editor. If you don't know vi, Google for a vi cheat sheet, or vi tutorial.
  6. Using vi, enter the following line (without the quotes) "*/15 * * * * /usr/local/bin/php -f /usr/local/www/owncloud/cron.php"
  7. Save the file, then verify it was installed by running "crontab -u www -l"
  8. Wait 15 minutes, then reload the admin page, and check the Cron section. It should state that the "last cron job execution" was less than 15 minutes ago.
Good luck.
 

Estropelic

Contributor
Joined
Feb 8, 2016
Messages
107
Are users finding that installing owncloud manually is a better option than installing through the plugins menu? What are the pros and cons?
 
Joined
Dec 2, 2015
Messages
730
I followed this guide to a "T", and it worked exactly as expected. But, this guide was first posted in May 2014, and it is now Feb 2016. This guide recommends using lighttpd as the web server, but ownCloud dropped official support for it in 2015. Lighttpd works, but the fact that they no longer officially support it makes me nervous that it may stop working with some random ownCloud update.

If I were to install ownCloud again, I'd try using nginx as the web server, as it is light weight, and still supported. I'd stick with SQLite for the database, as it is quite frugal with the resources, and that is what I want for my single-user installation, running with a G3258 CPU and 16 GB RAM.

Manual installation Pros: you know exactly how it is set up, so you have some chance of being able to support it when things break in the future.

Manual installation Cons: it takes more time. Figure on at least two hours to watch the video, do the installation, configure ownCloud, etc.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Yeah I'm no longer really an owncloud fan, myself, believe it or not. The hassle-per-usefulness exceeded my tolerance sometime in 2015.
 
Joined
Dec 2, 2015
Messages
730
Yeah I'm no longer really an owncloud fan, myself, believe it or not. The hassle-per-usefulness exceeded my tolerance sometime in 2015.
What problems were your having? I'm wondering what I should be on the look out for.

It is working great for me, so far. It keeps 40 GB of files in sync between two computers and FreeNAS. It allows Goodreader on my iPad to sync to a specified folder, so I have an easy way to get documents onto it, in a defined folder hierarchy.

My only complaint is the slow speed when syncing after I added about 30 GB of files in one batch. I let it churn away overnight, and it was done by morning.
 

stewpot

Dabbler
Joined
Feb 14, 2016
Messages
10
I'm confused now.....I was looking at Ownclud because I'd asked the forums what to use as a personal cloud to allow me access to my files, photos, videos etc from my phone, and I was recommended owncloud.

Now I read that it is not recommended if you want to open up your owncloud to the internet......that's exactly what I want to do.

Also, DrKK, who wrote the guide, is no longer a fan of owncloud.

So, if I may ask the question again, can I use my freenas system as a storage/backup solution and as a personal cloud.....in the same way that a Synology or Qnap system would.

I've invested a couple of week's research into this so far and, although I've managed the storage/backup solution, I'm completely lost as to how to set up a cloud.....or even if it'll be secure if I do manage it.
 
Joined
Dec 2, 2015
Messages
730
OwnCloud is certainly advertised as being suitable for access from the internet. As near as I can tell, the worst case thing that could happen would be an intruder gets into your jail. The intruder should be prevented from breaking out of the jail and accessing the rest of your FreeNAS box. But, if you want to use ownCloud in this way, I think it would be best to use one of the officially supported web servers (Apache or nginx), and follow all the security recommendations made by the ownCloud docs.

I'd like to open up ownCloud to the internet eventually, but I won't do that as I currently have it configured, and I'll do a lot of research first to better understand the risks and how to mitigate them. I may end up using a VPN to better protect it.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I don't mean to say I no longer "trust" owncloud or anything like that. I merely mean to say that with various changes made to the owncloud ports build, I eventually started having small annoyances whose resolutions I determined were more effort than my continued use of OwnCloud was worth.

I might try it again---a lot of those things seemed to have dropped off considerably in the past several months.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
I've been running ownCloud in a jail using the other 'how to.." thread using nginx and mysql, and other than some issues with updates it's been rock solid and it's accessed externally (5-6 users across 10-12 devices with about 500GB storage) with https access and fail2ban to offer some protection to unwanted visitors.

The updates seem to be getting better and if you snapshot the jail before doing anything it's easy enough to roll back and try again at a later version.
 

oguruma

Patron
Joined
Jan 2, 2016
Messages
226
I got it up and running, with the exception of the maximum file upload size. I changed the php.ini file to 10000MB maximum, but I still get the error message "maximum 513MB". Is there something I am missing?
 

rldoose

Dabbler
Joined
Apr 16, 2016
Messages
17
Dear DrKK,
Simply outstanding! I can't say all went without a hitch, but man did I learn a lot along the way! Then, based on what I learned, I extrapolated and went on and was able to:
Secure my SSH with a private key
Obtain and install a CA cert from www.ssls.com (what a learning curve there, I can see the appeal of letsencrypt)
Make my ownCloud available on the WWW securely (I don't even understand having a could server if you can't access it from any computer)

You have a new fan for sure!

Kind Regards
rldoose
 

rldoose

Dabbler
Joined
Apr 16, 2016
Messages
17
On the issue of security, I have enabled SSL, and have only opened port 443. Port 80 is still closed to the outside. I believe that this should alleviate the .htaccess issue, is this correct? Based on the code snip, it seemed to apply only to HTTP. I'm pretty sure I'm correct on this, but don't want to make any assumptions when it comes to security.
 
Status
Not open for further replies.
Top