hurlenko/filebrowser-docker

Expose over internet: suggestions required

Opened this issue · 3 comments

Hi,
just planning to expose the container over internet and would like to know if you think your proxy config example could work with linuxserver/swag or you can share your experiences. A letsencrypt certificate would be great.
Thank you for your FB container

Hi @sgiannulli,

I don't have any experience with linuxserver/swag so I can't help you with that. The nginx config from the readme is fine but you still might need to update it to your needs (client_max_body_size etc) and it does not cover ssl configuration. You can check https://www.digitalocean.com/community/tools/nginx which is a visual nginx config builder from digitalocean. It might be handy to create the initial config which you can tweak afterwards. You can also check #5 in case you want to configure ssl in filebrowser directly (when running without web server)

location /filebrowser {
return 301 $scheme://$host/filebrowser/;
}

location ^~ /filebrowser/ {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

# enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf
#auth_request /auth;
#error_page 401 =200 /ldaplogin;

# enable for Authelia, also enable authelia-server.conf in the default site config
#include /config/nginx/authelia-location.conf;

include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app filebrowser;
set $upstream_port 8080;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

#proxy_read_timeout 999999999;

}

This is the proxy config I used for the swag container. It's based on their template and works perfectly. Sorry for the formatting, I can't seem to make it look right.

Thank you! I was doing some test too but not yet reached a good conf. Will try to include also authelia to increase security.