[DOCKER] ownCloud is here!


Recommended Posts

I figured it out!

 

I had to edit my config file like this:

 

<?php
$CONFIG = array (
  'instanceid' => 'ocuekrcaa4fc',
  'passwordsalt' => 'HCr3qy2TU7HDop3lWG0DHImBmSZ87p',
  'secret' => 'U4Uf5U6GjoUeqQDs03QR0r1NkzBW0vTBCD8dV6DhOQ7KfKxi',
  'trusted_domains' => 
  array (
    0 => '192.168.1.169:8000',
    1 => 'example.dyndns.org'

  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwrite.cli.url' => 'https://www.example.dyndns.org:8000',
  'dbtype' => 'sqlite3',
  'version' => '8.2.2.2',
  'logtimezone' => 'UTC',
  'installed' => true,
);

 

the overwrite.cli.url was pointing to the local ip, wich isn't availlable from externally.

 

sorry if this is a dumb problem, I'm not a pc or linux crack...

 

Thanks!

Link to comment

I was just wondering, how can I with this app pont that the cloud data shall be on another location than appdata?

I dont want to have the config files and user data on same place.

 

edit: found out of it :)

But, will this be updated for owncloud 9, or is it an reason why the package runs 8.2.2?

Link to comment

Hi,

 

I just reinstalled my owncloud container because I want to try using it with mariadb.

Unfortunately I can't connect to the webUI anymore.

 

In the log it says:

No pre-existing certificate found, generating a new one with subject:

/C=US/ST=CA/L=City/O=Organization/OU=Organization Unit/CN=yourhome.com

fix_config.php

server.key

server.pem

Creating DH Parameters File.

 

I read somewhere that I need to create new server.key and server.pem files but I don't really know how to do this and if I need to change the environment variables in the docker advanced view tab or something.

 

Can someone help me out please?

 

I reinstalled my owncloud because I wanted to try mariaDB myself.

I simply backedup my files on another computer. Then I deleted everything and started over. When you see the "Creating DH Parameters File" just relax and wait, for me it took about 15 minutes to get past that and I got good performance in my server. :)

 

it's working now, thank you.

Well at least the webUI is loading  ;)

 

When I try to access my mariadb database I get the following error

"Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'Marv'@'172.17.42.1' (using password: YES)"

 

I followed the steps described by cirkator and replaced "localhost" with my unraids ip adress.

I also used HeidSQL to create the database so I don't really know where I made a mistake.

 

Is there anything I may have forgotten what is not described by cirkator maybe?

Please help a noob :)

Link to comment

Hi,

 

I just reinstalled my owncloud container because I want to try using it with mariadb.

Unfortunately I can't connect to the webUI anymore.

 

In the log it says:

No pre-existing certificate found, generating a new one with subject:

/C=US/ST=CA/L=City/O=Organization/OU=Organization Unit/CN=yourhome.com

fix_config.php

server.key

server.pem

Creating DH Parameters File.

 

I read somewhere that I need to create new server.key and server.pem files but I don't really know how to do this and if I need to change the environment variables in the docker advanced view tab or something.

 

Can someone help me out please?

 

I reinstalled my owncloud because I wanted to try mariaDB myself.

I simply backedup my files on another computer. Then I deleted everything and started over. When you see the "Creating DH Parameters File" just relax and wait, for me it took about 15 minutes to get past that and I got good performance in my server. :)

 

it's working now, thank you.

Well at least the webUI is loading  ;)

 

When I try to access my mariadb database I get the following error

"Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'Marv'@'172.17.42.1' (using password: YES)"

 

I followed the steps described by cirkator and replaced "localhost" with my unraids ip adress.

I also used HeidSQL to create the database so I don't really know where I made a mistake.

 

Is there anything I may have forgotten what is not described by cirkator maybe?

Please help a noob :)

 

Hmmm, yeah I remember I had problems too. But I found this guys quote, enjoy!

http://lime-technology.com/forum/index.php?topic=35052.msg455964#msg455964

Link to comment

I am trying to edit the owncloud config.php in order to do basic setup (adding a trusted domain.  I cannot seem to edit it.  Can anybody share how you edited the config.php?  I can do it via unraid or windows 7.  I installed the config at mnt/user/apps/owncloud/config

 

 

Thanks

Link to comment

Hi,

 

I just reinstalled my owncloud container because I want to try using it with mariadb.

Unfortunately I can't connect to the webUI anymore.

 

In the log it says:

No pre-existing certificate found, generating a new one with subject:

/C=US/ST=CA/L=City/O=Organization/OU=Organization Unit/CN=yourhome.com

fix_config.php

server.key

server.pem

Creating DH Parameters File.

 

I read somewhere that I need to create new server.key and server.pem files but I don't really know how to do this and if I need to change the environment variables in the docker advanced view tab or something.

 

Can someone help me out please?

 

I reinstalled my owncloud because I wanted to try mariaDB myself.

I simply backedup my files on another computer. Then I deleted everything and started over. When you see the "Creating DH Parameters File" just relax and wait, for me it took about 15 minutes to get past that and I got good performance in my server. :)

 

it's working now, thank you.

Well at least the webUI is loading  ;)

 

When I try to access my mariadb database I get the following error

"Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'Marv'@'172.17.42.1' (using password: YES)"

 

I followed the steps described by cirkator and replaced "localhost" with my unraids ip adress.

I also used HeidSQL to create the database so I don't really know where I made a mistake.

 

Is there anything I may have forgotten what is not described by cirkator maybe?

Please help a noob :)

 

Hmmm, yeah I remember I had problems too. But I found this guys quote, enjoy!

http://lime-technology.com/forum/index.php?topic=35052.msg455964#msg455964

 

Hm, thanks for help but I don't see any difference to the HeidiSQL instructions except that MySQLWorkbench is used.

Did you receive the same error as me and do you also use HeidiSQL?

Link to comment

I am trying to edit the owncloud config.php in order to do basic setup (adding a trusted domain.  I cannot seem to edit it.  Can anybody share how you edited the config.php?  I can do it via unraid or windows 7.  I installed the config at mnt/user/apps/owncloud/config

 

 

Thanks

 

I am getting this error "You are accessing the server from an untrusted domain.".  I have searched this and ssh'd to unraid.  I looked at the config.php.  I am attaching the screenshot (I dont see anything wrong with it) of the config.php.  Can you please look at it and let me know if you see why I am getting the error.

 

Thanks

Bill

owncloud_config.PNG.ed974784292007b831faf74dbe9b4ea6.PNG

Link to comment

hunter69: You add the server address to the part after 0 => :)

Remeber it need to have the same ` around it as the one that is there and the port

 

my server address is 192.168.2.97:8000.  When I got the error initially I hit the button the add it as a same domain but it has never moved past the error.  Ideas or do you see an issue in the config?

 

Thanks again for taking the time to help.  I really appreciate it

 

Bill

Link to comment

hunter69: You add the server address to the part after 0 => :)

Remeber it need to have the same ` around it as the one that is there and the port

 

my server address is 192.168.2.97:8000.  When I got the error initially I hit the button the add it as a same domain but it has never moved past the error.  Ideas or do you see an issue in the config?

 

Thanks again for taking the time to help.  I really appreciate it

 

Bill

 

I am attaching the error that I see and the etire screenshot of the config.  I have stopped and restarted owncloud.  Ideas?  This is a virtual unraid server.  The error clearing indicates it wants it's own IP but the ESXI Server that it is on is 192.168.2.254.  Would that have anything to do with it?

owncloud_error.PNG.1ee60830bd3bbda37289db4758645af4.PNG

owncloud_config1.PNG.eb6532587763986f9fb49aef30a17c66.PNG

Link to comment

 

it's working now, thank you.

Well at least the webUI is loading  ;)

 

When I try to access my mariadb database I get the following error

"Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'Marv'@'172.17.42.1' (using password: YES)"

 

I followed the steps described by cirkator and replaced "localhost" with my unraids ip adress.

I also used HeidSQL to create the database so I don't really know where I made a mistake.

 

Is there anything I may have forgotten what is not described by cirkator maybe?

Please help a noob :)

 

Hmmm, yeah I remember I had problems too. But I found this guys quote, enjoy!

http://lime-technology.com/forum/index.php?topic=35052.msg455964#msg455964

 

Hm, thanks for help but I don't see any difference to the HeidiSQL instructions except that MySQLWorkbench is used.

Did you receive the same error as me and do you also use HeidiSQL?

 

still can't get this to work. Did anyone has this issue aswell and solved it?

Link to comment

hunter69: You add the server address to the part after 0 => :)

Remeber it need to have the same ` around it as the one that is there and the port

 

my server address is 192.168.2.97:8000.  When I got the error initially I hit the button the add it as a same domain but it has never moved past the error.  Ideas or do you see an issue in the config?

 

Thanks again for taking the time to help.  I really appreciate it

 

Bill

 

I am attaching the error that I see and the etire screenshot of the config.  I have stopped and restarted owncloud.  Ideas?  This is a virtual unraid server.  The error clearing indicates it wants it's own IP but the ESXI Server that it is on is 192.168.2.254.  Would that have anything to do with it?

 

I ended up fixing this error by changing the trusted domain from 192.168.2.97:8000 to 192.168.2.97.  That's it that fixed my issue

 

Thanks to all those that took the time to respond and help.

Link to comment

just be patient. I had the same problem. It took some time for me aswell until it started.

 

 

 

it's working now, thank you.

Well at least the webUI is loading  ;)

 

When I try to access my mariadb database I get the following error

"Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'Marv'@'172.17.42.1' (using password: YES)"

 

I followed the steps described by cirkator and replaced "localhost" with my unraids ip adress.

I also used HeidSQL to create the database so I don't really know where I made a mistake.

 

Is there anything I may have forgotten what is not described by cirkator maybe?

Please help a noob :)

 

Hmmm, yeah I remember I had problems too. But I found this guys quote, enjoy!

http://lime-technology.com/forum/index.php?topic=35052.msg455964#msg455964

 

Hm, thanks for help but I don't see any difference to the HeidiSQL instructions except that MySQLWorkbench is used.

Did you receive the same error as me and do you also use HeidiSQL?

 

still can't get this to work. Did anyone has this issue aswell and solved it?

 

I finally solved it. I had to put a % in "from host" instead of using my local LAN in HeidiSQL

But I don't know really why I have to do this because as I understand this it should work the other way aswell!?  :o

Link to comment

I have another question regarding the volume mappings.

 

Is it possible to add another mapping just for the user files so that I have for example

/var/www/owncloud/data >> /mnt/cache/appdata/owncloud

and another one like /user >> /mnt/user/owncloud

 

Is this possible somehow?

Because I'd like to have the appdata folder on my cache as I have with all other containers but the user files on my array for protection.

How do other people handle this?

Link to comment

Yes, I have done that. :)

You edit the docker with ownload and adds an line of Volume Mappings

excample, I have mapped /var/www/owncloud/userdata to /mnt/user/ownclouddata/

Then setting up owncloud for the first time, I entered /var/www/owncloud/ for where the userdata should be, instead of the default value

Link to comment

After a long persistent night, I finally got it. There seems to be a bug with logging out though which causes it to become server.com/owncloud/owncloud and you need to change base.php but, since I don't have access to that in the docker, I had to use a hackish solution and there probably is a better way to do it. Here is the code:

 

config.php

 

<?php
$CONFIG = array (
  'overwrite.cli.url' => 'https://server.com/owncloud',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'instanceid' => 'INSTANCE',
  'passwordsalt' => 'SALT',
  'secret' => 'SECRET',
  'trusted_domains' => 
  array (
    0 => 'ip',
    1 => 'server.com',
  ),
  'trusted_proxies'   => ['proxy_ip'],
  'overwritehost'     => 'server.com',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/owncloud',
  'datadirectory' => '/data',
  'dbtype' => 'mysql',
  'version' => '8.2.2.2',
  'dbname' => 'owncloud',
  'dbhost' => '192.168.1.185',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'dbuser',
  'dbpassword' => 'dbpassword',
  'logtimezone' => 'EST',
  'installed' => true,
);

 

nginx

 

location /owncloud {
	 rewrite /owncloud/(.*) /$1 break;
	 rewrite ^/owncloud$ /owncloud/ permanent;
	 proxy_pass https://owncloud_ip:8000/;
	 proxy_redirect / /owncloud/;
	 proxy_set_header Host $host;
	 proxy_buffering off;
	 location /owncloud/owncloud {
		return 301 https://server.com/owncloud;
   }
}

 

I am pretty new to nginx.  Can you provide the path and file name that you are editing to add the above code.

 

Thanks for any help

Link to comment

I currently am in the process of setting up owncloud behind a reverse proxy.  My Goals are to access owncloud through a reverse proxy via a ssl connection.  Here is what I have working:

 

I am running the Apache container from linuxserver.io.

 

I own my own domain and have a functioning ssl certificate for my domain.

 

I have ssl connection to the Apache server from the lan and the web.

 

I have owncloud running on my Lan.

 

1.  Now what do I need to change in the Apache server to access owncloud through the reverse proxy?

 

2.  I can access  my apache server through a link like this https://domain.com.  In order to access owncloud from the web through the reverse proxy will I need to create a subdomain example https://subdomain.domain.com?  If I am incorrect, once the changes are made in apache, how do I access owncloud via the web?

 

Thanks

Bill

Link to comment

 

I am pretty new to nginx.  Can you provide the path and file name that you are editing to add the above code.

 

Thanks for any help

 

I can only post my config for nginx:

 

server {
  server_name example.com;
  listen 443 ssl;

  ### Set Certificates ###
  ssl_certificate /etc/nginx/certs/bundle.crt;
  ssl_certificate_key /etc/nginx/certs/startssl_dec.key;

  ### Add Diffie–Hellman key exchange ###
  ssl_dhparam /etc/nginx/certs/dhparam.pem;

  ### Disable SSL by enforcing TLS ###
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

  ### Add some ciphers and reject weaker ones ###
  ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
  ssl_prefer_server_ciphers on;

  ssl_session_cache shared:SSL:10m;
  
  ### Add HTTP Strict Transport Security ###
  add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
  add_header Front-End-Https on;

  client_max_body_size 0m;
  fastcgi_buffers 64 4K;

  location /owncloud/ {
    ### Proxy Pass Info ###
    proxy_pass https://192.168.0.100:8000/; 

    ### Set headers ###
    proxy_set_header Accept-Encoding "";
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    ### Set timeouts ###
    proxy_read_timeout 600s;
    proxy_send_timeout 600s;
    proxy_connect_timeout 600s;
  }

  location /couch/ {
    proxy_pass http://192.168.0.100:5050/couch/;
  }

  location /nzbget/ {
    proxy_pass http://192.168.0.100:6789/;
  }

  location /sonarr/ {
    proxy_pass http://192.168.0.100:8989/sonarr/;
  }
  
  location /crashplan/ {
    rewrite  ^/crashplan/$  /crashplan/vnc.html?autoconnect=true&host=$server_name/crashplan/&port=443  permanent;
    proxy_pass http://192.168.0.100:4280/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }

  rewrite ^(/dav/)(.*)$ /oc/remote.php/webdav/$2 permanent;
}

 

And my ownCloud config:

 

  'overwritehost' => 'example.com',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/owncloud',
  'overwrite.cli.url' => '/owncloud',

Link to comment

gfjardim, you seem to be the expert in setting up a reverse proxy. I have installed the owncloud docker from Bungy and the letsencrypt/nginx docker from Aptalca. Where is the best place on the forum to get advise in setting up a secure connection to owncloud via nginx? I have both dockers up and running (landing page in letsencrypt) but  https://192.1.1.100:8000 isn't working. Should I open s separate thread?

Link to comment

gfjardim, you seem to be the expert in setting up a reverse proxy. I have installed the owncloud docker from Bungy and the letsencrypt/nginx docker from Aptalca. Where is the best place on the forum to get advise in setting up a secure connection to owncloud via nginx? I have both dockers up and running (landing page in letsencrypt) but  https://192.1.1.100:8000 isn't working. Should I open s separate thread?

 

I also love to know how to secure owncloude with nginx  8)  :D

 

//Peter

Link to comment

peter_sm, maybe as a starting point. Here is what I was trying:

 

/nginx/site-confs/default:

server {
       server_name example.myfritz.net;
        listen 443 ssl;

        root /config/www;
        index index.html index.htm index.php;

        ssl_certificate /config/keys/fullchain.pem;
        ssl_certificate_key /config/keys/privkey.pem;
        ssl_dhparam /config/nginx/dhparams.pem;
        ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-G$
        ssl_prefer_server_ciphers on;
        ssl_session_cache shared:SSL:10m;

        client_max_body_size 0;
        fastcgi_buffers 64 4K;

        add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
        add_header Front-End-Https on;

        location / {
              try_files $uri $uri/ /index.html /index.php?$args =404;
        }

        location ~ \.php$ {
              fastcgi_split_path_info ^(.+\.php)(/.+)$;
              # With php5-cgi alone:
              fastcgi_pass 127.0.0.1:9000;
              # With php5-fpm:
              #fastcgi_pass unix:/var/run/php5-fpm.sock;
              fastcgi_index index.php;
              include /etc/nginx/fastcgi_params;
        }

        location /owncloud/ {
              proxy_pass https://192.1.1.100:8000/;
              proxy_set_header Accept-Encoding "";
              proxy_set_header Host $host;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_read_timeout 600s;
              proxy_send_timeout 600s;
              proxy_connect_timeout 600s;
        }
        rewrite ^(/dav/)(.*)$ /oc/config/remote.php/webdav/$2 permanent;
}

 

nginx.conf:

user nobody users;                                                                                                                  
worker_processes 4;                                                                                                                 
pid /run/nginx.pid;                                                                                                                 
                                                                                                                                    
events {                                                                                                                            
        worker_connections 768;                                                                                                     
        # multi_accept on;                                                                                                          
}                                                                                                                                   
                                                                                                                                    
http {                                                                                                                              
                                                                                                                                    
        sendfile on;                                                                                                                
        tcp_nopush on;                                                                                                              
        tcp_nodelay on;                                                                                                             
        keepalive_timeout 65;                                                                                                       
        types_hash_max_size 2048;                                                                                                   
        # server_tokens off;                                                                                                        
                                                                                                                                    
        # server_names_hash_bucket_size 64;                                                                                         
        # server_name_in_redirect off;                                                                                              
                                                                                                                                    
        client_max_body_size 0;                                                                                                     
                                                                                                                                    
        include /etc/nginx/mime.types;                                                                                              
        default_type application/octet-stream;                                                                                      
                                                                                                                                                                                                                                                                       
        access_log /config/log/nginx/access.log;                                                                                    
        error_log /config/log/nginx/error.log;                                                                                      
                                                                                                                                    
        gzip on;                                                                                                                    
        gzip_disable "msie6";                                                                                                       
                                                                                                                                    
        # gzip_vary on;                                                                                                             
        # gzip_proxied any;                                                                                                         
        # gzip_comp_level 6;                                                                                                        
        # gzip_buffers 16 8k;                                                                                                       
        # gzip_http_version 1.1;                                                                                                    
        # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text
/javascript;                                                                                                                        
                                                                                                                                    
        include /etc/nginx/conf.d/*.conf;                                                                                           
        include /config/nginx/site-confs/*;                                                                                         
                                                                                                                                    
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;                                                                                        
        ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";                                                              
        ssl_prefer_server_ciphers on;                                                                                               
        ssl_session_cache shared:SSL:10m;                                                                                           
        add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";                                       
        add_header X-Frame-Options SAMEORIGIN;                                                                                      
        add_header X-Content-Type-Options nosniff;                                                                                  
        add_header X-XSS-Protection "1; mode=block";                                                                                
        add_header X-Robots-Tag none;                                                                                               
        ssl_stapling on; # Requires nginx >= 1.3.7                                                                                  
        ssl_stapling_verify on; # Requires nginx => 1.3.7                                                                           
                                                                                                                                    
} 

 

/oc/config/remote.php:

                                                                                                                                                                                   <?php
$CONFIG = array (
  'instanceid' => 'confidential',
  'passwordsalt' => 'confidential',
  'secret' => 'confidential',
  'trusted_domains' => 
  array (
    0 => '192.1.1.100',
  ),
  'datadirectory' => '/var/www/html/data',
  'overwritehost' => 'example.myfritz.net',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/owncloud',
  'overwrite.cli.url' => '/owncloud',
  'dbtype' => 'mysql',
  'version' => '9.0.0.19',
  'dbname' => 'oc',
  'dbhost' => '192.1.1.100',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_user',
  'dbpassword' => 'confidential',
  'logtimezone' => 'UTC',
  'installed' => true,
);

 

Would be great to know how to debug and which log to look at. Additionally: which files to be modified? I guess that .htaccess need to be modified as well?

 

But maybe someone can already let us know what I made wrong in any of the config files?  ::)

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.