From eb2db96972f591aa57cb66848a1a9cc5cfc807e0 Mon Sep 17 00:00:00 2001 From: Andelf Date: Fri, 14 Jul 2023 09:04:20 +0800 Subject: [PATCH] Add note about unsafe exposed port for dockker commands (#9857) * fix(docs): warn about exposed container ports --- docs/docker-web-app-guide.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/docker-web-app-guide.md b/docs/docker-web-app-guide.md index 017deb7b5c..40dadef936 100644 --- a/docs/docker-web-app-guide.md +++ b/docs/docker-web-app-guide.md @@ -3,17 +3,18 @@ From v0.5.6, Logseq is also available as a Docker image of Web App. The Docker image is available at [ghcr.io/logseq/logseq-webapp:latest](https://github.com/logseq/logseq/pkgs/container/logseq-webapp). -**NOTE:** Logseq web app uses [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API) to access the file system. You need a [compatible browser](https://caniuse.com/native-filesystem-api). -Also, an HTTPS connection is required if you are accessing it remotely. +> **Note** +> Logseq web app uses [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API) to access the file system. You need a [compatible browser](https://caniuse.com/native-filesystem-api). +> Also, an HTTPS connection is required if you are accessing it remotely. ## Simple one-line start(local machine) ```shell docker pull ghcr.io/logseq/logseq-webapp:latest -docker run -d --rm -p 3001:80 ghcr.io/logseq/logseq-webapp:latest +docker run -d --rm -p 127.0.0.1:3001:80 ghcr.io/logseq/logseq-webapp:latest ``` -Open the browser and go to http://localhost:3001. +Open the browser and go to . ## Remote(non-local) access @@ -70,6 +71,10 @@ docker pull ghcr.io/logseq/logseq-webapp:latest docker run -d --rm -p 8443:443 -v `pwd`:/etc/nginx/certs -v ./ssl.conf:/etc/nginx/conf.d/ssl.conf ghcr.io/logseq/logseq-webapp:latest ``` +> **Note** +> The above command will expose the web app to the public network, which is not recommended and may cause security issues. +> Please make sure the firewall is configured properly. + ### Done! Open your browser and navigate to `https://192.168.11.95:8443`.