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

相关推荐
算家计算9 小时前
7B参数拿下30个世界第一!Hunyuan-MT-7B本地部署教程:腾讯混元开源业界首个翻译集成模型
人工智能·开源
FIT2CLOUD飞致云9 小时前
SQLBot开源智能问数系统成功进入GitHub趋势榜主榜,Star数突破2,000个!
开源
scilwb17 小时前
Isaac Sim机械臂教程 - 阶段1:基础环境搭建与机械臂加载
人工智能·开源
杨杨杨大侠17 小时前
Atlas Mapper 案例 01:初级开发者 - 电商订单系统开发
java·开源·github
FIT2CLOUD飞致云1 天前
AI智能问数能力全面升级,DataEase开源BI工具v2.10.13 LTS版本发布
开源
FIT2CLOUD飞致云1 天前
九月月报丨MaxKB在不同规模医疗机构的应用进展汇报
人工智能·开源
算家计算1 天前
AI配音革命!B站最新开源IndexTTS2本地部署教程:精准对口型,情感随心换
人工智能·开源·aigc
OpenTiny社区1 天前
OpenTiny NEXT 内核新生:生成式UI × MCP,重塑前端交互新范式!
前端·开源·agent
容器魔方1 天前
Bloomberg 正式加入 Karmada 用户组!
云原生·容器·云计算
幂简集成explinks2 天前
e签宝签署API更新实战:新增 signType 与 FDA 合规参数配置
后端·设计模式·开源