This guide outlines the process for installing Seafile, MariaDB, and connecting it online using Cloudflare Tunnel with your custom hostname or use it with Nginx Proxy Manager
Preparation Steps:
- Replace
seafile.example.tld
with your actual hostname. You can check available domains at Cloudflare.
Docker Configuration:
- Navigate to Unraid Settings → Docker.
- Set Enable Docker to No and click Apply.
- Change Preserve user defined networks to Yes.
- Set Enable Docker to Yes and click Apply again.
- Open the terminal (click the >_ icon).
- Create a Docker network:
docker network create seafile-net
- Verify the network creation:
docker network list
- Close the terminal.
Installing MariaDB:
- Install MariaDB from the Linuxserver repository.
- On the configuration screen, modify the following:
- Name: seafile-mariadb
- Network Type: seafile-net
- MYSQL_ROOT_PASSWORD: (choose a password and note it for later)
- MYSQL_USER: (choose a username)
- MYSQL_PASSWORD: (choose a password)
- Apply settings and install.
Installing Seafile:
- Install Seafile from dglb99’s repository.
- On the configuration screen, adjust:
- Repository: seafileltd/seafile-mc:11.0-latest
- Network Type: seafile-net
- Seafile Hostname: seafile.example.tld
- SQL Root Password: (the password noted earlier)
- Admin Email: (use a real email for recovery)
- Admin Password: (choose a password)
- Apply settings and install.
Your Seafile server should now be accessible within your private network. To make it available online, consider these options:
- VPN Hosting: This allows remote access but may complicate multiple user access for Seafile. Configure this via Unraid Settings → VPN Manager.
- NGINX Proxy Manager: A viable solution, though it may require additional configuration.
- Cloudflare Tunnel: This is straightforward to set up. Refer to Spaceinvaderone’s video tutorial; if you purchased your domain through Cloudflare, skip to 3:36 in the video for tunnel connection instructions.
After completing these steps, your server should be online!
Troubleshooting Common Issues:
-
“File Upload Failed”:
- If HTTPS is enabled, go to the Seafile web interface → System admin → Settings.
- Ensure both
SERVICE_URL
andFILE_SERVICE_ROOT
are set to HTTPS (e.g.,https://seafile.example.tld
andhttps://seafile.example.tld/seafhttp
).
-
“CSRF Verification Failed”:
- Edit
seahub_settings.py
located at\\SERVER\seafile\seafile\conf
. - Add the line:
CSRF_TRUSTED_ORIGINS = ["https://seafile.example.tld"]
- To edit this file, make the folder a public share with read/write permissions.
- Save changes and restart the server to apply them.
- Edit
“Failed to download. The total size of the files exceeded the limit.”
- Open seafile.conf ( \SERVER\seafile\seafile\conf ) and add
max_download_dir_size=10000
andmax_upload_size=10000
under[fileserver]
. Change the value to whatever you want your upper limit to be, in this example it’s set to 10,000MB. Save the file and restart the server to see changes.
, for anyone having problems running it locally, you might want change these IPs and ports in Seafile System Admin Settings. After this works, try enabling https for better security.
Note that port 8080 is the default port used in the Unraid template and the IP I used here is the IP address of my Unraid server Seafile is running on.
Please change it
- SERVICE_URL: [http://192.168.1.120:8082](http://192.168.1.120 :8082/)
- FILE_SERVER_ROOT: http://192.168.1.120:8082/seafhttp
Now fire up nginx-proxy-manager
- Login into nginx-proxy-manager
- Add new proxy host (seafile.example.tld as specified in seafile-docker-compose.yml/ unraid sefile app)
- Use HTTP (not HTTPS) to HOST IP, Port 8180 (as specified in seafile-docker-compose.yml)
- Turn on SSL options and force SSL
- Add custom nginx configuration within Advanced
proxy_read_timeout 310s;
proxy_set_header Host $host;
proxy_set_header Forwarded "for=$remote_addr;proto=$scheme";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Connection "";
proxy_http_version 1.1;
client_max_body_size 0;
Test connection
- Login to Seafile should work now
- Upload/Download will not work
Adjust config files in Seafile container
- cd to seafile-data/seafile/conf/
- edit seahub_settings.py
- Change SERVICE_URL and FILE_SERVER_ROOT to use “https://” instead of “http://”
You have to define a “custom location” for your entry in Nginx Proxy Manager that points to FILE_SERVER port (default 8082) and has config below:
rewrite ^/seafhttp(.*)$ $1 break;
client_max_body_size 0;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_request_buffering off;