What is Seafile?
Seafile is an open source file sync&share solution designed for high reliability, performance and productivity. Sync, share and collaborate across devices and teams. Build your team's knowledge base with Seafile's built-in Wiki feature. - https://seafile.com/
Installing Docker
- Log into the Linux based device
- Run the following commands in the terminal
# install prerequisites
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y
# add docker gpg key
curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
# add docker software repository
sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
# install docker
sudo apt install docker-ce docker-compose containerd.io -y
# enable and start docker service
sudo systemctl enable docker && sudo systemctl start docker
# add the current user to the docker group
sudo usermod -aG docker $USER
# reauthenticate for the new group membership to take effect
su - $USER
Running Seafile
- Now that Docker is installed, run the following commands to setup the Seafile Docker container and run it
# create working directories
mkdir ~/docker/mariadb -p && mkdir ~/docker/seafile
# set owner of working directories
sudo chown "$USER":"$USER" ~/docker -R
# create containers network
docker network create containers
# run the mariadb docker container
docker run -d --name mariadb --network containers -e MYSQL_ROOT_PASSWORD=r00tp@ss -v ~/docker/mariadb:/var/lib/mysql --restart=unless-stopped mariadb:latest
# run the seafile docker container
docker run -d --name seafile --network containers -p 8080:80 -e DB_HOST=mariadb -e DB_ROOT_PASSWD=r00tp@ss -e TIME_ZONE=America/New_York -v ~/docker/seafile:/shared --restart=unless-stopped seafileltd/seafile-mc:11.0-latest
Seafile Setup
- Open a web browser and navigate to http://DNSorIP:8080
- Login with the username me@example.com and password asecret
- Click the profile icon at the top right of the screen > System Admin
- Select Users from the left navigation menu
- Click the Add User button at the top of the screen
- Complete the new user form with an email and password > Click Submit
- Click the Admin tab
- Click the Add Admin button at the top of the screen
- Search for and select the the new user > Submit
- Click the profile icon at the top right of the screen > Logout
- Log back in using the new user credentials
- Click the profile icon at the top right of the screen > System Admin
- Select Users from the left navigation menu
- Check the box next to the me@example.com > Click Delete Users at the top of the screen
- Welcome to Seafile
Documentation: https://manual.seafile.com/docker/deploy_seafile_with_docker/