From f627140a161fc475583436fff676a424108b5445 Mon Sep 17 00:00:00 2001 From: wkdaily Date: Wed, 8 May 2024 09:28:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20filebrowser=20=E5=A6=82?= =?UTF-8?q?=E4=BD=95=E8=AE=BE=E7=BD=AE=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...%95%E8%AE%BE%E7%BD%AE%E7%AB%AF%E5%8F%A3.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 filebrowser-%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AE%E7%AB%AF%E5%8F%A3.md diff --git a/filebrowser-%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AE%E7%AB%AF%E5%8F%A3.md b/filebrowser-%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AE%E7%AB%AF%E5%8F%A3.md new file mode 100644 index 0000000..f6ef5b1 --- /dev/null +++ b/filebrowser-%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AE%E7%AB%AF%E5%8F%A3.md @@ -0,0 +1,30 @@ +### 首先停止filebrowser所在进程 +`sudo pkill -f filebrowser` + +### 删除配置文件db +`sudo rm -rf /root/filebrowser.db` + +### 设置新的端口 比如6060 +`sudo filebrowser config init -p 6060` + +### 重新启动 +`nohup sudo filebrowser -r / --address 0.0.0.0 >filebrowser.log 2>&1 &` + +### 另外可以修改一下自启动文件,也将端口修改为6060或者干脆不写 +`/etc/systemd/system/filebrowser.service` + +``` +[Unit] +Description=File Browser Service +After=network.target + +[Service] +Type=simple +User=root +ExecStart=/usr/local/bin/filebrowser -r / --address 0.0.0.0 --port 6060 +Restart=always + +[Install] +WantedBy=multi-user.target + +``` \ No newline at end of file