Seafile is an open-source cloud storage platform that provides file synchronization and collaboration capabilities. It’s designed to be a secure, fast, and reliable way to store and share files, and it’s a popular choice for both personal and business use. With Seafile, you can sync files between multiple devices, share files with others, and collaborate on documents in real-time.

In this blog post, we’ll guide you through the process of installing Seafile on a Raspberry Pi using Portainer.

Prerequisites Link to heading

  • Raspberry Pi 4 setup and updated
  • Portainer installed
  • Nginx Proxy Manager service installed

Step 0 - Define local mount folder Link to heading

Service will use local folders, mounted to docker container, to store its data.

For service we will need to create folder:

  • /ssd/seafile/db
  • /ssd/seafile/data
mkdir -p /ssd/seafile/db
mkdir -p /ssd/seafile/data

Step 1 - Install Seafile Link to heading

With Portainer installed, it is possible to start Gitea stack. To do this, follow these steps:

  • Open Portainer in your web browser and navigate to the “Stacks” page
  • Click the “Add stack” button
  • Enter a name for the stack (e.g., “seafile”) and paste the following code into the “Web editor” section:
version: '3'

    external: true

  # Database
    image: mariadb:10.7
      - MYSQL_ROOT_PASSWORD=seafile
      - MYSQL_LOG_CONSOLE=true
      - /ssd/seafile/mysql/db:/var/lib/mysql

  # Cache
    image: memcached:1.6
    entrypoint: memcached -m 256
  # Server
    image: seafileltd/seafile-mc:latest
      - /ssd/seafile/data:/shared   
      - DB_HOST=db
      - DB_ROOT_PASSWD=seafile 
      - TIME_ZONE=Europe/Helsinki 
      - [email protected]
      - db
      - memcached
          - seafile

Step 2 - Configure Seafile Link to heading

Once the Seafile container is running, you can access the web interface by navigating to http://<homelab>:8010.

The first time you access the web interface, you’ll be prompted to create an admin account. After you create an account, you can start using Seafile to store and share files.

Step 3 - Configure Proxy Link to heading

Now your stack is accessible on http://<homelab>:8010. Such URLs with port number do not look too friendly. However, there should be Nginx Proxy Manager installed and running already, if followed Homelab. Proxy. It allows to create proxied hosts and assign them nice names:

  • Add new Proxied Host
  • Fill required information
    • Domain names. Assume router is configured to pass domain home to homelab. Then, lets assume seafile should be a subdomain docs. Then define domain name docs.home. It is possible to assing multiple domain names
    • Forward hostname. Both services - seafile and nginx proxy manager are connected to the same network intranet. Thus we can use alias defined to access them. Define seafile
    • Forward port. As defined in stack, seafile should listen on port 8010.

TO BE CONTINUED… Link to heading

And that’s it! You now have your own git server running on your homelab. Now, you can easily sync and share files between multiple devices, collaborate on documents in real-time, and access your files from the network.

In the following post Homelab. IoT Stack, I will describe how to install IoT Stack - a set of services, useful for internet of things projects.