[DOCKER] ownCloud is here!


Recommended Posts

Scrap that, it eventually booted up.. Took a good 30 minutes or so though, not sure why!

 

I'm up and running except the only issue I have is accessing this externally. I know security risks etc.

 

I can access it internally no problem, and externally I have setup duckDNS to forward to my router and port forwarded this to the ownCloud docker. I tested with my other dockers and it works perfectly, however owncloud gives me a connection refused.

 

In the config i have tested the following

 

Router IP

DuckDNS address

Custom domain address that points to duckDNS

 

and none of them work, is there something i'm missing here?

Do you get a page about "Trusted domain"?

Link to comment

<?php

$CONFIG = array (

  'instanceid' => 'Don't need to know this.',

  'passwordsalt' => 'Don't need to know this..',

  'secret' => 'Don't need to know this.',

  'trusted_domains' =>

  array (

    0 => '192.168.1.13:8000',

    1 => '192.168.1.254:8000',

    2 => 'cloud.blah.com:8000',

    3 => 'cloud.blah.com',

    4 => 'blah.duckdns.org:8000'

 

  ),

  'datadirectory' => '/var/www/owncloud/data',

  'overwrite.cli.url' => 'https://192.168.1.13:8000',

  'dbtype' => 'sqlite3',

  'version' => '8.1.4.2',

  'logtimezone' => 'UTC',

  'installed' => true,

  'mail_smtpmode' => 'smtp',

  'mail_from_address' => '',

  'mail_domain' => '',

  'mail_smtpauth' => 1,

  'mail_smtphost' => 'smtp-mail.outlook.com',

  'mail_smtpport' => '25',

  'mail_smtpname' => '',

  'mail_smtppassword' => '',

  'mail_smtpsecure' => 'tls',

  'forcessl => true',

);

Link to comment

Your config.php isn't quite the same as the one I posted....

 

 

 

$CONFIG = array (
  'instanceid' => 'INSTANCEID',
  'passwordsalt' => 'PASSWORD',
  'secret' => 'SECRET',
  'trusted_domains' => 
  array (
    0 => '192.168.0.1',
    1 => 'server.com',
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwritewebroot' => '/owncloud',
  'overwrite.cli.url' => 'https://server.com',
  'overwritehost' => 'server.com',
  'overwriteprotocol' => 'https',
  'dbtype' => 'mysql',
  'version' => '8.0.3.4',
  'dbname' => 'owncloud',
  'dbhost' => '192.168.0.1',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_USER',
  'dbpassword' => 'PASSWORD',
  'installed' => true,
  'forcessl' => true,
  'forceSSLforSubdomains' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',

 

 

Hey CHBMB! Thanks for reply, but I am afraid I has the config just like yours? I have checked multiple times now... I can't see anything strange. Can you check once too please?

Here's my config below:

<?php
$CONFIG = array (
  'instanceid' => 'INSTANCEID',
  'passwordsalt' => 'PASSWORDALT',
  'secret' => 'SECRET',
  'trusted_domains' => 
  array (
    0 => '192.168.1.8',
1 => 'untrue',
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwritewebroot' => '/owncloud',
  'overwrite.cli.url' => 'https://untrue',
  'overwritehost' => 'untrue',
  'overwriteprotocol' => 'https',
  'forcessl' => true,
  'forceSSLforSubdomains' => true,
  'dbtype' => 'mysql',
  'version' => '8.2.1.4',
  'dbname' => 'owncloud',
  'dbhost' => 'MYDBHOST',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'USERNAME',
  'dbpassword' => 'PASSWORD',
  'logtimezone' => 'UTC',
  'installed' => true,
  'loglevel' => 2,
  'maintenance' => false,
  'trashbin_retention_obligation' => 'auto',
);

 

Censored the sensitive stuff.

Link to comment

Your config.php isn't quite the same as the one I posted....

 

 

 

$CONFIG = array (
  'instanceid' => 'INSTANCEID',
  'passwordsalt' => 'PASSWORD',
  'secret' => 'SECRET',
  'trusted_domains' => 
  array (
    0 => '192.168.0.1',
    1 => 'server.com',
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwritewebroot' => '/owncloud',
  'overwrite.cli.url' => 'https://server.com',
  'overwritehost' => 'server.com',
  'overwriteprotocol' => 'https',
  'dbtype' => 'mysql',
  'version' => '8.0.3.4',
  'dbname' => 'owncloud',
  'dbhost' => '192.168.0.1',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_USER',
  'dbpassword' => 'PASSWORD',
  'installed' => true,
  'forcessl' => true,
  'forceSSLforSubdomains' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',

 

 

Hey CHBMB! Thanks for reply, but I am afraid I has the config just like yours? I have checked multiple times now... I can't see anything strange. Can you check once too please?

Here's my config below:

<?php
$CONFIG = array (
  'instanceid' => 'INSTANCEID',
  'passwordsalt' => 'PASSWORDALT',
  'secret' => 'SECRET',
  'trusted_domains' => 
  array (
    0 => '192.168.1.8',
1 => 'untrue',
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwritewebroot' => '/owncloud',
  'overwrite.cli.url' => 'https://untrue',
  'overwritehost' => 'untrue',
  'overwriteprotocol' => 'https',
  'forcessl' => true,
  'forceSSLforSubdomains' => true,
  'dbtype' => 'mysql',
  'version' => '8.2.1.4',
  'dbname' => 'owncloud',
  'dbhost' => 'MYDBHOST',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'USERNAME',
  'dbpassword' => 'PASSWORD',
  'logtimezone' => 'UTC',
  'installed' => true,
  'loglevel' => 2,
  'maintenance' => false,
  'trashbin_retention_obligation' => 'auto',
);

 

Censored the sensitive stuff.

Post your default.conf from Apache then.  Screenshot showed a proxy error iirc...

Link to comment

I can't seem to access the the WebUI. I get a Connection refused and I've let the docker run for quite a long time. There is nothing in the logs past:

 

160118 12:48:21 mysqld_safe Logging to '/var/lib/mysql/96c0209c5475.err'.

160118 12:48:21 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

 

 

And the folders that are mounted are empty. I've tried restarting it multiple times but nothing seems to be happening.

Link to comment

When you update ownCloud using the admin webinterface, a zipped version backup is saved in the data folder. I've unzipped it and copied it inside the docker and everything started working again...

Then I've decided it's too complicated to redo this every change I'll edit the container, so started from scrach using the official ownCloud container.

I've mapped the complete /var/www/owncloud to an appdata folder for persistancy.

The only problem still not solved is editing the cron file...

 

Where is the official ownCloud container ?  and does that official runs the latest 8.2.2 owncloud?

I'm using https://hub.docker.com/_/owncloud/

And yes, it's running the latest 8.2.2.

Haven't used in-app update yet, so don't know how persistent it is.

I've mapped the whole /var/www/html to /mnt/cache/appdata/owncloud and added a mapping of /data:/mnt/user/ownCloud, pointing the installation wizard to save user files at /data instead of the default location of /var/wwww/html/data (if that makes any sense to you).

I've also installed the official Redis container (https://hub.docker.com/_/redis/) for memcache and file locking.

The only caveat I still have is cron jobs, but am using www.crondash.com for webcron.

Hope that helps

S

 

Ok I have it running on the Official Docker for Owncloud.

 

How did you use Redis? can you share screenshot of the Docker GUI page you have for Redis?  (edit the docker and show advanced).  thanks.

 

How are you getting the official docker installed? I am doing it through Dockerhub, and it seems to install okay, but it never works. The log file is empty and trying to access the webui just leads to a blank page

 

Edit: Argh, I'm giving up for the night.

 

The l3iggs container isn't capable of adding a local 'external storage'.

 

The gfjardim container works great unless you want to be up to date, in which case you end up breaking it.

 

And I can't get the official one working whatsoever. I figured it might be the config.php file, but using the ones from my previous working installs makes no difference to the official docker.

 

I'll take another stab at this tomorrow, but this has easily been the most frustrating docker/plugin experience I have had on unRaid yet.

 

Edit 2: I didn't give up, but im about to. I got it working with the command from spants, but then editing it doesn't seem possible within the gui. So i added it manually, which worked! Except for the icon. Despite giving the icon field http://i.imgur.com/EX4qL2V.png as a source, the icon stays a grey question mark, and is a completely broken link on the dashboard. I don't get it.

 

The docker seems to work, although I have not had a chance to put it through it's paces, and honestly, that icon thing might piss me off too much if i can't fix it. idk

Link to comment

Alright, I got the official container up and running. I think I was just too tired last night to approach this correctly.

 

Now to just figure out Redis and the Reverse proxy. I have DuckDNS all set up for other purposes, but the reverse proxy thing is entirely new to me.

 

It's pretty easy to be honest, except mine doesn't work for with external connections for some reason.. If you get it up and running i'd be intrigued as to your methods! Definitely agree this is a frustrating docker experience.

Link to comment

Post your default.conf from Apache then.  Screenshot showed a proxy error iirc...

 


<Location /owncloud>
	ProxyPass https://host:8000
	ProxyPassReverse https://host:8000
</Location>

</VirtualHost>

 

This is the Apache config I am using, and it's really strange since I haven't changed this in like the last 1-2 weeks and now I also suddenly get this error while I try to start apache:

* 
Action '-D FOREGROUND' failed.
The Apache error log may have more information.
* Stopping web server apache2

 

I have also attached my logs, thanks for helping me out, I have tried for hours figuring this out..

 

*Got apache to start now at least :D , the action -D foreground error was fixed by adding a new sslchainfile, somehow the .pem file I had was deleted ;o (deleted the logs)*

 

AND I got the double /owncloud to work now also :D Don't know what was wrong but I tried to replace all my config files in booth owncloud and apache and now it all works like a charm :D Thanks CHBMB anyway!

Link to comment
  • 3 weeks later...

This may be a simple question, but I cannot find an answer elsewhere. I am currently running owncloud on one of my two unRaid servers and want to "play" with it on a second one. If I install it, I think that I have to use the same port - 8000. I want both servers to have internet access. If on the outside port 8000 is opened, how can I redirect to a particular server? Can I use a different outside port for the second server?

Link to comment

After installing own cloud all running but unable to view the webpage all i get is

 

This site can’t be reached

 

192.168.1.6 refused to connect.

ERR_CONNECTION_REFUSED

 

even port change dont help , i wana make website accessible outside of my network aswell i have same issue with binhex-delugevpn , only plex seems to have working webpage (plugin) but docker apps dont work with web pages hope im not the only one who has had this issue

Link to comment

After installing own cloud all running but unable to view the webpage all i get is

 

This site can’t be reached

 

192.168.1.6 refused to connect.

ERR_CONNECTION_REFUSED

 

even port change dont help , i wana make website accessible outside of my network aswell i have same issue with binhex-delugevpn , only plex seems to have working webpage (plugin) but docker apps dont work with web pages hope im not the only one who has had this issue

 

Im having the same issue on a clean install. Not sure how to get around it.

Link to comment

I just read the whole thread and missed anything conclusive on how to setup your Owncloud to be able to access other folders.  I tried using a symbolic link and that didn't seem to work.

 

Files have to be added to ownCloud through the gui.  ownCloud keeps a database of the files added and deleted.  You can't just point to a folder and expect ownCloud to incorporate those in the database.

 

 

If I understand the issue correctly you CAN access exisiting folders .....

 

I access my entire Array full of exisiting files through ownCloud by just adding the relevant folder as "External Storage" under the admin user section.

 

This assumes your unRAID share you want to appear and be available in ownCloud has SMB protocol enabled and you have an ownCloud user already setup to allocate access to this to:

 

1. Login as Admin.

2. On the user menu (top left hand corner) drop down the menu and click "Admin"

3. On the 3rd section down "external storage" give the folder a name (e.g. nas) and under the drop down menu select "SMB / CIFS".

4. After the new line appears fill in the appropriate details as requested (e.g. Host = just the dns name of your box, Userid and Password = self explanatory if you have security enabled, Share = share name in unRAID, Remote Subfolder = blank, Available For = name of the user (yourself I guess) that you setup who you want to have access to this unRAID share).

 

Boom Done. You'll get a green dot next to the Folder Name when it is setup correctly. This is the little test ownCloud does to ensure it can access the "External Storage".

 

It is also worth noting that while it is technically external given that you are accessing it over a "share" given everything is on the same box the speed is lightening as it is local really.

 

Now log out of admin. Log into the user you have just given access to and now you can see your share as if it was another folder and you can interact with your files at will.

 

Please note - be careful when doing this - especially if you share the root of your array. You are technically opening up your entire array to outside access (if enabled) and if someone gets access to your user id and or password and or a vulnerability becomes exploited in ownCloud which allows someone else to maliciously log on then someone can access all your data and do with it as they see fit.

 

Has anyone been able to get this method of accessing unraid files via owncloud? I'm having lots of trouble with it.

Link to comment

OK, so after letting it sit for a bit I tried again and now the WebUI is working.  Perhaps it had something to do with the install not finalizing the config or it was my router playing catchup.  All good here now :)

 

Yep, in the first time it launches, it generates a Diffie-Hellman parameters file, which takes several minutes to finish.

Link to comment

Update went fine, thanks a lot gfjardim. Contact App however is not showing any contact (but the groups and amount of contacts that should be available). My log is flooded with these messages:

NOTICE: ownCloud will now update.

ownCloud is already latest version

Update done, quitting.

NOTICE: ownCloud will now update.

ownCloud is already latest version

Update done, quitting.

Link to comment

Update went fine, thanks a lot gfjardim. Contact App however is not showing any contact (but the groups and amount of contacts that should be available). My log is flooded with these messages:

NOTICE: ownCloud will now update.

ownCloud is already latest version

Update done, quitting.

NOTICE: ownCloud will now update.

ownCloud is already latest version

Update done, quitting.

 

I received the same errors. it is checking for a path that doesn't exist.

Maybe gfjardim can update the docker to fix, otherwise you can just create the directory and it finishes what it needs to do:

 

 

docker exec -it ownCloud bash
mkdir /etc/service/occ_update

Link to comment

Long story short, I had an existing owncloud docker installed and working for the last year or so.  Today, I decided to wipe my docker.img file and start fresh.

 

Using mariadb as a backend.

 

I created the user and db in mariadb with mysql workbench as follows

 

CREATE USER 'owncloud'@'localhost' IDENTIFIED BY 'ThePasswordYouWant';

CREATE DATABASE IF NOT EXISTS owncloud;

GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'ThePasswordYouWant';

 

It returns successful and I can see the db and user.

 

Then I installed owncloud.  Owncloud installed fine and I can get to the web page at https://localhost:8000

 

data folder mapped from /var/www/owncloud/data/ in the container to /mnt/user/OWNCLOUD/data on the array

 

I select storage and database and select the mysql/mariadb option and enter the database id and credentials I used when setting it up.  I enter the admin account info that I want

 

I get this error: 

 

Failed to Connect to the database...  SQLSTATE[HY000] [2002] No such file or directory

 

I read on the owncloud site that this is could be a problem with permissions on the owncloud.db file in the data directory ( /var/www/owncloud/data/), so I chmod'ed it to 777 and then 755. 

 

Same error.

 

I've tried creating and using different databases and users with the same result.

 

The owncloud.log file in the data directory is empty.  I attached an image of the web page after the connection fails.

 

Does anyone have any suggestions?

 

Thank you!

 

 

 

own1.png.9b299fee14fb5df698a1c5a15a7a5b3b.png

Link to comment

Just wanted to post and issue that I had and resolved in case others have the same issue.

 

I am using this ownCloud docker along with the Linuxserver mariadb docker as the backend DB.  The issue I had was that when trying to connect to the DB to create the initial user, I would get the following error

 

'Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT.'

 

I found I could fix this by connecting to the DB and executing

SET GLOBAL binlog_format = 'MIXED';

but this fix would not persist if the DB docker restarted. 

 

I ended up modifying the mariadb dockers config file my.cnf.  I found the section under [mysqld] and added

binlog_format = mixed

  This change allowed it to persist if the DB docker gets restarted or updated.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.