Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filebrowser Web UI not accessible through a Caddy reverse proxy #36

Open
tiiraluoto opened this issue Jan 14, 2024 · 5 comments
Open

Filebrowser Web UI not accessible through a Caddy reverse proxy #36

tiiraluoto opened this issue Jan 14, 2024 · 5 comments

Comments

@tiiraluoto
Copy link

Hello

As said in the title the Web UI cannot be accessed externally even with Caddy.
This seems to be an issue specific to filebrowser since other containers work well via caddy.

@MidnightPurple34
Copy link

It actually works for me with reverse proxy Caddy
My enviroments are:
FB_DATABASE
FB_USERNAME
FB_PASSWORD

@jaud7of8
Copy link

It actually works for me with reverse proxy Caddy My enviroments are: FB_DATABASE FB_USERNAME FB_PASSWORD

Would you mind sharing your settings, the docker-compose.yml and Caddyfile?
Are you using a custom build of Caddy/version?
I have the same problem too.

@MidnightPurple34
Copy link

Caddyfile.txt
docker-compose.txt

Here you go, i used this caddy container here -> https://hub.docker.com/_/caddy

Let me know if you have any problem.

@jaud7of8
Copy link

Thanks MidnightPurple34,

I was able to get it working. My setup needs to have containers access an external network if the container is on the computer where caddy is running. It would not work with the external network declared (caddy at dotheevo). I spun it up on another computer, added a port mapping and got it working!

I have tried several web based file managers, filestash, sftpgo, and a few others. Filebrowser with your files is the only one that works. As I understand it, Caddy can't do ssh (needed for sftp) yet without a custom build and using a json file instead of a Caddyfile. Learning the json part is what is holding me back from trying that approach.

This is one part of retiring Nextcloud for me. NC seems to be a jack of all trades but a master of none. I use it to remotely access my files and to sync files from phones to storage. Filebrowser now takes care of half of what I need. Many thanks!

Below are my files, using the latest caddy and no .env file.

docker-compose.yml

services:
  filebrowser:
    container_name: filebrowser
    image: hurlenko/filebrowser
    user: "1000:1000"
    volumes:
      - /home/user-name/storage-location:/data
      - /home/user-name/docker/filebrowser/config:/config
    ports:
      - "port#:8080"
    environment:
      FB_DATABASE:
      FB_USERNAME:
      FB_PASSWORD:
    restart: always

Caddyfile

subdomain.{$MY_DOMAIN} {
  log {
    level INFO
    output file /mapped-to-local-file/log.txt {
      roll_size 10MB
      roll_keep 10
    }
  }
  # Uncomment this if you want to get a cert via ACME (Let's Encrypt or ZeroSSL>
#  tls someaddress@emailprovider
  encode gzip
  reverse_proxy computerip:port# {
      header_up X-Real-IP {remote_host}
  }
}

@MidnightPurple34
Copy link

I'm happy that you solved the problem, FB is just simple and thats what i need :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants