Matomo Docker 迁移完整指南
本文记录一次将自托管 Matomo(Docker 部署)从旧服务器完整迁移到新服务器的全过程,包含高 CPU 问题排查、数据迁移、HTTPS 配置等步骤。域名统一使用 stats.example.com 作为示例。
本文记录一次将自托管 Matomo(Docker 部署)从旧服务器完整迁移到新服务器的全过程,包含高 CPU 问题排查、数据迁移、HTTPS 配置等步骤。域名统一使用 stats.example.com 作为示例。
Date: 2026-06-14
Primary symptom: pages opened slowly and some requests returned 504 or 522-like timeout errors
Primary cause: relay-to-origin TCP connection pressure, not slow application response
The production path was not a single-hop request from users to the application server. Traffic passed through a relay layer before reaching the origin server:
users -> edge or relay layer -> origin web server -> application server
That detail mattered. A slow browser experience can come from several different layers:
The first checks showed that the application was responding quickly when tested locally from the origin. That changed the investigation from "why is the app slow?" to "where is the request waiting before it reaches the app?"
项目地址:https://github.com/hacdias/webdav
镜像:ghcr.io/hacdias/webdav:latest(推荐)或hacdias/webdav:latest
部署目录:/var/www/webdav/(所有文件集中管理)
/var/www/webdav/
├── docker-compose.yml # Docker Compose 主配置文件
├── config.yml # WebDAV 核心配置文件(用户名、密码、权限等)
├── README.md # 本文档(可直接复制官方 README)
└── data/ # WebDAV 实际存储目录(挂载到容器 /data)
# 1. 更新系统并安装 Docker + Compose
sudo apt update && sudo apt upgrade -y
sudo apt install -y docker.io docker-compose-plugin
# 2. 将当前用户加入 docker 组(无需每次 sudo)
sudo usermod -aG docker $USER
newgrp docker # 或重启终端
# 创建目录
sudo mkdir -p /var/www/webdav/data
sudo chown -R $USER:$USER /var/www/webdav
# 进入目录
cd /var/www/webdav
deactivate if in a (venv)).Install Build Dependencies
Install the necessary tools and libraries for compiling libavif and its dependencies.
sudo apt update
sudo apt install -y build-essential cmake ninja-build libpng-dev libjpeg-dev yasm pandoc git libaom-dev
Clone the libavif Repository
Download the latest libavif source code from GitHub.
git clone https://github.com/AOMediaCodec/libavif.git
cd libavif
https://github.com/yinxin630/fiora
https://github.com/yinxin630/fiora/blob/master/docker-compose.yaml
https://yinxin630.github.io/fiora/zh-Hans/docs/install#docker-%E8%BF%90%E8%A1%8C
docker-compose.yml 文件
services:
mongodb:
image: mongo
container_name: fiora_db
volumes:
- ${PWD}/data/mongo:/data/db
restart: always
redis:
image: redis
container_name: fiora_redis
volumes:
- ${PWD}/data/redis:/data
restart: always
fiora:
image: suisuijiang/fiora
container_name: fiora
ports:
- "127.0.0.1:9200:9200"
environment:
- Database=mongodb://mongodb:27017/fiora
- RedisHost=redis
- Administrator=admin
- DisableCreateGroup=true
depends_on:
- mongodb
- redis
restart: always
Lsky Pro 是一款开源的图床程序,支持多种存储方式,提供了良好的用户界面和丰富的功能。本文将详细介绍如何使用 Docker Compose 来部署 Lsky Pro,这种方式相比传统安装更加简单和可维护。
https://docs.lsky.pro/guide/install
https://www.cpolar.com/blog/casaos-uses-docker-to-build-lsky-pro-locally
https://hub.docker.com/r/dko0/lsky-pro
https://blog.laoda.de/archives/docker-compose-install-lskypro
https://github.com/lsky-org/lsky-pro/issues/256
mkdir lsky-pro
cd lsky-pro
Waline是一个简洁、安全的评论系统,支持多种部署方式。本文将介绍如何使用Docker独立部署Waline,并配置MySQL数据库来存储评论数据。通过Docker部署不仅简化了安装过程,还提供了更好的环境隔离和可移植性。
https://waline.js.org/guide/database.html
https://bg3lnt.xyz/posts/dc23e930.html
在开始部署之前,请确保您的系统满足以下要求:
在本文中,我们将详细介绍如何在Debian 12服务器上配置Nginx,设置Cloudflare CDN,以及为需要直接访问源站的特殊程序申请SSL证书。这个过程涉及多个步骤,包括安装Nginx,配置域名,使用Cloudflare CDN,以及使用Certbot申请SSL证书。
https://certbot-dns-cloudflare.readthedocs.io/en/stable/
https://lucasc.me/post/howto-certbot-dns-cloudflare-in-webmin
首先,我们在Debian 12服务器上安装Nginx:
sudo apt update
sudo apt install nginx
安装完成后,配置您的域名。编辑Nginx配置文件,通常位于/etc/nginx/sites-available/目录下。
接下来,我们使用Cloudflare CDN来提高网站性能和安全性:
在这篇文章中,我们将探讨如何使用Cloudflare API自动切换DNS。我们将使用Uptime Kuma来监控网站运行状态,并通过webhook进行通知。我们还将运行webhookd服务来接收Uptime Kuma的请求,并在网站状态出现问题时,使用Cloudflare API切换到备用服务器。
https://github.com/louislam/uptime-kuma
https://github.com/ncarlier/webhookd
https://github.com/ncarlier/webhookd/issues/82
https://www.tech-otaku.com/web-development/using-cloudflare-api-manage-dns-records/
首先,我们需要一个工具来监控我们的网站运行状态。这里,我们选择使用Uptime Kuma,它是一个功能强大的开源监控工具,可以帮助我们实时了解网站的运行状况。
当Uptime Kuma检测到网站状态发生变化时,它可以通过webhook发送通知。我们需要运行一个webhookd服务来接收这些通知。
https://github.com/rclone/rclone/wiki/Systemd-rclone-mount#systemd
~/.config/rclone/rclone.conf)[Unit]
Description=RClone mount of users remote %i using filesystem permissions
Documentation=http://rclone.org/docs/
After=network-online.target
....