Skip to content

Seafile Docker installation ready to use with Traefik as reverse proxy

License

Notifications You must be signed in to change notification settings

RaraAvis8/docker-seafile-server

 
 

Repository files navigation

Docker Image for Traefik-ready Seafile with SQLite

Current Seafile server version: 6.2.5

This docker image provides a fully-functional Seafile server installation that is configured with SQLite. Should be fully functional as is but has Traefik configuration in place.

  • The container exposes a /data volume where all seafile data is stored in a persistent manner
  • Initial setup is done during first startup where setup of the administator account is created. The administrator allows to create other users.
  • No user interaction needed for container startup!
  • Upgrades to new seafile versions are handled internally by automatically running seafile provided upgrade scripts

Running container with docker-compose

Create a docker-compose.yml file:

seafile:
    image: stonemaster/docker-seafile-server
    container_name: seafile
    ports:
        - "443:443"
    environment:
        - SEAFILE_EXTERNAL_PORT=443
        - SEAFILE_HOSTNAME=localhost
        - SEAFILE_SERVER_NAME=myseafile
        - SEAFILE_ADMIN_MAIL=admin@seafile.com
        - SEAFILE_ADMIN_PASSWORD=test123
        - USE_SSL=on
    volumes:
        - /tmp/seafile:/data
        - ./test/ssl:/etc/ssl

Run docker-compose up -d.

Directory structure for Seafile

The following files are located inside the folder that is mounted to /data:

seafile_version
seahub-data
seafile-data
seahub.db

seahub-data contains the internal seafile file structure and thus the user data. seahub.db contains the SQLite database used for meta information by Seafile. seafile_version is generated by the container to store the current software version for seamingless container upgrades. seafile-data contains the actual user files.

Environment variables

SEAFILE_EXTERNAL_PORT

This port must match the port that is exposed via Docker. It is used internally by Seafile to expose it to the client for file handling.

SEAFILE_EXTERNAL_PROTOCOL

  • default: automatic
  • Options: http, https

Allows to override the protocol exposed by Seafile file server. If USE_SSL is to to on this is automatically determined to be https; otherwise it is http. However if a HTTPs proxy is used in front of the seafile container this may need to be adapted.

SEAFILE_HOSTNAME

This hostname must match the host the Seafile instance is running on. This hostname is exposed to clients to allow file handling. If you get errors during file uploads and downloads, check that SEAFILE_HOSTNAME and SEAFILE_EXTERNAL_PORT match your setup.

SEAFILE_SERVER_NAME

The name of the seafile server instance needed by Seafile.

SEAFILE_ADMIN_MAIL

The administator's e-mail used during initial setup. The administrator is allowed to create other accounts.

SEAFILE_ADMIN_PASSWORD

The administator's password used during initial setup.

USE_SSL

  • default: off
  • Options: on, off

Enables HTTP (off) or HTTPs (on).

License

Boost License. See LICENSE.txt for more details.

About

Seafile Docker installation ready to use with Traefik as reverse proxy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 94.8%
  • Makefile 5.2%