Setting up Seafile File Sync Server via Docker

Setting up Seafile File Sync Server via Docker

12:59, 21.12.2023

Article Content
arrow

  • Deploying Seafile Server Using Docker Compose
  • Configuring the Working Directory
  • Configuring Seafile Deployment with Docker Compose
  • Launching the Seafile Server via Docker Compose
  • Accessing and Logging into the Seafile Server
  • Connecting the Seafile Client to the Server
  • Helpful Recommendations
  • Conclusion

The assistance of third-party cloud services is really helpful and lots of users choose this option. However, recently there has been increased popularity of self-hosting. There is a chance that together with the self-hosting you are getting such benefits as customization and privacy.

Because of the demand for different tools, Seafile has appeared as an effective variant for sharing and synchronization of files. This open-source solution gives users a huge power for effortless data management.

When self-hosting the Seafile server, you can be 100 percent sure that sensitive data is under your full control.

Here in this article, you will get all the needed information about the installation process and other info. To start the process, you should better install Docker. The next important step is installing Docker Compose. The installation process is really easy, just fill in the next commands:

sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Deploying Seafile Server Using Docker Compose

HTTPS is not applied for the Seafile server deployment that is discussed below. This means it can be used only on the local network, and it cannot be connected to the internet.

To get SSL encryption, in case you want to start with this variant, it is advisable to put the server behind a server proxy. Among a couple of really popular variants for reverse proxy, there are such as Apache, Caddy, Istio, HAProxy, Nginx, Linkerd, HAPoxy, and others. These reverse proxy servers are dealing with incoming requests. 

However, if you want for Seafile server to be available on the internet, then you can find a couple of great variants for a valid free SSL certificate. So that will guarantee a secure connection between the server and the client apps.

Configuring the Working Directory

The initial step is to create the folder where will be located the files of the Docker Composer. After that choose it and all the commands which we will be mentioned here should be done in this location.

mkdir seafile
cd seafile

Configuring Seafile Deployment with Docker Compose

Make the file and fill in such details into it:

nano docker-compose.yaml
version: '3'
 services:
  db:

image: mariadb:10.11
container_name: seafile-mysql
environment:

  - MYSQL_ROOT_PASSWORD=
  - MYSQL_LOG_CONSOLE=true
volumes:
  - mysql-data:/var/lib/mysql
restart: unless-stopped
networks:
  - seafile-net
  memcached:
image: memcached:latest
container_name: seafile-memcached
entrypoint: memcached -m 256
restart: unless-stopped
networks:
  - seafile-net
  seafile:
image: seafileltd/seafile-mc:latest
container_name: seafile
ports:
  - "80:80"
volumes:
  - seafile-data:/shared
environment:
  - DB_HOST=db
  - DB_ROOT_PASSWD=
  - TIME_ZONE=
  - SEAFILE_ADMIN_EMAIL=
  - SEAFILE_ADMIN_PASSWORD=
  - SEAFILE_SERVER_LETSENCRYPT=false
  - SEAFILE_SERVER_HOSTNAME=
depends_on:
  - db
  - memcached
restart: unless-stopped
networks:
  - seafile-net
networks:
  seafile-net:
volumes:
  mysql-data: {}
  seafile-data: {}

There are a couple of parameters that should be adjusted before saving the file:

  • Time-zone: the format of the time zone should be “country/city”, when mentioning the correct zone the interaction with Seafile server will be shown with the proper parameter.
  • DB ROOT PASSWD: fill in the same pass as in MySQL root account.
  • MYSQL ROOT PASSWORD: fill in the same pass as in the previous parameter.
  • SEAFILE ADMIN EMAIL: this will be not only the admin email address but also the name that will be used to log in to Seafile server.
  • SEAFILE ADMIN PASSWORD: the pass should be the same as in the previously discussed variants.
  • SEAFILE SERVER HOSTNAME: there should be mentioned the IP of the machine where the Seafile server is.

When you have filled in relevant information for your case, then you can close the file.

Launching the Seafile Server via Docker Compose

Now, it is possible to launch Seafile using Docker Compose. To do this, you will need to execute the next command in the Seafile directory.

docker-compose up -d

After that, the Docker images start downloading. Depending on your internet speed the process can take something from a couple of secs to several minutes. Once the process is completed, you will see that everything is successfully running.

Usually, the delay is only during the first minutes due to the necessity of the image download. All the other runs take a couple of seconds because they will be locally available on the system.  

Accessing and Logging into the Seafile Server

Open your browser and choose the IP where the Seafile server is functioning. You will see a login window where you should fill in your pass and email which you have mentioned in the .yaml file.

That is it, now your Seafile server is installed, and you can proceed to its management via a web-based interface.

Connecting the Seafile Client to the Server

Connection of the server to the Seafile client can have various steps depending on the OS that you are using. Once you finish this process, it will be possible to synchronize the Seafile with the local files.

Seafile users have access to different clients for different OSs including macOS, Linux, and Windows. They can be easily downloaded from the official website. Moreover, mobile users can also get this client for iOS and Android.

Here we will share the installation process for the most used Linux distros. Let’s begin with Linux Mint, Ubuntu, and Debian.  The following command is needed for the installation:

 sudo apt install seafile-gui

The users of Manjaro and Arch can perform installation with the AUR helper, by using the following command:

yay -S seafile-client

Seafile client is in the repository, so Fedora users will need one command for the installation process:

sudo dnf install seafile-client

Once the installation is completed, you can open the app from the menu. Just type “Seafile” in the search and run it. After that the Seafile initialization will appear, there you should pick a folder where to synchronize the files. The subfolder which is called “Seafile” is created automatically without the user’s interference.

After clicking the next button, you will need to fill in the credentials and server address, and press Login. The window closes and the Seafile client automatically launches. Here is when you will need to start the files’ synchronization with the server.

A useful option is that you can install the client on the other gadget in case you want to have the same files on several devices.

Helpful Recommendations

Together with the Seafile client, it will be rather beneficial to use the Seafile Drive client. It is responsible for mapping the storage on the server and it may be compared with the virtual drive on the PC. The major benefit of the client is immediate accessibility of the Seafile files without the necessity to sync them. It will be a good choice in case you want to extend the local disk with the massive storage on the server.

For the quick and automatic update of the Docker container, you can use Watchtower. Constant updating can be time-consuming when managing lots of containers across several hosts. So such a tool as Watchtower can be helpful for periodical checks and system updates. This app is really simple to install, and you won’t need additional knowledge to manage it.

The last helpful tool is Portainer. It is used for the monitoring, and management of the Docker. This tool is convenient, and extremely easy to use as it performs tasks without the necessity to type difficult commands.     

If you need any additional information about the installation or usage of the above-discussed tools, there is plenty of information and step-by-step tutorials.  

Conclusion

The article includes a detailed process of the installation of Seafile using Docker Compose. Moreover, you can find here all the information about the client installation and its connection to the server.

Just by following a couple of simple steps, you can use the full potential of the Seafile synchronization. Such an approach to the setup guarantees reliable performance.

Any user can easily set up Seafile server via Docker without any technical skills. All the information is described in this article, and for additional data, you’d rather visit the official website. There you will definitely find additional recommendations.  

views 7m, 1s
views 2
Share

Was this article helpful to you?

VPS popular offers

Other articles on this topic

cookie

Accept cookies & privacy policy?

We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the HostZealot website.