OpenWrt Forum Archive

Topic: Please help Setting up Owncloud for the first time as a newbie

The content of this topic has been archived on 12 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello
I installed for the first time OpenWRT Chaos Calmer 15.05.1 on my Asus RT-N14u router and I`m trying to set up ownlcoud on it.

I`m trying to follow the guide  provided in the wiki section.


I managed to set up extroot on an USB device.
My next problem is that I don`t know how to configure the files.
The guide says to add a new u h  t t p d section in the /etc/config/u h t t p d file
I do not know how to do that.
I am able to see the content of the file by typing in  vi /etc/confi g/u h t t p d into Putty but the changes I make to it do not save.

How do I edit the u h t t p d and l i g h t t p d files?
PS: I had to add spaces in u h t t p d since without it it would not let me post.

Thank you.

(Last edited by hiveleader on 15 Aug 2017, 12:00)

do you know how to use vim?

http://tnerual.eriogerg.free.fr/vim.html

btw. don't expect owncloud to run fast on a router, maybe use a raspberry pi or something like that

(Last edited by rj-45 on 15 Aug 2017, 12:38)

Hello
I do not know how to use vim. It`s my first time trying this.
It does not matter that it`s slow. I just want to make it work.

than, this is a good opportunity :-D

Install the nano editor package, that is what I use to edit config files.  It is pretty self-explanatory.

Also you don't need to extroot to run a file server, you can mount your drive as a data directory within the existing root FS.

(Last edited by mk24 on 15 Aug 2017, 13:45)

I managed to modify the file but I get the following error:
2017-08-15 13:24:07: (plugin.c.183) Cannot load plugin mod_access more than once, please fix your config (ligh t tpd may not accept such configs in future releases)
2017-08-15 13:24:07: (plugin.c.183) Cannot load plugin mod_cgi more than once, please fix your config (light t pd may not accept such configs in future releases)
Please note that I had to add some space for words like h t t p because it would not let me post it otherwise.

server.modules = (
        "mod_access",
        "mod_cgi"
)

server.document-root        = "/w w w/ownclowd"
server.upload-dirs          = ( "/tmp" )
server.errorlog             = "/var/log/ligh t t pd/error.log"
server.pid-file             = "/var/run/ligh t t p d.pid"
server.username             = "h t t p"
server.groupname            = "w w w-data"

index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm",
                                "index.ligh t t p d.html" )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

### Options that are useful but not always necessary:
#server.chroot               = "/"
#server.port                 = 80
#server.bind                 = "localhost"
#server.tag                  = "light t p d"
#server.errorlog-use-syslog  = "enable"
#server.network-backend      = "write"

### Use IPv6 if available
#include_shell "/usr/share/ligh t t p d/use-ipv6.pl"

#dir-listing.encoding        = "utf-8"
#server.dir-listing          = "enable"

include       "/etc/ligh t t p d/mime.conf"
include_shell "cat /etc/ligh t t p d/conf.d/*.conf"

$H T T P["url"] =~ "^/data/" {
        url.access-deny = ("")
}
$H T T P["url"] =~ "^($|/)" {
        dir-listing.activate = "disable"
}
$SERVER["socket"] == ":81" {
        server.document-root = "/w w w"
        cgi.assign = ("luci" => "/usr/bin/lua")
}

~
~
~
~
~
~
~
~
~
~
~
~
- /etc/ligh t t p d/ligh t t p d.conf 1/46 2%

(Last edited by hiveleader on 15 Aug 2017, 14:35)

Use [c o d e] ... [/ c o d e] tags (without spaces) to post code to the forum without being censored.  Should end up looking like this:

http://

One of the files you're including probably tries to load the cgi module again.

(Last edited by mk24 on 15 Aug 2017, 14:11)

Yes but which one?
I copied all of this from the wiki guide.

@hiveleader: You are well aware of the performance of owncloud on routerlike devices?


Citing from https://wiki.openwrt.org/doc/howto/owncloud:

Hint: I've installed OwnCloud on an TP-Link TL-WR2543ND, using lighttpd and sorry, it's dead slow! :-(

— unknown

I've also installed it on a more powerful TP_Link TL-WDR3500 but it's still very slow, 4-5 secs per page…

— motherjoker 2014/06/05 15:41

du bist der zweite der ihm drauf hingewiesen hat. :-D

Yes guys I am aware that it is very slow. It does not matter to me.

server.modules = (
        "mod_access",
        "mod_cgi"
)

maybe change this to:

server.modules = (
        "mod_access"
)

I`ve added this ,,#"and it seems that there are no more errors.

server.modules = (
#    "mod_access",
#    "mod_fastcgi",
#    "mod_cgi"
)

My next hurdle is that this is not available anymore:
wget h t t p://mirrors.owncloud.org/release/ownclound-10.0.2.tar.bz2
Probably the mirrors are not active anymore. I`ve replaced  the ,,owncloud-X.X.X.tar.bz2" with the last version available. I also tried leaving it as is.

have you tried  looking at the owncloud homepage to get the file?

btw,  why do you want to run owncloud on your router?

(Last edited by rj-45 on 15 Aug 2017, 19:23)

I can download the file directly from owncloud but I don`t know how to install it.
As to why I never tried anything like this and I wanted to do it.

Maybe you should not try to ask OpenWRT forum where Owncloud sources are but ask the Owncloud guys about their sources?

https://owncloud.org/install/#edition
Chances are you want to download some of that.

But seriously. If you don't know your way around vi and have no clue about basic linux configuration, at least don't try to expose that Owncloud to public WAN but make it available only in your private LAN. Its one thing to have a cheap VPS being part of some bot net because you got that hacked due bad software maintenance. The worst thing that can happen is your provider shut it down. But its a completely different thing to have the very router of your private network being hacked and therefore not being trustworthy any longer.

Regards,
Stephan.

How about you try to install owncloud in a virtual machine, use virtualbox or something like that?

Yeah this is too much for a beginner. Maybe I`ll revisit this someday when I am a little bit more knowledgeable.

rj-45 wrote:

How about you try to install owncloud in a virtual machine, use virtualbox or something like that?

Yes I would second that.  They have some pre-made virtual images that should be load and go on any recent desktop or big laptop machine. It seems to need desktop level hardware to run at a reasonable speed anyway.

The discussion might have continued from here.