Jump to content
cmer

[Support] cmer - Seafile

108 posts in this topic Last Reply

Recommended Posts

This is the support thread for my first Unraid Docker Template. It's for the wonderful "self-hosted Dropbox" alternative Seafile. The image supports both the community edition and the professional edition (free up to 3 users).

 

It is available in Community Applications or at https://www.github.com/cmer/docker-templates.

 

Share this post


Link to post

Its in CA.  There are a couple of issues with the template (I issued a PR on GitHub) where errors will appear on CA (Also pumped out an update to CA to handle these errors should they ever pop up again in another community template)

Share this post


Link to post

Hello,

 

I got nginx working with SSL just fine.  After I installed seafile everything works locally (http://192.168.1.x:8000.

 

In nginx default config I have

 

location /seafile {
include /config/nginx/proxy.conf;
proxy_pass http://192.168.1.x:8000/seafile;
}

 

Which this work fine, however none of my images or css load.  I noticed when I right click my public seafile page and view-source it says

 

<img src="/media/img/seafile-logo.png"

 

So naturally I would want to add /media into my nginx default.  However there is not a folder ANYWHERE on my unraid server that has the file seafile-logo.png to include the /appdata/seafile subfolders as well. I do not know how the internal server gets the CSS and images locally when I cannot find them at all in my terminal. I am wanting to pull my hair out.  Any help would be great!

Share this post


Link to post

After a quick play with this I think you're probably on a hiding to nothing trying to proxy it to https://server.com/seafile'>https://server.com/seafile

 

If it were me I'd go for either https://server.com or https://seafile.server.com

 

It might be easier if you could find a way to make it locally accessible via http://192.168.1.1:8000/seafile'>http://192.168.1.1:8000/seafile rather than http://192.168.1.1:8000 though.

 

With the config you've supplied unless you can actually access seafile on http://192.168.1.1:8000/seafile'>http://192.168.1.1:8000/seafile it isn't going to work properly.

 

Share this post


Link to post

After a quick play with this I think you're probably on a hiding to nothing trying to proxy it to https://server.com/seafile'>https://server.com/seafile

 

If it were me I'd go for either https://server.com or https://seafile.server.com

 

It might be easier if you could find a way to make it locally accessible via http://192.168.1.1:8000/seafile'>http://192.168.1.1:8000/seafile rather than http://192.168.1.1:8000 though.

 

With the config you've supplied unless you can actually access seafile on http://192.168.1.1:8000/seafile'>http://192.168.1.1:8000/seafile it isn't going to work properly.

 

 

Sorry I forgot to mention I have updated my proxy_pass to go to http://192.168.1.1:8000 and I have removed the /seafile part.  Still have the same issue.

Share this post


Link to post

Then a starting point would be to have a look here, and reproduce this guy's VM1 config.  Then try and work it from there.  As you can see it's a lot more complex that what you have currently.

Share this post


Link to post

This is what I use. It works perfect.

 

 

server {

    listen 443 ssl http2;

    server_name foo.bar.com;

 

    root /config/www;

    index index.html index.htm index.php;

 

 

    # add_header Front-End-Https on;

 

    client_max_body_size 0;

 

    location / {

        proxy_pass http://10.0.0.4:8000/;

    }

 

    location /seafhttp {

        rewrite ^/seafhttp(.*)$ $1 break;

        proxy_pass http://10.0.0.04:8082;

        client_max_body_size 0;

        proxy_connect_timeout  36000s;

        proxy_read_timeout  36000s;

        proxy_send_timeout  36000s;

        send_timeout  36000s;

        proxy_request_buffering off;

    }

}

Share this post


Link to post

cmer, is there no easy way to change the root url to /seafile then?

Share this post


Link to post

This is what I use. It works perfect.

 

 

server {

    listen 443 ssl http2;

    server_name foo.bar.com;

 

    root /config/www;

    index index.html index.htm index.php;

 

 

    # add_header Front-End-Https on;

 

    client_max_body_size 0;

 

    location / {

        proxy_pass http://10.0.0.4:8000/;

    }

 

    location /seafhttp {

        rewrite ^/seafhttp(.*)$ $1 break;

        proxy_pass http://10.0.0.04:8082;

        client_max_body_size 0;

        proxy_connect_timeout  36000s;

        proxy_read_timeout  36000s;

        proxy_send_timeout  36000s;

        send_timeout  36000s;

        proxy_request_buffering off;

    }

}

 

Awesome! I am going to try this now.  I do have a question, why do you have your :8000 link in the "location /" ?  Is that personal preference?  That is basically like going to www.yoursite.com without any sub folder right?

Share this post


Link to post

This is what I use. It works perfect.

 

 

server {

    listen 443 ssl http2;

    server_name foo.bar.com;

 

    root /config/www;

    index index.html index.htm index.php;

 

 

    # add_header Front-End-Https on;

 

    client_max_body_size 0;

 

    location / {

        proxy_pass http://10.0.0.4:8000/;

    }

 

    location /seafhttp {

        rewrite ^/seafhttp(.*)$ $1 break;

        proxy_pass http://10.0.0.04:8082;

        client_max_body_size 0;

        proxy_connect_timeout  36000s;

        proxy_read_timeout  36000s;

        proxy_send_timeout  36000s;

        send_timeout  36000s;

        proxy_request_buffering off;

    }

}

 

Awesome! I am going to try this now.  I do have a question, why do you have your :8000 link in the "location /" ?  Is that personal preference?  That is basically like going to www.yoursite.com without any sub folder right?

 

Yeah, the problem is as seafile is accessed from :8000 not :8000/seafile you were always gonna struggle with your planned setup.  cmer has a dedicated url just for seafile.

Share this post


Link to post

This is what I use. It works perfect.

 

 

server {

    listen 443 ssl http2;

    server_name foo.bar.com;

 

    root /config/www;

    index index.html index.htm index.php;

 

 

    # add_header Front-End-Https on;

 

    client_max_body_size 0;

 

    location / {

        proxy_pass http://10.0.0.4:8000/;

    }

 

    location /seafhttp {

        rewrite ^/seafhttp(.*)$ $1 break;

        proxy_pass http://10.0.0.04:8082;

        client_max_body_size 0;

        proxy_connect_timeout  36000s;

        proxy_read_timeout  36000s;

        proxy_send_timeout  36000s;

        send_timeout  36000s;

        proxy_request_buffering off;

    }

}

 

Awesome! I am going to try this now.  I do have a question, why do you have your :8000 link in the "location /" ?  Is that personal preference?  That is basically like going to www.yoursite.com without any sub folder right?

 

Yeah, the problem is as seafile is accessed from :8000 not :8000/seafile you were always gonna struggle with your planned setup.  cmer has a dedicated url just for seafile.

 

Oh ok that makes sense!  CMER what do you have in the "Instance ID" for your seafile docker configuration?

Share this post


Link to post

CMER/CHBMB,

 

I copied CMERs settings to the T.  I want to mention I do have SSL information in my default file.  That would be the only difference.  I am now getting a

 

502 Bad Gateway

 

I also want to note that I am going to my website www.foobar.com and not going to www.foobar.com/seafile or www.foobar.com/seafhttp as they do not work returning a "500 Internal Server Error"

 

EDIT I GOT IT!

 

CMER - I accidently put https: instead of http: in the location / address.  It is now working with HTTPS access.  Also I can change location / to location /seafile and it works with exceptions!  If you modify it to /seafile it breaks it again (no css and no images). So as of right now you have to keep the seafile webpage at your nginx index!  Let me know if this changes CMER.  Thank you CHBMB and CMER!!

Share this post


Link to post

CMER/CHBMB,

 

I copied CMERs settings to the T.  I want to mention I do have SSL information in my default file.  That would be the only difference.  I am now getting a

 

502 Bad Gateway

 

I also want to note that I am going to my website www.foobar.com and not going to www.foobar.com/seafile or www.foobar.com/seafhttp as they do not work returning a "500 Internal Server Error"

 

EDIT I GOT IT!

 

CMER - I put https: instead of http: in the location / address.  It is now working with HTTPS access.  Also I can change location / to location /seafile and it works perfectly!  There is still one more issue, if you modify location / to location /seafile it breaks it again. So as of right now you have to keep the seafile webpage at your nginx index!  Let me know if this changes CMER.  Thank you CHBMB and CMER!!

 

It shouldn't matter that LE is talking to seafile over http, I'd remove that "s" and see what happens.  The reverse proxy will handle the SSL layer.

Share this post


Link to post

Awesome!  Please see my edit right above you.

 

You won't be able to set it up to work on /seafile without some modifications to the seafile container.  And tbh it looks like a bitch to do easily.  Far better would be to use a subdomain if you wanted to keep you server.com for other things.

 

Personally I have

 

server.com

nextcloud.server.com

 

I'd suggest doing the same with seafile and having

 

server.com

seafile.server.com

Share this post


Link to post

Awesome!  Please see my edit right above you.

 

You won't be able to set it up to work on /seafile without some modifications to the seafile container.  And tbh it looks like a bitch to do easily.  Far better would be to use a subdomain if you wanted to keep you server.com for other things.

 

Personally I have

 

server.com

nextcloud.server.com

 

I'd suggest doing the same with seafile and having

 

server.com

seafile.server.com

 

So I am very interested in this.  Would this be a modification inside of nginx conf? Or how do you switch from /seafile to seafile.server.com ?  Thank you!

Share this post


Link to post

You've been editing default file, just create one called seafile like this.

 

server {
       listen         80;
       server_name    seafile.server.com;
       return         301 https://$server_name$request_uri;
}

server {
listen 443 ssl;
server_name seafile.server.com;

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

###SSL Certificates
ssl_certificate /config/keys/letsencrypt/fullchain.pem;
ssl_certificate_key /config/keys/letsencrypt/privkey.pem;

###Diffie–Hellman key exchange ###
ssl_dhparam /config/nginx/dhparams.pem;

###SSL Ciphers
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-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';

###Extra Settings###
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";
#add_header Front-End-Https on;

client_max_body_size 0;

        location / {
                proxy_pass http://10.0.0.4:8000/;
        }

        location /seafhttp {
                rewrite ^/seafhttp(.*)$ $1 break;
                proxy_pass http://10.0.0.04:8082;
                client_max_body_size 0;
                proxy_connect_timeout  36000s;
                proxy_read_timeout  36000s;
                proxy_send_timeout  36000s;
                send_timeout  36000s;
                proxy_request_buffering off;
        }
}

 

You just need to configure the subdomain at your name provider.  And make sure the DNS is configured.

Share this post


Link to post

You've been editing default file, just create one called seafile like this.

 

server {
       listen         80;
       server_name    seafile.server.com;
       return         301 https://$server_name$request_uri;
}

server {
listen 443 ssl;
server_name seafile.server.com;

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

###SSL Certificates
ssl_certificate /config/keys/letsencrypt/fullchain.pem;
ssl_certificate_key /config/keys/letsencrypt/privkey.pem;

###Diffie–Hellman key exchange ###
ssl_dhparam /config/nginx/dhparams.pem;

###SSL Ciphers
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-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';

###Extra Settings###
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";
#add_header Front-End-Https on;

client_max_body_size 0;

        location / {
                proxy_pass http://10.0.0.4:8000/;
        }

        location /seafhttp {
                rewrite ^/seafhttp(.*)$ $1 break;
                proxy_pass http://10.0.0.04:8082;
                client_max_body_size 0;
                proxy_connect_timeout  36000s;
                proxy_read_timeout  36000s;
                proxy_send_timeout  36000s;
                send_timeout  36000s;
                proxy_request_buffering off;
        }
}

 

You just need to configure the subdomain at your name provider.  And make sure the DNS is configured.

 

AWESOME!  Got it working.  Just curious....how does nginx know to read my seafile configuration file?  I didn't tell it that it existed.  Does it just read everything in that folder?

Share this post


Link to post

CMER,

 

Within my seafile page I have a library that gives me the error "Broken (please contact your administrator to fix this library)". I cannot delete this library its named "NULL" and it is not in the storage/blocks folder.  Do I need to get inside the database or something to remove it?

 

Disregard didnt delete DB from old install.

Share this post


Link to post

I've installed the docker on my unraid setup, but as I'm finding with most things, the setup doesn't exactly prove to be straight forward. I set the port to match my servers local IP, network is set to host, ports look alright, but if I try to telnet I'm not able to connect (ports aren't open), when if I try to connect with the windows client, it crashes the docker app. What should I start trying? 

Share this post


Link to post

Did you try with "Pro" disabled first? You need a license key for Pro. What does your log file say?

Share this post


Link to post

That may well have been part of my problem. I uninstalled, then reinstalled without Pro, and also selected the Share from the get go, and all appears to be working now. May have been a problem with me installing and then changing the Data Path. Did notice in the log it saying it couldn't find a config file. 

 

Thanks!

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.