Jump to content
linuxserver.io

[Support] Linuxserver.io - Nextcloud

2779 posts in this topic Last Reply

Recommended Posts

I have been trying to get nextcloud set up with a reverse proxy with the spaceinvader tutorial however when I do this I keep getting a '500 internal server error'  I take a look in the error.log and there is nothing there.  What could I be doing wrong?  

 

Here is my nextcloud.subdomain.conf:

# make sure that your dns has a cname set for nextcloud
# edit your nextcloud container's /config/www/nextcloud/config/config.php file and change the server address info as described
# at the end of the following article: https://blog.linuxserver.io/2017/05/10/installing-nextcloud-on-unraid-with-letsencrypt-reverse-proxy/

server {
    listen 443 ssl;
    
    server_name nextcloud.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_nextcloud nextcloud;
        proxy_max_temp_file_size 2048m;
        proxy_pass https://$upstream_nextcloud:443;
    }
}

Here is my config.php file:  I changed my url from what it actually is to test.:

 

 

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'oc5vpjwh780k',
  'passwordsalt' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  'secret' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  'trusted_domains' => 
  array (
    0 => '192.168.1.100:448',
    1 => 'nextcloud.test.com',
  ),
  'overwrite.cli.url' => 'https://nextcloud.test.com',
  'overwritehost' => 'nextcloud.test.com',
  'overwriteprotocol' => 'https',
  'dbtype' => 'mysql',
  'version' => '13.0.5.2',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.100:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'user',
  'dbpassword' => 'XXXXXXXXXXXXXXX',
  'installed' => true,
);

 

Share this post


Link to post
7 hours ago, mgranger said:

I have been trying to get nextcloud set up with a reverse proxy with the spaceinvader tutorial however when I do this I keep getting a '500 internal server error'  I take a look in the error.log and there is nothing there.  What could I be doing wrong?  

 

Good morning

 

Did you create the custom network as explained in the proxy-confs/_readme ?

Share this post


Link to post
3 hours ago, Gog said:

 

Good morning

 

Did you create the custom network as explained in the proxy-confs/_readme ?

 

No I did not but that seemed to fix it.  Thanks

Share this post


Link to post

Just curious about back ups for the nextcloud server. Not sure if this is the best place to post this but basically i want to be able to back up the full server, database and data to an external HDD. Whats the best way to do this? IS there another docker thats worth installing to do this automatically? 

Share this post


Link to post

Hi guys, 

 

has anyone tried to run preview generator on docker? Can you guide me please?

 

I have tried to create the variable path /config/www/nextcloud so i can run occ from docker exec but i get this error on container log: 

 

importas: fatal: unable to exec export: No such file or directory

 

Am i missing something? I would like to pre generate all the thumbnails so mobile nextcloud goes faster

Share this post


Link to post
11 minutes ago, master00 said:

Hi guys, 

 

has anyone tried to run preview generator on docker? Can you guide me please?

 

I have tried to create the variable path /config/www/nextcloud so i can run occ from docker exec but i get this error on container log: 

 

importas: fatal: unable to exec export: No such file or directory

 

Am i missing something? I would like to pre generate all the thumbnails so mobile nextcloud goes faster

 

Might be helpful if you told us what command you actually ran?

Share this post


Link to post

Hi.  I have a few questions about using Nextcloud, hope someone can clarify:

 

1. To use Nextcloud outside own internal network, you need Letsencrypt?

2.  I see all using NGINX with Letsencrypt.  I myself has gotten it to work, with lots of help from here.  Can Nextcloud/ Letsencrypt and Sophos XG Home Firewall work?  Anyone has any pointers?

 

Just a few things I'd like to share:  

Sophos XG has it's own DDNS server, e.g. xg.myfirewall.co-- this leads to my firewall.  It comes free.

I was told WAF is reverse proxy.  Sophos XG home firewall provides free subscription, including WAF.  It's because of this that I intend to use WAF to replace NGINX.  Hope to hear some feedback, or instructions.  I don't know whether to ask instructions here, or Sophos XG forum, Letsencrypt or even NGINX forum.  

Share this post


Link to post

Hi,

1.) no

2.) Can, yes. But i dont see the big gain to use letsentcrypt, btw you can still use your own ddns for nextcloud.. 

Edited by nuhll

Share this post


Link to post

@nuhll, thanks for the reply.  I need some further clarification.

 

1. There seems to be an error when I ran spreadsheet, word processing apps.  Isn't this because of lacking SSL certification?

 

Share this post


Link to post

EDIT: Fixed it, saw a post by bengele. I had to sudo chmod 644 custom.cnf and it started working again. Grrr. thanks bengele!

------------------------------------------------------------------------------------------------------

 

This was working fine forever but just noticed that I'm getting an Internal server error now.

 

the only thing i may have done is joined my unraid to a domain. I also went to tools/new permissions and fixed permissions after. Any help? Log is clean, I don't

have a clue what to even look for. I was able to initially get the login screen up, so I put in user/pass and then that's when I got the internal error page.

 

 

 

ls -lah /mnt/user

drwxrwxrwx+  1 nobody users  140 Nov  4  2017 Nextcloud/

 

Heres the error I get when going to nextcloud

Internal Server Error

The server was unable to complete your request.

If this happens again, please send the technical details below to the server administrator.

More details can be found in the server log.

 

From the docker LOG

 

Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 40-config: executing...
[cont-init.d] 40-config: exited 0.
[cont-init.d] 50-install: executing...
[cont-init.d] 50-install: exited 0.
[cont-init.d] 60-memcache: executing...
[cont-init.d] 60-memcache: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
usermod: no changes

Edited by ffhelllskjdje

Share this post


Link to post

I'm having a hard time adding my unRAID shares to nextcloud.  All of this is on my LAN.  I haven't attempted anything with reverse proxy yet.  I've enabled the 'external storage support' app. I just want to add my 'movies' share to nextcloud.

 

I get the error:

External mount error

There was an error with message: Empty response from the server. Do you want to review mount point config in admin settings page?

 

Can anyone please point me in the right direction?

Thank you.

 

ext.jpg

nextclouddocker.jpg

shares.jpg

Share this post


Link to post

Hi @DingHo,

I recall from having problems adding external SMB/CIFS shares a while back, that the "Domain" field is, or was, required.

From your screenshot you don't appear to have anything set there.

If you don't have an actual domain, use the Workgroup name used by windows on your network. Defaults to "WORKGROUP".

/Alan.

Edited by aleary

Share this post


Link to post
8 hours ago, DingHo said:

I'm having a hard time adding my unRAID shares to nextcloud.  All of this is on my LAN.  I haven't attempted anything with reverse proxy yet.  I've enabled the 'external storage support' app. I just want to add my 'movies' share to nextcloud.

 

I get the error:

External mount error

 

There was an error with message: Empty response from the server. Do you want to review mount point config in admin settings page?

 

Can anyone please point me in the right direction?

Thank you.

 

ext.jpg

nextclouddocker.jpg

shares.jpg

 

You can't use root as the user.

Share this post


Link to post
9 hours ago, DingHo said:

I'm having a hard time adding my unRAID shares to nextcloud.  All of this is on my LAN.  I haven't attempted anything with reverse proxy yet.  I've enabled the 'external storage support' app. I just want to add my 'movies' share to nextcloud.

 

I get the error:

External mount error

 

There was an error with message: Empty response from the server. Do you want to review mount point config in admin settings page?

 

Can anyone please point me in the right direction?

Thank you.

 

ext.jpg

nextclouddocker.jpg

shares.jpg

 

You can add a path /movies to /mnt/user/movies in your nextcloud docker config.

 

Then in your external storage config, set it up as a local storage with the path of /movies

Share this post


Link to post

@Gog

@aleary

@saarg

Thanks for you kind help.  I was able to get it working.  The 'WORKGROUP' was the key part for me, as I had tried multiple non-root users and mounted /movies in docker previously to no avail.

 

Thanks again.

Share this post


Link to post

While opening an odt file (with collabora installed), I encounter the following error.  Any ideas?

 

image.png.85d2f2c8c792b50068c56f4a79b44620.png 

 

I am accessing this from inside the network, and not from the internet.  Where can I find server log?  Inside nextcloud?  Or in docker logs?

Share this post


Link to post
On 8/22/2018 at 2:14 AM, jang430 said:

While opening an odt file (with collabora installed), I encounter the following error.  Any ideas?

 

image.png.85d2f2c8c792b50068c56f4a79b44620.png 

 

I am accessing this from inside the network, and not from the internet.  Where can I find server log?  Inside nextcloud?  Or in docker logs?

Had the same problem after doing a reverse proxy setup, had to tweak some settings here and there. Are you using Collabora docker like me? 

Share this post


Link to post
On 8/17/2018 at 5:03 PM, master00 said:

Hi guys, 

 

has anyone tried to run preview generator on docker? Can you guide me please?

 

I have tried to create the variable path /config/www/nextcloud so i can run occ from docker exec but i get this error on container log: 

 

importas: fatal: unable to exec export: No such file or directory

 

Am i missing something? I would like to pre generate all the thumbnails so mobile nextcloud goes faster

 

I would love preview generator to work, but haven't gotten it to work for me yet either. 

 

The command to run an occ command from docker console is:

 

# sudo -u abc php /config/www/nextcloud/occ yourcommand

if you get it to generate your previews for you, let me know how you did it!

 

 

Share this post


Link to post
35 minutes ago, lewispm said:

 

I would love preview generator to work, but haven't gotten it to work for me yet either. 

 

The command to run an occ command from docker console is:

 


# sudo -u abc php /config/www/nextcloud/occ yourcommand

if you get it to generate your previews for you, let me know how you did it!

 

 

 

ssh to your server
 

docker exec -it nextcloud bash

nano /config/php/php-local.ini

 

Add the line

memory_limit = 512M

Save with CTRL + X

 

Exit the docker container with

exit

Then

docker restart nextcloud

Then try again.

Share this post


Link to post
On ‎8‎/‎2‎/‎2018 at 9:33 PM, Jessie said:

Well it looks like I finally worked out what was going on with this slow nextcloud issue.

Looks like it was the router.  Swapped the system out with a pfsense router. 

Result pretty well instantaneous login.

Nothing under 25 to 30 secs after pressing the login button on the old router.

 

Just in case anyone was wondering.

More on this.

(Todo with slow nextcloud logins.)

One solution was to use a pfsense router.  Pure horsepower overcame the slow login.

If using a normal router I found enabling Bruteforce app, then going to settings and whitelisting the ip address of the router fixes it.

 

It seems that even if bruteforce is disabled, it still works in the background.

 

This method solved "No connection" errors on the client apps also.

 

 

Edited by Jessie

Share this post


Link to post
On 4/1/2017 at 7:58 PM, uldise said:

Just quoting myself - just got it up and running..

first, you can add Collabora docker from CA Applications with docker-hub search enabled. then just follow this instructions to see which ports/setting you need to add: https://www.collaboraoffice.com/code/

for me it works only on with separate sub-domains for Nextcloud and Collabora. e.g. at first i installed NextCloud at for example mydomain.com/nextcloud, and tried install collabora with similar sheme with no luck. then i moved Nextcloud to nextcloud.mydomain.com and Collabora to office.mydomain.com. You need to activate Nextcloud Collabora application and point to Collabora URL to bind them together.  And then everything looks like working as expected.    

Hi.  Just want to confirm.  I'm experiencing a problem that I cannot open/ edit spreadsheet, and word processing docs.  I believe Collabora requires SSL?  I was able to install Collabora inside my Nextcloud.  Do I need to install Collabora Docker also?  Is this what this step is about?  Thanks!

Share this post


Link to post
2 hours ago, jang430 said:

Hi.  Just want to confirm.  I'm experiencing a problem that I cannot open/ edit spreadsheet, and word processing docs.  I believe Collabora requires SSL?  I was able to install Collabora inside my Nextcloud.  Do I need to install Collabora Docker also?  Is this what this step is about?  Thanks!

Yes, Collabora requires SSL too, and Yes, you need to set up Collabora Docker too cos in nextcloud you just set up a connection to it.. i got mine working from github.

 

Share this post


Link to post

@uldise, in that case, my current subdomain linked to letsencrypt is just 1, e.g. xxxx.myfirewall.co, and this currently points to nextcloud.  This subdomain is provided by my firewall.  To get Collabora SSL using letsencrypt, do I need another subdomain?  e.g. office.myfirewall.co?  As my firewall's built-in DDNS no longer provide a secondary subdomain.  Can you confirm if this is correct?  Any suggestions if I'm only limited to single subdomain that is already used by nextcloud?

Share this post


Link to post
4 minutes ago, jang430 said:

e.g. office.myfirewall.co?  As my firewall's built-in DDNS no longer provide a secondary subdomain.  Can you confirm if this is correct?

Yes, i'm running collabora on addition subdomain. and i have no idea, if you can run collabora without subdomain, e.g.  xxxx.myfirewall.co/collabora..

Share this post


Link to post

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.