Explanation of Seafile 12.0 new Docker deployment approarch

We are pleased to announce that Seafile 12.0 is now available for testing. This release features a completely redesigned UI, new functionality, and significant improvements to both our administration manual and deployment architecture.

A key highlight of this release is our new Docker-centric approach to installation and management. Major architectural changes include:

  • Implementation of Caddy as a dedicated reverse proxy for HTTPS handling
  • Migration of the notification server to a separate Docker image
  • Improved network configuration through dedicated reverse proxy, enabling better component isolation and management
  • Streamlined configuration process using environment variables, eliminating redundant settings across multiple config files

These changes simplify deployment while providing greater flexibility for custom setups. Early testing feedback is welcome as we prepare for the final release.

The admin manual for 12.0: Introduction - Seafile Admin Manual

2 Likes

This is exciting news and a real milestone for Seafile.

Several questions come to mind:

  1. Is there a migration guide for those using traditional binaries to move to Docker?

  2. For those using traditional binaries, is MySQL still supported?

  3. Will there be similar updates to the client applications?

  4. When will the server upgrade notes for v.12 be completed?

  5. When will a download link be provided on the Downloads page?

You can find the new document at: Upgrade notes for 12.0.x - Seafile Admin Manual

The trick is to click the version switch number at the top:

Database support is not changed.

Will there be similar updates to the client applications

Docker is not relevant for client application.

  1. When will a download link be provided on the Downloads page?

Binary version will be provided once 12.0 is stable.

1 Like

Could you clarify the difference with 11? From what I can identify, this notificaiton server was extracted from something else and nginx was replaced with caddy. Or do I miss something?

Not trying to undermine the changes, just trying to understand what will be required for an upgrade, whether major things will change. It was somehow hard to get nginx working properly behind another reverse proxy. So if now it is possible to skip caddy and directly use another reverse proxy, it will actually reduce overhead and simplify things.

2 Likes

The difference between v11 includes:

  • notificaiton server was extracted
  • nginx is not replaced, but the function of nginx inside the seaf-server image is simplified, it does not do https any more.
1 Like

Are there any instruction to run this without caddy, but instead use and existing dedicated reverse proxy server?
Is it sufficient to uncomment the port in the seafile section of docker-compose.yml and then redirect to this?

1 Like

I just started doing some testing with this. I have some general questions, and a few notes about the documentation. I will put the documentation notes in a separate post.

Are you committed to the docker change, or is it just something you are considering? I ask because we have automated a lot of our seafile server’s administration with tools like ansible, cron jobs, shell scripts, etc, and that will all be broken by docker. We also have some small adjustments to the web interface (mostly just the css) that will also be harder to implement with docker. Basically docker is trendy, but it brings us no benefit and a lot of extra hassle.

I am not sure I understand that. Are you saying that the new deployment for 12 looks like this:

client/web browser ↔ Reverse proxy with virtual hosts doing TLS (optional) ↔ Caddy reverse proxy (in a docker) ↔ nginx (in the seafile docker) ↔ seahub or seafile component (still inside that docker)

As mentioned above, I have some questions & comments about the documentation. I hope it is clear that I am not trying to be a jerk, just trying to help. I didn’t read the new documents in depth, just jumped around a bit reading some parts.

https://manual.seafile.com/12.0/introduction/components/

  • “You can also configure Seahub to run under WSGI mode behind Nginx or Apache. This is recommended for production setups.”
    How? There’s no link to instructions or even a hint where to find them.

https://manual.seafile.com/12.0/setup/caddy/

  • “acquisite”. That is an adjective being used like a verb. Maybe you meant acquisition?
  • Also as pm1234 asked, is there any way to just run without caddy if I already have a reverse proxy? This might be a good place to link to the answer. Especially since most of my testing time so far has been troubleshooting a problem that I think is Caddy breaking OAuth.

https://manual.seafile.com/12.0/setup/setup_ce_by_docker/#download-and-modify-env

  • “SEAFILE_SERVER_PROTOCOL Seafile server protocol (http or https)” Which should I pick if I’m doing https but with an external reverse proxy?
  • “then visit http://seafile.example.com to open Seafile Web UI.” That’s a bit unclear. Should that be the IP of the container, or the IP of the host? Should it be https if SEAFILE_SERVER_PROTOCOL is set to https?

https://manual.seafile.com/12.0/setup/overview/

  • This page (especially the diagram) is unclear about what parts are separate docker containers, also about what parts are optional. For example, Seadoc is mentioned, but notification and collabora servers are not.

https://manual.seafile.com/12.0/extension/webdav/

  • This is just the fist of a number of pages that seem misplaced. Or maybe this section shouldn’t be named “extensions”. Extensions are optional additional components, but (for example) the webdav component is an optional feature that is built in. There is nothing extra to install.

https://manual.seafile.com/12.0/extension/fuse/

  • "One debian/centos systems, " Probably mean “On” not “One”

https://manual.seafile.com/12.0/extension/fuse/

  • "From Seafile 12.0, Seafile support integrating CollaboraOnline server on the same host (only support deploying with Docker with sufficient cores and RAM), as you can follow the steps in this manual. "

    I don’t understand what this is trying to say. Does it mean “The steps from this guide only cover installing collabora as another container on the same docker host that your seafile docker container is on. If you want to install on another host see the collabora documentation for instructions” ?

https://manual.seafile.com/12.0/extension/distributed_indexing/
https://manual.seafile.com/12.0/extension/virus_scan/

  • Are these still a pro-only features? Maybe that should be mentioned here.
2 Likes

You are write about it.

We will write a document about how to use your own external reverse proxy instead of caddy. In one of our setup, we use Nginx insteadof caddy.

3 Likes

The document is here: Use other reverse proxy - Seafile Admin Manual

2 Likes
  1. Why the switch to caddy? nginx was not working as intended? This makes the migration process more complex.
  2. I can’t see that version 12 is marked as beta or test version. This can be very misleading. I just wanted to start migration, and in the last moment i found this thread reading “available for testing” … “once 12.0 is stable” … uhm what? How can i figure out when 12 is stable? https://hub.docker.com/r/seafileltd/seafile-mc/tags suggests 12 is the latest stable version?
  3. Is there any guide to create seafile 12 docker from scratch?

For the old version, the Nginx inside Seafile container is used as reverse proxy for multiple containers:

The drawback:

You need to manually modify Nginx configuration if you add or remove containers. If you forgot to modify a Nginx configuration after remove a container, the Nginx will not be able to start.

A separate reverse proxy can make the process simple. Unlike Nginx, caddy can proxy a few containers without manual modification of configurations.

You can check the release announcement of the forum, or check Seafile Community Edition - Seafile Admin Manual

The document is at: Setup community edition - Seafile Admin Manual

1 Like

Thanks for this release, 3 points on my side

First, please add env for S3 ciphering.
Currently setting S3 backend will create it in the file and start to use it by creating at least one file. I don’t know if this S3 object is dummy just to test S3 or real useful one.

Of course adding key directly in seafile.conf is working, but it would be better to directly have “INIT_S3_FS_SSE_KEY” and so on so it’s done on init.

Second point is using an additional reverse proxy is really complicated, i was eventually able to get rid of CRSF error but haven’t been able to make web upload work.

I then tried to publish ports directly and reach 8000 and 8082 directly from an independent Caddy without success.

Could you please add more examples on the page Use other reverse proxy - Seafile Admin Manual
like:

  • Additional reverse proxy while keeping integrated Nginx
    • external Nginx
    • external Caddy
  • Totally replace integrated Nginx
    • external Nginx
    • external Caddy

With all needed rewrites, stripe and so on, for seafile seafhttp and notification.

3rd point, for those who want to keep the default caddy + nginx stack and use own TLS cert I don’t see option to use https without let’encrypt and provide cert directories.

For your second. Point, have you looked throughout the forum for the proposed solutions because normally you should find the solution, unless of course the new version is different and it no longer works. But normally it should.

Found lots of external nginx topics but no Caddy.

My problem was on seafhttp staying in http onstead of https, i knew I had to check for https.

in .env:

SEAFILE_SERVER_HOSTNAME=sf.mydomain.net
SEAFILE_SERVER_PROTOCOL=https
SERVICE_URL = “https://sf.mydomain.net/
FILE_SERVER_ROOT = “https://sf.mydomain.net/seafhttp
FORCE_HTTPS_IN_CONF=false
SEAFILE_SERVER_LETSENCRYPT=false

meanwhile changing directly in seafile/conf/seahub_settings.py http to https made upload and download work.

I finally kept it to http in .py and enabled FORCE_HTTPS_IN_CONF=true which made it work.

I now have a CSRF error when I try to login, meaning Caddy must miss to pass domain.
It seems Django by default check for host and referrer to be equal
https://caddy.community/t/django-csrf-issues-with-reverse-proxy/16957/4

had to set CSRF_TRUSTED_ORIGINS = [‘https://sf.mydomain.net’] in the .py
https://github.com/haiwen/seafile-docker/issues/347

The configuration depends on how you manage your certificate normally the documentation is well done for that. You just have to understand how caddy works and adapt.

I think you need to add some Django specific points in doc, such as CRSF config, users configuring their own reverse proxy will encounter this issue.

I agree with that

Tested gc.sh and it fails when using S3 Hetzner with “path_style_request = true” while other operations work normally with it enabled.

get this error

[seafserv-gc] [2024-12-16 00:49:25] [INFO] gc-core.c(1103): GC version 1 repo My Library Template(09b29c8e-39c9-4d13-b8a7-bb08f60aac64)
[seafserv-gc] [2024-12-16 00:49:25] [WARNING] …/…/common/s3-client.c(1490): S3 error status for list bucket: 403.
[seafserv-gc] [2024-12-16 00:49:25] [WARNING] …/…/common/s3-client.c(1491): Request URL: https://nbg1.your-objectstorage.com/xxxxxx
[seafserv-gc] [2024-12-16 00:49:25] [WARNING] …/…/common/s3-client.c(1492): Response:

<?xml version="1.0" encoding="UTF-8"?>SignatureDoesNotMatchxxxxxx-nbg1-prod1-ceph3</

RequestId>xxxxxx%
[seafserv-gc] [2024-12-16 00:49:25] [WARNING] …/…/common/block-backend-s3.c(868): Failed to get block list from s3.
[seafserv-gc] [2024-12-16 00:49:25] [WARNING] gc-core.c(743): Failed to collect existing blocks for repo 7e6de657, stop GC

disabling path_style_request make GC work

On Unraid I attempted to upgrade Seafile container from 11-latest to 12-latest version. Upgrade was successful however logs keep citing that the .env is missing.

In Unraid I tried to pass through “—env-file /mnt/location” as an extra parameter and placed .env in that location. Upon container reboot Unraid Seafile container log still said .env was missing.

Does anyone have any idea how:
1-how can I pass the .env file through to the Seafile 12 container in Unraid?
2-is there a easy way to find/hunt down all the information the .env file needs? One of the .env found had much less required than the other; the other things required are listed here - see pic??

Any help or advice would be awesome!