16.6k stars 开源的本地文件共享传输工具 docker部署教程

Install

First, Install docker with docker-compose.

Then, clone the repository:

复制代码
    git clone https://github.com/RobinLinus/snapdrop.git
    cd snapdrop
    docker-compose up -d

Now point your browser to http://localhost:8080.

  • To restart the containers run docker-compose restart.
  • To stop the containers run docker-compose stop.
  • To debug the NodeJS server run docker logs snapdrop_node_1.

Run locally by pulling image from Docker Hub

Have docker installed, then use the command:

复制代码
    docker pull linuxserver/snapdrop

To run the image, type (if port 8080 is occupied by host use another random port :80):

复制代码
    docker run -d -p 8080:80 linuxserver/snapdrop

PWAs require that the app is served under a correctly set up and trusted TLS endpoint.

The nginx container creates a CA certificate and a website certificate for you. To correctly set the common name of the certificate, you need to change the FQDN environment variable in docker/fqdn.env to the fully qualified domain name of your workstation.

If you want to test PWA features, you need to trust the CA of the certificate for your local deployment. For your convenience, you can download the crt file from http://<Your FQDN>:8080/ca.crt. Install that certificate to the trust store of your operating system.

  • On Windows, make sure to install it to the Trusted Root Certification Authorities store.
  • On MacOS, double click the installed CA certificate in Keychain Access, expand Trust, and select Always Trust for SSL.
  • Firefox uses its own trust store. To install the CA, point Firefox at http://<Your FQDN>:8080/ca.crt. When prompted, select Trust this CA to identify websites and click OK.
  • When using Chrome, you need to restart Chrome so it reloads the trust store (chrome://restart). Additionally, after installing a new cert, you need to clear the Storage (DevTools -> Application -> Clear storage -> Clear site data).

Please note that the certificates (CA and webserver cert) expire after a day. Also, whenever you restart the nginx docker, container new certificates are created.

The site is served on https://<Your FQDN>:443.

Deployment Notes

The client expects the server at http(s)://your.domain/server.

When serving the node server behind a proxy, the X-Forwarded-For header has to be set by the proxy. Otherwise, all clients that are served by the proxy will be mutually visible.

By default, the server listens on port 3000.

For an nginx configuration example, see docker/nginx/default.conf.

参考地址:docs/local-dev.md · AscendKing/snapdrop - Gitee.com

相关推荐
冬奇Lab8 小时前
每日一个开源项目(第128篇):Agent Skills - 给 AI 编程 Agent 装上工程纪律
人工智能·开源·资讯
欧阳天羲9 小时前
【开源资料】AI激光灭蚊机器人|YOLOv8数据集标注模板+完整训练配置文件一键拿走(适配ESP32-S3/树莓派双版本)
人工智能·机器人·开源
正经教主10 小时前
【docker基础】第五课:Docker网络详解
运维·docker·容器
鹤鸣的日常11 小时前
前端运行时动态环境变量方案
前端·react.js·docker·前端框架·vue·gitlab
明略科技12 小时前
什么是 RAG?为什么光靠大模型的记忆力远远不够
开源·agent
我是谁??14 小时前
ubuntu22.04 通过docker部署vLLM(Qwen3-0.6B)大模型+New API+OpenWebUI
docker·容器·vllm
运维瓦工15 小时前
DevOps 生态介绍(十):Docker Compose 核心 YAML 配置详解与常用命令大全
spring cloud·docker·容器
云烟成雨TD15 小时前
Spring AI 1.x 系列【59】容器化开发支持:Docker Compose 与 Testcontainers
人工智能·spring·docker
Plastic garden15 小时前
K8s(10)NFS 的动态 PV 创建数据库给k8s的mysql和redis
docker·容器·kubernetes
与海boy16 小时前
docker compose minio
docker·容器·eureka