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

Status
Not open for further replies.

korna

Dabbler
Joined
Jul 13, 2014
Messages
15
A very nice guide! and indeed more clear than some of the others...

I did run into a problem and I think I followed all the steps. Owncloud is showing its front page however, I am getting this warning:

No database drivers (sqlite, mysql, or postgresql) installed.
PHP modules have been installed, but they are still listed as missing?
Please ask your server administrator to restart the web server.​

I guess the database should have been installed as part of the pkg?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Some things appeared to have changed a bit in the past several months.

I recently rebuilt my whole owncloud jail, and I did the whole thing using a custom compile from ports. I think maybe it might be time to write a newer guide, using the ports method, now that I know about 10x more than I knew when I wrote this initial guide.

There were a few "gotchas", that involved actually going in and symbolically linking some libraries, and changing a couple lines of code in the source. The kinds of things most people aren't going to be able to figure out on their own. Hopefully I'll get to that soon enough.
 

eqartimus

Explorer
Joined
Aug 2, 2014
Messages
66
Hello DrKK,

I have followed your guide and read the subsequent posts, but can't find any answer to my problem:

Everything looked smooth (as per your guild) up until I was supposed to be able to show the page:

I went to my browser and put in 192.168.1.204 (IP for owncloud) and I am getting my freenas (92.168.250)

This seems like the same problem as someone was reporting about their putty logging into Freenas, so I went through and restarted the sshd service and could infact putty into owncloud.
I restarted the lighttpd service and now I get 404 - Not Found error when I look on my browser ..

Im not sure where to look now...
 

eqartimus

Explorer
Joined
Aug 2, 2014
Messages
66
Ok... after further checks, I found my mistake ... there was a var server.document-root = "/usr/local/www/owncloud/" and I missed the actual statement further down the file. Sorry for such a noob mistake.

David
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
oh ok cool.

Yeah, basically, if your jail web server is not started, then when you attempt to access the jail's IP in the web browser, my understanding is that you will actually get served the web server from the FreeNAS appliance. i.e., since your network stack is shared, then something on a jail IP, port N, if the service is NOT listening (e.g., since it didn't start correctly), then what you'll get is actually what's on the FreeNAS IP, porn N. In this case, the FreeNAS appliance's web server. This goes for ssh also. That's why if your sshd is not running the jail, and you try to ssh into the jail, you'll get the ssh daemon from the FreeNAS appliance answering.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
You know, for the record, I killed my OwnCloud jail, and starting from scratch, building straight from ports (instead of packages). That gave a more pleasing result. I am thinking about updating with a new Guide showing how to do this. It's a bit more complicated.
 

eqartimus

Explorer
Joined
Aug 2, 2014
Messages
66
Im not smart enough to know what it means to build straight from ports ... but everything is working locally now .. I put in the part to the modules.conf for security ...
Can you point me to a good guild for opening this up to the internet now? I am on info overload trying to see what is applicable and what isn't. Thanks again for your work, patience and attentiveness.

David
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Im not smart enough to know what it means to build straight from ports ... but everything is working locally now .. I put in the part to the modules.conf for security ...
Can you point me to a good guild for opening this up to the internet now? I am on info overload trying to see what is applicable and what isn't. Thanks again for your work, patience and attentiveness.

David
Hi David.

Opening up your OwnCloud to the internet is sort of risky voodoo that you really want to know what you're doing. Better security will require more knowledge. Let me give you some options.

1) Option #1, nearly perfect security: You install "OpenVPN" on either the router or the FreeNAS itself. Then, as far as any computer is concerned, you're on the LAN, even when you're not, and you have nearly perfect security. But, this is a very complex choice that requires a ton of reading.

2) Option #2, "OK" security. You do as much reading as you can on "hardening" lighttpd. You then go into your router, and you forward some high numbered port to port 443 on the jail. For example, let's say you forward port 51234 to port 443 on the jail. Then when you're outside your LAN, you can access your owncloud on your real internet IP address (go to whatsmyip.org to find out what it is). Let's say it's 123.234.123.234. Then you tell the owncloud program on your computers that your owncloud server is at https://123.234.123.234:51234/ This will also work inside the LAN in most cases.

Either way, you'll have to do some reading, but a non-techno-nerd is unlikely to pull off #1. The second one will require some reading, but you can pull it off.

Make sure you use the "https" (port 443) and not "http" (port 80) method of accessing your server, if you are going to be accessing from the outside (you'd have to have done the config for https in my guide). The latter is insecure, in the clear (i.e., anyone seeing your packets can get into your owncloud), and in many cases, the service provider will block port 80 inbound anyways.
 

eqartimus

Explorer
Joined
Aug 2, 2014
Messages
66
I was heading towards 2) already -- and 443 is good info, as I was futsin around with port 80 :P But not getting a web page. So I got a lot of messin to do before Im ready to ask an inteligent question.
Thanks again.

david
 

eqartimus

Explorer
Joined
Aug 2, 2014
Messages
66
I can't seem to get over the "Untrusted Domain" issue. I have looked at the config/config.php file -- but can't for the life of me determine what will be a valid domain ... I tried the my real internet IP .. but that didn't fix it. How can I tell what Domain I need to add to that listing?

David
 

eqartimus

Explorer
Joined
Aug 2, 2014
Messages
66
Got it.. needed to add the port to the ip.
 

eqartimus

Explorer
Joined
Aug 2, 2014
Messages
66
Am I naive to think that my only security risk at this point is only what data is located in that Jail store? Currently, I find the data in:
/mnt/myzpoolname/jails/myOwnCloud/usr/local/www/owncloud/data/David ... can someone currently work their way backwards if they can break into "owncloud/data/David", and if so can they work back past "jails"?

Thanks for your patience ... I have 30+ years programming background, but have been retired for 15 years and never really worked much with unix/linux.

David
 

NasDummy

Cadet
Joined
Oct 16, 2014
Messages
3
Im really am a newb at this stuff, just had to get it working for my internship. I followed everything till 11) and my "top" turned out like this. I think I'm missing something. Any help?


Code:
last pid: 10285;  load averages:  0.36,  0.19,  0.17    up 0+01:31:00  08:20:11
9 processes:  1 running, 8 sleeping                                          
CPU:  3.1% user,  0.0% nice,  0.6% system,  0.0% interrupt, 96.3% idle        
Mem: 111M Active, 109M Inact, 338M Wired, 24M Buf, 363M Free                  
ARC: 179M Total, 36M MFU, 118M MRU, 272K Anon, 2925K Header, 21M Other        
Swap: 4096M Total, 4096M Free                                                  
                                                                               
 PID USERNAME THR PRI NICE   SIZE    RES STATE   TIME    CPU COMMAND      
8928      www   1  52    0 30200K 12852K wait    0:00  0.00% php-cgi      
9932      root  1  20    0  9876K  2064K RUN     0:00  0.00% top          
4349      root  1  20    0  9548K  1672K select  0:00  0.00% syslogd      
9927      root  1  21    0 10868K  3012K pause   0:00  0.00% csh          
4400      root  1  20    0  9588K  1624K nanslp  0:00  0.00% cron        
8927      www   1  20    0 11868K  3808K kqread  0:00  0.00% lighttpd    
8929      www   1  52    0 30200K 12852K accept  0:00  0.00% php-cgi      
8931      www   1  52    0 30200K 12852K accept  0:00  0.00% php-cgi      
8930      www   1  52    0 30200K 12852K accept  0:00  0.00% php-cgi



If all that is fine then i should go to 15) since I don't want to install https, but how do I open my owncloud? Tried http://"my ip"/owncloud and it pops me into my freenas. How do I do it?!
 
Last edited:

NasDummy

Cadet
Joined
Oct 16, 2014
Messages
3
Im really am a newb at this stuff, just had to get it working for my internship. I followed everything till 11) and my "top" turned out like this. I think I'm missing something. Any help?


Code:
last pid: 10285;  load averages:  0.36,  0.19,  0.17    up 0+01:31:00  08:20:11
9 processes:  1 running, 8 sleeping                                         
CPU:  3.1% user,  0.0% nice,  0.6% system,  0.0% interrupt, 96.3% idle       
Mem: 111M Active, 109M Inact, 338M Wired, 24M Buf, 363M Free                 
ARC: 179M Total, 36M MFU, 118M MRU, 272K Anon, 2925K Header, 21M Other       
Swap: 4096M Total, 4096M Free                                                 
                                                                              
PID USERNAME THR PRI NICE   SIZE    RES STATE   TIME    CPU COMMAND     
8928      www   1  52    0 30200K 12852K wait    0:00  0.00% php-cgi     
9932      root  1  20    0  9876K  2064K RUN     0:00  0.00% top         
4349      root  1  20    0  9548K  1672K select  0:00  0.00% syslogd     
9927      root  1  21    0 10868K  3012K pause   0:00  0.00% csh         
4400      root  1  20    0  9588K  1624K nanslp  0:00  0.00% cron       
8927      www   1  20    0 11868K  3808K kqread  0:00  0.00% lighttpd   
8929      www   1  52    0 30200K 12852K accept  0:00  0.00% php-cgi     
8931      www   1  52    0 30200K 12852K accept  0:00  0.00% php-cgi     
8930      www   1  52    0 30200K 12852K accept  0:00  0.00% php-cgi



If all that is fine then i should go to 15) since I don't want to install https, but how do I open my owncloud? Tried http://"my ip"/owncloud and it pops me into my freenas. How do I do it?!
Never mind guys. I found it out :D
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630

NasDummy

Cadet
Joined
Oct 16, 2014
Messages
3
thnx for the guide ! I created various accounts on my freenas and owncloud, trying to link them 2 eachother and a specific directory, (Ex: freenas user- "dummy" and owncloud user- "dummy", having its own directory), so they can connect to if through local lan in my computer and owncloud address. Having a bit of trouble.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Hi
What do I have to do if I want to update it to ownCloud 7? Simply use pkg to update it or do I have to watch out for certain things?
Owncloud can be updated right in its web GUI.

Works fine.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630

royber

Cadet
Joined
May 1, 2014
Messages
5
Hey DrKK,

you have a really nice Guide here.. everything worked perfectly and was kinda easy. The Explanations in the Video are very good and i like the fact, that you want to teach a little bit and dont just give a "step by step" manual, without knowing whats goin on.
I Used the Video and read the thread.

But i have one question: I have configured a new ZFS Volume but created the Jail in my pluginjailfolder, where the rest of the jails are on my old Volume. Is it possible to link up folders from another vol to my jail with owncloud, so that the data will be stored there? And not in the jail and the Volume itself? I mean like plex does it.

Or is it possible to move the whole Jail? I dont want to create a new one and begin from the start :P

Greetings
royber
 
Status
Not open for further replies.
Top