On my server I installed via docker paperless-ngx, nginx proxy manager, watchtower (to update everything automatically) and try to install seafile. Everything was installed as non root. Because paperless-ngx and nginx proxy manager are using the ports of seafile, I had to make port-changes. I put all seafile files into /seafile. As non-root it also would not be possible to save to /opt.
mkdir ~/seafile && cat <<EOF > ~/seafile/docker-compose.yml
services:
seafile-db:
image: mariadb:10.11
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=password # Required, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
- MARIADB_AUTO_UPGRADE=1
volumes:
- ./seafile-mysql/seafile-db:/var/lib/mysql # Required, specifies the path to MySQL data persistent store.
networks:
- seafile-net
memcached:
image: memcached:1.6.18
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
seafile:
image: seafileltd/seafile-mc:11.0-latest
container_name: seafile
ports:
- '8280:80'
# - '8443:443' # If https is enabled, cancel the comment.
volumes:
- ./seafile-data:/shared # Required, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=seafile-db
- DB_ROOT_PASSWD=password # Required, the value should be root's password of MySQL service.
- TIME_ZONE=Europe/Zurich # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL=test@gmail.com # Specifies Seafile admin user, default is 'me@example.com'.
- SEAFILE_ADMIN_PASSWORD=secret # Specifies Seafile admin password, default is 'asecret'.
- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
- SEAFILE_SERVER_HOSTNAME=seafile.xxx.de # Specifies your host name if https is enabled.
# - FORCE_HTTPS_IN_CONF=true
# - NON_ROOT=true
depends_on:
- seafile-db #neu
- memcached
networks:
- seafile-net
networks:
seafile-net:
EOF
docker-compose -f ~/seafile/docker-compose.yml up -d
sudo chmod -R a+rwx seafile/seafile-data/seafile/
docker-compose -f ~/seafile/docker-compose.yml down
docker-compose -f ~/seafile/docker-compose.yml up -d
nginx proxy manager is
Forward Hostname / IP*
IP: xxx.xxx.xx.xxx
Forward Port *
8280
Block Common Exploits and Websockets Support are activated
ssl Certificate for my site is ok
Force SSL and HTTP/2 Support are activated
I have the certificates - there are green
I login and make a https://
SERVICE_URL
FILE_SERVER_ROOT
I can login via http:// xxx.xxx.xx.xxx:8280 (space after // for the posting, not in real)
It sounds like you’re facing some challenges with getting Seafile to work with HTTPS. I’ve successfully set up Seafile behind SWAG, and I think I might be able to help you with your configuration.
Could you please share your Nginx configuration from the “Nginx Proxy Manager”? This will help us understand how the requests are being forwarded and identify any potential issues.
Common problems with reverse proxies often include:
Incompatible Headers: There might be a mismatch between the headers set by the reverse proxy and those expected by Seafile’s internal proxy. Ensuring that headers like X-Forwarded-For, X-Forwarded-Proto, and Host are correctly set can resolve many issues.
Misconfiguration in seahub_settings.py: Double-check that SERVICE_URL and FILE_SERVER_ROOT are set to use HTTPS and match your domain configuration.
For posting links, you can write the link and format it as a code block using the editor, which will allow you to share it without any issues.
https://www.seafile.com/en/home/
Looking forward to your response so we can troubleshoot this together!
Thank you very much! I appreciate every answer a lot!!! In total I was working on seafile at least 20 hours, unfortunatly it is still not working in https. In my dispair I even tried Nextcloud but it has so many function which I never would need.
It was already set to https.
Misconfiguration in seahub_settings.py: Double-check that SERVICE_URL and FILE_SERVER_ROOT are set to use HTTPS and match your domain configuration.
I found different command in the internet to put into ngninx proxy manager in tab into “advanced” - none worked for me. At the point of writting the below was inside “advanced”
Sorry, seafile is very confusing concerning nginx: You have nginx proxy manager with the tab “advanced” which you can modify, then seafile/seafile-data/nginx/conf/seafile.nginx.conf and my file below is from
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format <host-port>:<container-port>
- '8080:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
environment:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "password"
DB_MYSQL_NAME: "npm"
# Nutzen Sie kein IPv6, so entfernen Sie das '#'-Zeichen vor der nächsten Zeile
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: 'jc21/mariadb-aria:latest'
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: 'password2'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'password'
MARIADB_AUTO_UPGRADE: '1'
volumes:
- ./mysql:/var/lib/mysql
I hope I sent you the correct files! I am trying my best. Thank you for your time for helping me!
If this kind of configuration works for your other containers I don’t understand how Nginx Proxy Manager works because I don’t see anything that redirects a port to a container I have to look at how it works
I am a totally beginner. But I thought the redirection is made with the gui of nginx proxy manager. For paperless-ngx it is working. I never made a configration in a config-file.
I used the docker-compose files for nginx and paperless-ngx and gui of nginx proxy manager.
I was also a beginner, don’t get hung up on all the headers that NGINX must have to start with but just try to understand the basics of Nginx, the server, http and other sections and understand how Nginx Proxy Manager works to make redirects.