LycheeOrg / Lychee-Docker

Docker image for Lychee
https://lycheeorg.github.io/
167 stars 55 forks source link

unable to load css or create admin account #142

Closed mbc3 closed 1 year ago

mbc3 commented 1 year ago

I started Lychee via podman (running podman-compose).

Visiting the service gives me this:

lychee-install

And I am unable to create an account.

I suspect what's going on has something to do with file permissions, as it looks like the CSS isn't being loaded.

My user has read/write permissions on the conf directory. Sym and uploads directory is owned by user/group 100999

Attempted fixes:

I extended read/write permissions to my user with setfacl, but it still didn't work.

I added TRUSTED_PROXIES=*

to my docker-compose file, as I'm running this on a reverse proxy via nginx and https.

I added the :z volume mount flag for SELinux in my docker-compose file for all my volumes, like so:

volumes:

I switched to the :dev branch release, but that didn't fix my issue, either.

ildyria commented 1 year ago

My guess is that you are accessing the website in HTTPS and that the CSS resources are served in HTTP. Can you check at the console / Network connection tab in your browser whether that's the case.

We now have a .env setting to enforce HTTPS, this should hopefully resolve this issue.

mbc3 commented 1 year ago

Thank you so much! This was precisely the case. In case anyone else needs more explicit instructions, I resolved this issue by setting:

APP_FORCE_HTTPS=true APP_URL=https://localhost

in my docker-compose file. Lychee is running flawlessly now.