
Seafile is an open-source cloud storage platform designed for file synchronization, sharing, and team collaboration. Seafile supports custom file properties and multiple organizational views to manage content more effectively. It offers a Dropbox-like experience, while giving you full control over your data on your own server.
This article demonstrates how to deploy Seafile on Ubuntu 24.04 using Docker Compose and secure it with HTTPS.
Before you begin:
seafile.example.com, pointing to your server’s public IP address.Set up the project directory to store configuration files and persistent data. You must also configure the environment variables to define your domain, security keys, and administrative credentials.
Create the /opt/seafile directory.
Change ownership of the directory to your current user. This allows you to manage files without using sudo for every command.
Navigate to the project directory.
Download the official environment variable template.
Install pwgen to generate a secure secret key.
Generate a random 40-character string for the JWT_PRIVATE_KEY variable of the .env file.
Copy the output string to use this in the next step.
Edit the .env file.
Update the following variables:
SEAFILE_SERVER_HOSTNAME: Set this to your domain (e.g., seafile.example.com).SEAFILE_SERVER_PROTOCOL: Change http to https to enable TLS encryption.JWT_PRIVATE_KEY: Paste the random string you generated in the last step.SEAFILE_MYSQL_DB_PASSWORD: Set a secure password for the database connection.INIT_SEAFILE_MYSQL_ROOT_PASSWORD: Set a secure password for the database root user.INIT_SEAFILE_ADMIN_EMAIL: Set your email address.INIT_SEAFILE_ADMIN_PASSWORD: Set a strong password for the admin dashboard.Save and close the file.
Download the official Docker Compose files and start the services. Seafile uses a modular setup where different components are defined in separate YAML files.
Download the core Seafile server manifest.
The seafile-server.yml defines the core services required for file synchronization:
Download the SeaDoc extension manifest.
The seadoc.yml defines the seadoc service. This container runs the document engine that allows multiple users to edit .sdoc files simultaneously in real-time.
Download the Caddy web server manifest.
The caddy.yml file defines the caddy service. Caddy acts as a reverse proxy that automatically obtains and renews TLS certificates from Let's Encrypt, ensuring your site is accessible via HTTPS.
Add your user account to the docker user group.
Apply new group membership.
Start the Seafile stack.
The .env file downloaded earlier contains a COMPOSE_FILE variable that instructs Docker to use all three YAML files (seafile-server.yml, caddy.yml, seadoc.yml) simultaneously.
Verify that the containers are running.
For more information on managing a Docker Compose stack, see the How To Use Docker Compose article.
Open your web browser and navigate to your domain, such as https://seafile.example.com.
Log in using the Email and Password you defined in the .env file to access Seafile Dashboard.
By following this article, you successfully deployed Seafile on Ubuntu 24.04. You now have a private, secure file cloud with integrated real-time document collaboration, and HTTPS encryption. For more information, refer to the official Seafile Manual.
0 Comments
Be the first to comment and share your perspective with the community.