ironicbadger Posted February 10, 2014 Share Posted February 10, 2014 Continuing my series of Appliance VM releases this time we have an Owncloud appliance based on top of Debian 7.4. Functionality out the box is limited to an owncloud host only, I fully expect you to mount your unRAID box as the data store over NFS or Samba - entries are in /etc/fstab as examples ready for you. What is OwnCloud? ownCloud is a software system for what is commonly termed "cloud storage". As such' date=' ownCloud is very similar to the widely-used Dropbox, with the primary difference being that ownCloud is free and open-source, and thereby allowing anyone to install and operate it without charge on a private server, with no limits on such things as storage space or the number of users and client machines connecting.[/quote'] It basically allows access to all your files from unRAID, externally and internally. It includes a few neat features like syncing files to and from a local machine, just like Dropbox. Also it has contact and calendar sync as well as support for 'mounting' external storage like S3, Google Drive, SMB shares etc. It's just a nice little package that's under heavy development right now. Take control of your 'cloud'. If you want to get real fancy, you could look at using something like the built-in FTP stuff to host your documents on your own webserver but access through the ownCloud interface (which is really nice). Ok I get it, Owncloud is awesome. Show me the VM! There is no sexy repo for this VM as I've only really set it up to do one job and one job only. It requires minimal resources to run (1vcpu and 256mb ram ought to be plenty) but of course you can increase these as desired. I chose Debian over other OSs for this project as it a bit 'harder' seeing as you're likely to want to expose this VM to the internet. Usernames and passwords: root / password owncloud / password [shadow=red,left]See below for VM installation instructions.[/shadow] Owncloud Apps Owncloud itself supports the installation of apps from apps.owncloud.com. These are presented to you as a .zip file from this site and have to be installed manually, definitely an area for improvement. Basic 3rd party app installation goes like this. 1. Download .zip using wget to this directory. cd /var/www/owncloud/apps wget <insert link> unzip <insert file.zip> 2. Refresh owncloud, doesn't need a restart. Download Links Google Drive - https://drive.google.com/file/d/0Bz5njPYYj26iaTVnVUktTEhFWHM/edit?usp=sharing Dropbox - *uploading* Personal Hosting - http://unraidrepo.ktz.me/owncloudVM/owncloud.zip If you find this VM useful please consider making a donation towards hosting costs. v1: Release notes - Root filesystem is about 973M, I'm sure some pruning can be done to get this down but it's not a huge deal. - The vm .img file is only 5G, I'm not sure whether this will be enough for a fully populated database. Please give me feedback on this, if it's not I can enlarge the image quite easily with little effect on the download size I think. If this is an issue for you, tell me as much info as you can about your usage and the size and quantity of data you're indexing via ownCloud. Quote Link to comment
ironicbadger Posted February 10, 2014 Author Share Posted February 10, 2014 How to download and start this appliance 1. Login via SSH or Telnet to your unRAID box using Putty on Windows or Terminal on a Mac. 2. Download the .zip file to the location you want to run the VM from and unzip it. cd /mnt/user/cache_only <------ *** wget http:// <insert download link from post #1> unzip owncloud.zip <------ this will take approx 5 mins *** this is up to you, you can place the .zip wherever you like. If you change this location, you will need to edit the .cfg file accordingly. If you want to do this use mcedit after you've unzipped the download. mcedit owncloud/debcloud.cfg 3. Run your VM. xl create owncloud/debcloud.cfg 4. *Optional* Login to your VM via either SSH or Xen Console and find the IP address of your debcloud VM. xl console debcloud OR ssh root@debcloud Once you're logged in, to find the IP address of the VM issue ip addr 5. Type that IP address into your web browser. http://192.168.0.37 <---- edit this Note: The owncloud VM has a server dashboard I'm testing out from here, let me know if you like. [shadow=red,left]To access owncloud you must put your IP address into your browser, then /owncloud afterwards![/shadow] example: http://192.168.0.37/owncloud What about accessing unRAID via Owncloud? Luckily, ownCloud natively supports mounting samba / cifs shares from the web interface or mounting local storage. The local storage option is probably the easiest to get going as I have already put some helpful pointers in the fstab for you. Here's how you enable them. 1. Login to your 'debcloud' VM via ssh or xen console (xl console debcloud). User - root Password - password 2. Edit /etc/fstab nano /etc/fstab 3. Choose whether you want to mount unRAID via Samba or NFS and uncomment the line you want (by removing the #). 10.0.0.2:/mnt/user/Media /mnt/unraid nfs rw,rsize=4096..... #//10.0.0.2/Media /mnt/unraid cifs rw,guest,uid=owncloud...... 4. Mount the fstab entries with mount -a 5. Load up the ownCloud webGUI then look for the admin section under the dropdown menu in the top right. 6. Look for the 'external storage' section and fill it out as I have below and you're done. You can edit the path /mnt/unraid if you want, but that's where I've set the VM to mount unRAID at. If you want ownCloud to only access one folder within your unRaid share you just add that folder onto the end of the file path ' /mnt/unraid/ownCloud ' for example. Quote Link to comment
NAS Posted February 10, 2014 Share Posted February 10, 2014 Nice project idea. Nice choice of OS. You got to love those low RAM and disk usage stats. Quote Link to comment
ironicbadger Posted February 10, 2014 Author Share Posted February 10, 2014 Cheers NAS. Guide is now complete and VM images are uploading. Feedback welcomed! Edit: Links are up! Quote Link to comment
SchoolBusDriver Posted February 10, 2014 Share Posted February 10, 2014 Wow! This is one of the best guides on here. You really knocked it out of the park with this one. From the nice VM Appliance all the way through the documentation. Keep up the great work and put a donate button on this! Quote Link to comment
NAS Posted February 11, 2014 Share Posted February 11, 2014 Something to consider is SSL. We dont want everyone having the same SSL cert as bad things could be done with it. Nice work again Quote Link to comment
ironicbadger Posted February 11, 2014 Author Share Posted February 11, 2014 Something to consider is SSL. We dont want everyone having the same SSL cert as bad things could be done with it. Nice work again For that very reason I have not included SSL If there is a ground swell of interest, I could write up a guide, but dozens exist elsewhere. Quote Link to comment
NAS Posted February 11, 2014 Share Posted February 11, 2014 Yeah I spoke too soon, sorry about that. I would strongly suggest we have a duty of care to ensure people are using SSL with stuff like owncloud. In general this and SSH keygen is a problem we need to solve anyway if there are going to be virtual appliances delivered of the shelf for people to use. Perhaps we should fork this discussion because on top of SSL and SSH there are things like API keys for sab etc. It is a topic in its own. In the interim I think we need to make sure people dont put owncloud on the net without SSL Quote Link to comment
heffe2001 Posted February 12, 2014 Share Posted February 12, 2014 Had to do: apt-get install cifs-utils to get cifs working on the system, wouldn't mount my samba shares until I did. Quote Link to comment
ironicbadger Posted February 12, 2014 Author Share Posted February 12, 2014 Had to do: apt-get install cifs-utils to get cifs working on the system, wouldn't mount my samba shares until I did. Cheers, I'll add that to my future images. How is it working out for ya? Quote Link to comment
dlandon Posted February 15, 2014 Share Posted February 15, 2014 I got this VM working and when I browse to owncloud I am prompted for a user name and password. Do you have them preset? I expected to get to a setup screen. Quote Link to comment
thebigslicksuitd Posted February 15, 2014 Share Posted February 15, 2014 I got this VM working and when I browse to owncloud I am prompted for a user name and password. Do you have them preset? I expected to get to a setup screen. use the owncloud / password combination Usernames and passwords: root / password owncloud / password Quote Link to comment
NAS Posted February 15, 2014 Share Posted February 15, 2014 insert obvious sanity checks here: If you haven't changed all the passwords you should not present this to the internet yet if you haven't added SSL you should not present this to the internet yet Quote Link to comment
MrLondon Posted February 15, 2014 Share Posted February 15, 2014 followed the guide but have problems with mounting my shares I am getting these errors root@debcloud:/home/owncloud# nano /etc/fstab GNU nano 2.2.6 File: /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/xvda1 during installation UUID=33f9e32c-94b3-42a4-8628-aeca49f7b5c3 / ext4 errors=remoun$ 192.168.0.6:/mnt/user/series /mnt/series nfs rw,rsize=4096,wsize=4096,ha$ 192.168.0.6:/mnt/user/movies /mnt/movies nfs rw,rsize=4096,wsize=4096,ha$ 192.168.0.6:/mnt/user/music /mnt/music nfs rw,rsize=4096,wsize=4096,ha$ //192.168.0.6/vincent /mnt/vincent cifs rw,guest,uid=owncloud,ioch$ [ Wrote 15 lines ] root@debcloud:/home/owncloud# mount -a mount: mount point /mnt/series does not exist mount: mount point /mnt/movies does not exist mount: mount point /mnt/music does not exist Couldn't chdir to /mnt/vincent: No such file or directory root@debcloud:/home/owncloud# mkdire /mnt/series bash: mkdire: command not found root@debcloud:/home/owncloud# mkdir /mnt/series root@debcloud:/home/owncloud# mkdir /mnt/movies root@debcloud:/home/owncloud# mkdir /mnt/music root@debcloud:/home/owncloud# mkdir /mnt/vincent root@debcloud:/home/owncloud# mount -a mount: wrong fs type, bad option, bad superblock on 192.168.0.6:/mnt/user/series, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so mount: wrong fs type, bad option, bad superblock on 192.168.0.6:/mnt/user/movies, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so mount: wrong fs type, bad option, bad superblock on 192.168.0.6:/mnt/user/music, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so mount error(22): Invalid argument Refer to the mount.cifs( manual page (e.g. man mount.cifs) Quote Link to comment
MrLondon Posted February 15, 2014 Share Posted February 15, 2014 also this is probably a n00b question, but I run this inside my home on my network, how would I get access outside my network, would I need to enable port forwarding on my router, I looked on owncloud webpage but haven't really found anything there. I tried to use my WAN IP from the router but it could not find my server. Quote Link to comment
ironicbadger Posted February 15, 2014 Author Share Posted February 15, 2014 Had to do: apt-get install cifs-utils to get cifs working on the system, wouldn't mount my samba shares until I did. To mount via samba you must have the cifs-utils installed in debian. The fix was already posted in this thread!!! As for the other errors, it's telling you in the error message itself what the problem is! It's great that you're pushing yourself to learn new things, but you really need to read the information provided in this thread and by the error messages. I don't mean this how it may sound but I haven't got time to walk you through every single step... (Also try use code tags in future). Please don't be offended by my comments, they are meant to help you in the long run! mount: mount point /mnt/series does not exist mount: mount point /mnt/movies does not exist mount: mount point /mnt/music does not exist What do you think these errors mean? Yes that's right, the mount point does not exist! How do you fix it? You create the mount point... mkdir /mnt/series mkdir /mnt/movies mkdir /mnt/music Hope this little lot helps!! also this is probably a n00b question, but I run this inside my home on my network, how would I get access outside my network, would I need to enable port forwarding on my router, I looked on owncloud webpage but haven't really found anything there. As posted by NAS you need to enable SSL support before opening up your files to the world, these instructions worked for me. http://ubuntuserverguide.com/2013/04/how-to-setup-owncloud-server-5-with-ssl-connection.html Only once you have done this should look into port forwarding (yes this is the correct method most likely for you). Quote Link to comment
MrLondon Posted February 15, 2014 Share Posted February 15, 2014 Had to do: apt-get install cifs-utils to get cifs working on the system, wouldn't mount my samba shares until I did. To mount via samba you must have the cifs-utils installed in debian. The fix was already posted in this thread!!! As for the other errors, it's telling you in the error message itself what the problem is! It's great that you're pushing yourself to learn new things, but you really need to read the information provided in this thread and by the error messages. I don't mean this how it may sound but I haven't got time to walk you through every single step... (Also try use code tags in future). Please don't be offended by my comments, they are meant to help you in the long run! mount: mount point /mnt/series does not exist mount: mount point /mnt/movies does not exist mount: mount point /mnt/music does not exist What do you think these errors mean? Yes that's right, the mount point does not exist! How do you fix it? You create the mount point... mkdir /mnt/series mkdir /mnt/movies mkdir /mnt/music Hope this little lot helps!! also this is probably a n00b question, but I run this inside my home on my network, how would I get access outside my network, would I need to enable port forwarding on my router, I looked on owncloud webpage but haven't really found anything there. As posted by NAS you need to enable SSL support, these instructions worked for me. http://ubuntuserverguide.com/2013/04/how-to-setup-owncloud-server-5-with-ssl-connection.html gotten SSL enabled and I also installed the cifs tools before I tried importing the shares, but still gotten the errors Quote Link to comment
ironicbadger Posted February 15, 2014 Author Share Posted February 15, 2014 mount points? Quote Link to comment
MrLondon Posted February 15, 2014 Share Posted February 15, 2014 Had to do: apt-get install cifs-utils to get cifs working on the system, wouldn't mount my samba shares until I did. To mount via samba you must have the cifs-utils installed in debian. The fix was already posted in this thread!!! As for the other errors, it's telling you in the error message itself what the problem is! It's great that you're pushing yourself to learn new things, but you really need to read the information provided in this thread and by the error messages. I don't mean this how it may sound but I haven't got time to walk you through every single step... (Also try use code tags in future). Please don't be offended by my comments, they are meant to help you in the long run! mount: mount point /mnt/series does not exist mount: mount point /mnt/movies does not exist mount: mount point /mnt/music does not exist What do you think these errors mean? Yes that's right, the mount point does not exist! How do you fix it? You create the mount point... mkdir /mnt/series mkdir /mnt/movies mkdir /mnt/music Hope this little lot helps!! also this is probably a n00b question, but I run this inside my home on my network, how would I get access outside my network, would I need to enable port forwarding on my router, I looked on owncloud webpage but haven't really found anything there. As posted by NAS you need to enable SSL support before opening up your files to the world, these instructions worked for me. http://ubuntuserverguide.com/2013/04/how-to-setup-owncloud-server-5-with-ssl-connection.html Only once you have done this should look into port forwarding (yes this is the correct method most likely for you). root@debcloud:/home/owncloud# apt-get install cifs-utils Reading package lists... Done Building dependency tree Reading state information... Done cifs-utils is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@debcloud:/home/owncloud# Quote Link to comment
MrLondon Posted February 15, 2014 Share Posted February 15, 2014 mount points? root@debcloud:/home/owncloud# root@Tower:~# cd /mnt/user root@Tower:/mnt/user# ls -l total 33 drwxrwxrwx 1 nobody users 88 Apr 13 2013 apps/ drwxrwxrwx 1 nobody users 72 Jul 28 2011 backup/ drwxrwxrwx 1 nobody users 72 Feb 15 12:18 cache_only/ drwxrwxrwx 1 nobody users 48 Jul 3 2011 downloads/ drwxrwxrwx 1 nobody users 48 Dec 6 2012 ebooks/ drwxrwxrwx 1 nobody users 48 Oct 1 2011 lost+found/ drwxrwxrwx 1 nobody users 80 Jan 11 17:23 misc/ drwxrwxrwx 1 nobody users 184 Feb 4 17:22 movies/ drwxrwxrwx 1 nobody users 17832 Aug 2 2011 music/ drwxrwxrwx 1 nobody users 80 Feb 2 22:57 mysql/ drwxrwxrwx 1 nobody users 3160 May 4 2012 photos/ drwxrwxrwx 1 nobody users 48 Apr 7 2013 plugins/ drwxrwxrwx 1 nobody users 1416 Jan 31 19:29 series/ drwxrwxrwx 1 nobody users 1096 Jan 11 17:23 software/ drwxrwxrwx 1 nobody users 208 Aug 6 2011 timemachine/ drwxrwxrwx 1 nobody users 11328 Jun 10 2012 training/ drwxrwxrwx 1 nobody users 48 Mar 11 2012 usb/ drwxrwxrwx 1 nobody users 280 Jan 19 14:11 vincent/ drwxrwxrwx 1 nobody users 80 Sep 19 07:08 xbmc/ Quote Link to comment
ironicbadger Posted February 15, 2014 Author Share Posted February 15, 2014 Stop. Think for a second. You are trying to mount, on 'debcloud' your unRAID shares yes? So where do you think the mount points need to reside? Hint: they already exist on unRAID. Quote Link to comment
MrLondon Posted February 15, 2014 Share Posted February 15, 2014 I think I am really a n00b here, but I now changed it to the way you had it, still not working, in your example I assume that you created a share called Media, like I did with series,movies, music, hence why I followed this in this way. root@debcloud:/home/owncloud# nano /etc/fstab GNU nano 2.2.6 File: /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/xvda1 during installation UUID=33f9e32c-94b3-42a4-8628-aeca49f7b5c3 / ext4 errors=remoun$ 192.168.0.6:/mnt/user/series /mnt/unraid nfs rw,rsize=4096,wsize=4096,ha$ 192.168.0.6:/mnt/user/movies /mnt/unraid nfs rw,rsize=4096,wsize=4096,ha$ 192.168.0.6:/mnt/user/music /mnt/unraid nfs rw,rsize=4096,wsize=4096,ha$ //192.168.0.6/vincent /mnt/unraid cifs rw,guest,uid=owncloud,iocha$ [ Wrote 15 lines ] root@debcloud:/home/owncloud# mkdir /mnt/unraid root@debcloud:/home/owncloud# mount -a mount: wrong fs type, bad option, bad superblock on 192.168.0.6:/mnt/user/series, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so mount: wrong fs type, bad option, bad superblock on 192.168.0.6:/mnt/user/movies, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so mount: wrong fs type, bad option, bad superblock on 192.168.0.6:/mnt/user/music, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program) In some cases useful info is found in syslog - try dmesg | tail or so mount error(22): Invalid argument Refer to the mount.cifs( manual page (e.g. man mount.cifs) root@debcloud:/home/owncloud# Quote Link to comment
ironicbadger Posted February 15, 2014 Author Share Posted February 15, 2014 mount: mount point /mnt/series does not exist mount: mount point /mnt/movies does not exist mount: mount point /mnt/music does not exist What do you think these errors mean? Yes that's right, the mount point does not exist! How do you fix it? You create the mount point... mkdir /mnt/series mkdir /mnt/movies mkdir /mnt/music You need one mount point PER SHARE. I gave you the commands up above dude!!!! https://wiki.debian.org/fstab Your old fstab was fine, it was that there was nowhere for the system to mount unraid too. edit: I suppose I should make it crystal clear, you run these commands on debcloud not on unraid. Quote Link to comment
HAVOC Posted February 15, 2014 Share Posted February 15, 2014 I'm a noob but maybe try powerdown the VM, I noticed that a restart cause the fstab to become active. Give it a shot before moving on. Quote Link to comment
ironicbadger Posted February 15, 2014 Author Share Posted February 15, 2014 I'm a noob but maybe try powerdown the VM, I noticed that a restart cause the fstab to become active. Give it a shot before moving on. The fstab has to be right first (which it was) and not have multiple things trying to mount the same /mnt/unraid point. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.