Self hosting port exposure #305
Replies: 1 comment 1 reply
-
|
The default Not exposing clickhouse (or any other port) unless on the shared network should never be an issue in Docker, as long as the network is shared amongst the containers that need access to it. This is de-facto the correct way of using Docker, and resolves the misconception of Docker being "unsafe" because it bypasses UFW and opens ports which is often brought up as a huge issue of docker. The huge issue here is that 99.99% of all suggested docs, install methods etc (even docker doc itself) does not use that approach as the default, and rather uses the "it just works" approach of simply opening ports. From what I see in basically all other self hosted or else docker related docs, this is always how it is documented (opening ports) I have moved this to a discussion, so the Devs can chime in on here (and perhaps other users) to make a decision about it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've made the following modifications to decrease the potential exposure of services during self hosting.
I'd like to know if there's any reason not to apply them (side effects I didn't realize), and whether we should PR them in.
In .env, I do not want the 3001 and 3002 exposed to any interface except for my reverse proxy on the host:
Likewise, I do not want clickhouse exposed outside of the private/internal docker network, so I've removed their exposed ports.
$ git diff docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml index d1d4029..963043b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,9 +22,9 @@ services: clickhouse: container_name: clickhouse image: clickhouse/clickhouse-server:25.4.2 - ports: - - "8123:8123" - - "9000:9000" +# ports: +# - "8123:8123" +# - "9000:9000" volumes: - clickhouse-data:/var/lib/clickhouse - ./clickhouse_config:/etc/clickhouse-server/config.dBeta Was this translation helpful? Give feedback.
All reactions