Updog——HTTP文件下载服务器

Updog

Updog is a replacement for Python’s SimpleHTTPServer. It allows uploading and downloading via HTTP/S, can set ad hoc SSL certificates and use HTTP basic auth.

搭建环境

  • Debian 12
  • Python 3
  • pip

安装 Python 3 和 pip

1sudo apt update
2sudo apt install python3 python3-pip

安装 Updog

通过 pip 安装 Updog:

1sudo pip3 install updog

配置Updog自启

创建systemd服务文件:

1sudo nano /etc/systemd/system/updog.service

添加以下内容:

 1[Unit]
 2Description=Updog File Server
 3After=network.target
 4
 5[Service]
 6Type=simple
 7User=root
 8ExecStart=/usr/local/bin/updog -p 8080
 9WorkingDirectory=/path/to/your/directory
10Restart=on-failure
11
12[Install]
13WantedBy=multi-user.target

/path/to/your/directory 替换为实际的目录路径,将 your_useryour_group 替换为你的用户名和用户组

启动并启用服务:

1sudo systemctl daemon-reload
2sudo systemctl start updog
3sudo systemctl enable updog

这样,Updog 就会在每次启动时自动运行,并且可以通过 Web 浏览器访问

使用 Hugo 构建
主题 StackJimmy 设计