
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://secure.travis-ci.org/haiwen/seafile-docker.png?branch=master](http://travis-ci.org/haiwen/seafile-docker)
https://docker.com/ is an open source project to pack, ship and run any Linux application in a lighter weight, faster container than a traditional virtual machine.
Docker makes it much easier to deploy https://github.com/haiwen/seafile on your servers and keep it updated.
The base image configures Seafile with the Seafile team's recommended optimal defaults.
If you are not familiar with docker commands, please refer to https://docs.docker.com/engine/reference/commandline/cli/.
Starting with 7.0, we have adjusted seafile-docker image to use multiple containers. The old image runs MariaDB-Server and Memcached in the same container with Seafile server. Now, we strip the MariaDB-Server and Memcached services from the Seafile image and run them in their respective containers.
If you plan to deploy seafile 7.0, you should refer to the https://download.seafile.com/published/seafile-manual/docker/deploy%20seafile%20with%20docker.md.
If you plan to upgrade 6.3 to 7.0, you can refer to the https://download.seafile.com/published/seafile-manual/docker/6.3%20upgrade%20to%207.0.md.
To run the seafile server container:
shdocker run -d --name seafile \ -e SEAFILE_SERVER_HOSTNAME=seafile.example.com \ -v /opt/seafile-data:/shared \ -p 80:80 \ seafileltd/seafile:latest
Wait for a few minutes for the first time initialization, then visit http://seafile.example.com to open Seafile Web UI.
This command will mount folder /opt/seafile-data at the local server to the docker instance. You can find logs and other data under this folder.
Custom Admin Username and Password
The default admin account is me@example.com and the password is asecret. You can use a different password by setting the container's environment variables:
e.g.
shdocker run -d --name seafile \ -e SEAFILE_SERVER_HOSTNAME=seafile.example.com \ -e SEAFILE_ADMIN_EMAIL=me@example.com \ -e SEAFILE_ADMIN_PASSWORD=a_very_secret_password \ -v /opt/seafile-data:/shared \ -p 80:80 \ seafileltd/seafile:latest
If you forget the admin password, you can add a new admin account and then go to the sysadmin panel to reset user password.
Let's encrypt SSL certificate
If you set SEAFILE_SERVER_LETSENCRYPT to true, the container would request a letsencrypt-signed SSL certificate for you automatically.
e.g.
docker run -d --name seafile \ -e SEAFILE_SERVER_LETSENCRYPT=true \ -e SEAFILE_SERVER_HOSTNAME=seafile.example.com \ -e SEAFILE_ADMIN_EMAIL=me@example.com \ -e SEAFILE_ADMIN_PASSWORD=a_very_secret_password \ -v /opt/seafile-data:/shared \ -p 80:80 \ -p 443:443 \ seafileltd/seafile:latest
If you want to use your own SSL certificate:
/opt/seafile-data/ssl, and put your certificate and private key under the ssl directory.seafile.example.com, then your certificate must have the name seafile.example.com.crt, and the private key must have the name seafile.example.com.key.Modify Seafile Server Configurations
The config files are under shared/seafile/conf. You can modify the configurations according to https://manual.seafile.com/
After modification, you need to restart the container:
docker restart seafile
Find logs
The seafile logs are under shared/logs/seafile in the docker, or /opt/seafile-data/logs/seafile in the server that run the docker.
The system logs are under shared/logs/var-log, or /opt/seafile-data/logs/var-log in the server that run the docker.
Add a new Admin
Ensure the container is running, then enter this command:
docker exec -it seafile /opt/seafile/seafile-server-latest/reset-admin.sh
Enter the username and password according to the pro***s. You now have a new admin account.
/shared
Placeholder spot for shared volumes. You may elect to store certain persistent information outside of a container, in our case we keep various logfiles and upload directory outside. This allows you to rebuild containers easily without losing important information.
/var/log inside the container. For example, you can find the nginx logs in shared/logs/var-log/nginx/.shared/logs/seafile/seafile.log.TO upgrade to latest version of seafile server:
shdocker pull seafileltd/seafile:latest docker rm -f seafile docker run -d --name seafile \ -e SEAFILE_SERVER_LETSENCRYPT=true \ -e SEAFILE_SERVER_HOSTNAME=seafile.example.com \ -e SEAFILE_ADMIN_EMAIL=me@example.com \ -e SEAFILE_ADMIN_PASSWORD=a_very_secret_password \ -v /opt/seafile-data:/shared \ -p 80:80 \ -p 443:443 \ seafileltd/seafile:latest
If you are one of the early users who use the launcher script, you should refer to https://github.com/haiwen/seafile-docker/blob/master/upgrade_from_old_format.md document.
When files are deleted, the blocks comprising those files are not immediately removed as there may be other files that reference those blocks (due to the magic of deduplication). To remove them, Seafile requires a https://download.seafile.com/published/seafile-manual/maintain/seafile_gc.md process to be run, which detects which blocks no longer used and purges them. (NOTE: for technical reasons, the GC process does not guarantee that every single orphan block will be deleted.)
The required scripts can be found in the /scripts folder of the docker container. To perform garbage collection, simply run docker exec seafile /scripts/gc.sh. For the community edition, this process will stop the seafile server, but it is a relatively quick process and the seafile server will start automatically once the process has finished. The Professional supports an online garbage collection.
You can run docker commands like "docker logs" or "docker exec" to find errors.
shdocker logs -f seafile # or docker exec -it seafile bash
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务