Sign inSign up

flrnnc/seafile-client

Sponsored OSS

By flrnnc

Updated 3 days ago

Sync Seafile libraries securely, weekly built. It's a mirror of flowgunso/seafile-client.

Image
Databases & storage
4

10K+

flrnnc/seafile-client repository overview

Pipeline status Docker image size Docker pulls License Release Donation BuyMeACoffee Build date Patreon

Share one or more Seafile libraries as a volume to other containers.

Supported tags

The versions match Seafile versions.

9, 9.0, 9.0.20, latest

9, 9.0, 9.0.13

8, 8.0, 8.0.10

Features

  • Synchronize one or more Seafile libraries.
  • Support password protected librairies.
  • Support two factor authentication.
  • Configure upload and download limits.
  • Skip SSL certificates.
  • Set file ownership with user/group ID

The Docker image is built weekly to keep up with security updates.

Usage

Start a Seafile client

Docker command-line

The following command start the Seafile client with one library:

docker run \ 
    -e SEAF_SERVER_URL="https://seafile.example/" \
    -e SEAF_USERNAME="a_seafile_user" \
    -e SEAF_PASSWORD="SoMePaSSWoRD" \
    -e SEAF_LIBRARY="an-hexadecimal-library-uuid" \
    -v path/to/library:/library \
    -v path/to/client/data:/seafile \
    flrnnc/seafile-client:latest
Docker Compose

The following Docker Compose start a Seafile client with two libraries, with one password protected:

version: "3"

services:

  seafile-client:
    image: flrnnc/seafile-client:latest
    volumes:
      - audio:/library/audio
      - documents:/library/documents
      - client:/seafile
    environment:
      SEAF_SERVER_URL: "https://seafile.example/"
      SEAF_USERNAME: "a_seafile_user"
      SEAF_PASSWORD: "SoMePaSSWoRD"
      SEAF_LIBRARY_AUDIO: "audio-library-uuid"
      SEAF_LIBRARY_AUDIO_PASSWORD: "auDioLiBRaRyPaSSWoRD"
      SEAF_LIBRARY_DOCUMENTS: "documents-library-uuid"

volumes:
  audio:
  documents:
  client:

Librairies

Environment variables allows librairies configuration, as shown in the examples above.

You can configure either a single librairy or multiple librairies.

Single library

To synchronize a single library, use the environment variables SEAF_LIBRARY and SEAF_LIBRARY_PASSWORD. The library will be synchronized in /library.

Multiple librairies

To synchronise multiple librairies, use the same environment variable as above but suffixed with a single identifier word. That word will be used for the library password and it's synchronization path as well.

Hence, to synchronise a library identified as audio, the environment variables would be SEAF_LIBRARY_AUDIO for the library UUID and SEAF_LIBRARY_AUDIO_PASSWORD for the library password. The library will be then synchronized in /library/audio.

Identifiers allows to add as many libraries as possible. Identifier are single word only.

Environment variables

Environment variable allows you to configure the Seafile client.

SEAF_SERVER_URL

This variable is mandatory.

The Seafile server URL.

SEAF_USERNAME

This variable is mandatory.

The username for the Seafile account.

SEAF_PASSWORD

At least one of SEAF_PASSWORD or SEAF_TOKEN is mandatory.

The password for the Seafile account.

SEAF_TOKEN

At least one of SEAF_PASSWORD or SEAF_TOKEN is mandatory.

The API token for the Seafile account. If both SEAF_PASSWORD and SEAF_TOKEN are provided, the API token will take precedence.

SEAF_LIBRARY, SEAF_LIBRARY_[IDENTIFIER]

This variable is mandatory.

The UUID of the library, libraries to synchronize. Replace [IDENTIFIER] with the a unique single word identifier for each library you want to synchronize.

SEAF_LIBRARY_PASSWORD, SEAF_LIBRARY_[IDENTIFIER]_PASSWORD

The password of the library, libraries to synchronize. Replace [IDENTIFIER] with the a unique single word identifier for each library you want to synchronize corresponding to the SEAF_LIBRARY_[IDENTIFIER].

SEAF_2FA_SECRET

Two factor authentication is supported but your secret key must be provided. That key can be found on your Seafile web interface, only at the 2FA setup, when the QR code is shown. The secret key is embedded in the QR or available as a cookie.

SEAF_UPLOAD_LIMIT, SEAF_DOWNLOAD_LIMIT

Set upload and download speeds limits. Limits are in bytes.

SEAF_SKIP_SSL_CERT

Skip SSL certificates verifications.

Any string is considered true, omit the variable to set to false. Enable this if you have synchronization failures regarding SSL certificates.

UID, GID

Override the UID and GID for user running the Seafile client, hence the volume ownership.

Docker Secrets

All environments variable supports Docker Secrets, as environment variable variant suffixed with _FILE as files.

Full example

version: "3"

services:

  seafile-client:
    image: flrnnc/seafile-client:latest
    volumes:
      - audio:/library/audio
      - documents:/library/documents
      - client:/seafile
    environment:
      SEAF_SERVER_URL: "https://seafile.example/"
      SEAF_USERNAME: "a_seafile_user"
      SEAF_PASSWORD: "SoMePaSSWoRD"
      SEAF_LIBRARY_AUDIO: "audio-library-uuid"
      SEAF_LIBRARY_AUDIO_PASSWORD: "auDioLiBRaRyPaSSWoRD"
      SEAF_LIBRARY_DOCUMENTS: "documents-library-uuid"
      SEAF_2FA_SECRET: "JBSWY3DPEHPK3PXPIXDAUMXEDOXIUCDXWC32CS"
      SEAF_UPLOAD_LIMIT: "1000000"
      SEAF_DOWNLOAD_LIMIT: "1000000"
      SEAF_SKIP_SSL_CERT: "true"
      UID: "1000"
      GID: "1000"

volumes:
  audio:
  documents:
  client:

Troubleshooting

Tag summary

Content type

Image

Digest

sha256:548bd3358

Size

65.4 MB

Last updated

3 days ago

docker pull flrnnc/seafile-client

This week's pulls

Pulls:

735

Last week