From 05e7ef0f6f7b35292e4440ab08275ad05df358bd Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Wed, 5 Aug 2026 11:15:51 +1000 Subject: [PATCH] DOCS: sample docker run --- docs/DOCKER_INSTALLATION.md | 10 +++++++--- docs/FILE_PERMISSIONS.md | 13 +++++++++++-- docs/MIGRATION.md | 7 ++++++- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/docs/DOCKER_INSTALLATION.md b/docs/DOCKER_INSTALLATION.md index 81975f91b..5ae30fa60 100644 --- a/docs/DOCKER_INSTALLATION.md +++ b/docs/DOCKER_INSTALLATION.md @@ -25,12 +25,16 @@ Head to [https://netalertx.com/](https://netalertx.com/) for more gifs and scree > You will have to run the container on the `host` network and specify `SCAN_SUBNETS` unless you use other [plugin scanners](https://docs.netalertx.com/PLUGINS). The initial scan can take a few minutes, so please wait 5-10 minutes for the initial discovery to finish. ```bash -docker run -d --rm --network=host \ +docker run -d --rm \ + --network=host \ + --cap-add=NET_RAW \ + --cap-add=NET_ADMIN \ + --cap-add=NET_BIND_SERVICE \ -v /local_data_dir:/data \ - -v /etc/localtime:/etc/localtime \ + -v /etc/localtime:/etc/localtime:ro \ --tmpfs /tmp:uid=${NETALERTX_UID:-20211},gid=${NETALERTX_GID:-20211},mode=1700 \ -e PORT=20211 \ - -e APP_CONF_OVERRIDE={"GRAPHQL_PORT":"20214"} \ + -e APP_CONF_OVERRIDE='{"GRAPHQL_PORT":"20214"}' \ ghcr.io/netalertx/netalertx:latest ``` diff --git a/docs/FILE_PERMISSIONS.md b/docs/FILE_PERMISSIONS.md index 89e893cdc..f8b2384a2 100755 --- a/docs/FILE_PERMISSIONS.md +++ b/docs/FILE_PERMISSIONS.md @@ -8,7 +8,11 @@ Sometimes, permission issues arise if your existing host directories were create Try starting the container with all data to be in non-persistent volumes. If this works, the issue might be related to the permissions of your persistent data mount locations on your server. ```bash -docker run --rm --network=host \ +docker run --rm \ + --network=host \ + --cap-add=NET_RAW \ + --cap-add=NET_ADMIN \ + --cap-add=NET_BIND_SERVICE \ -v /etc/localtime:/etc/localtime:ro \ --tmpfs /tmp:uid=20211,gid=20211,mode=1700 \ -e PORT=20211 \ @@ -67,7 +71,12 @@ If you use a custom `PUID` (e.g. `0`) and `GUID` (e.g. `100`) make sure you also 1. **Run the container once as root** (`--user "0"`) to allow it to correct permissions automatically: ```bash -docker run -it --rm --name netalertx --user "0" \ +docker run -it --rm \ + --name netalertx \ + --user "0" \ + --cap-add=NET_RAW \ + --cap-add=NET_ADMIN \ + --cap-add=NET_BIND_SERVICE \ -v /local_data_dir:/data \ --tmpfs /tmp:uid=20211,gid=20211,mode=1700 \ ghcr.io/netalertx/netalertx:latest diff --git a/docs/MIGRATION.md b/docs/MIGRATION.md index 177577159..672d04e36 100755 --- a/docs/MIGRATION.md +++ b/docs/MIGRATION.md @@ -280,7 +280,12 @@ services: Run the container with the `--user "0"` parameter. Please note, some systems will require the manual approach below. ```sh -docker run -it --rm --name netalertx --user "0" \ +docker run -it --rm \ + --name netalertx \ + --user "0" \ + --cap-add=NET_RAW \ + --cap-add=NET_ADMIN \ + --cap-add=NET_BIND_SERVICE \ -v /local_data_dir/config:/app/config \ -v /local_data_dir/db:/app/db \ -v /local_data_dir:/data \