DOCS: DB + config -> /data
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
Code checks / lint (push) Has been cancelled
Code checks / docker-tests (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2025-11-29 16:19:13 +11:00
parent 8586c5a307
commit 7125cea29b
8 changed files with 23 additions and 29 deletions

View File

@@ -44,8 +44,7 @@ Start NetAlertX in seconds with Docker:
docker run -d \
--network=host \
--restart unless-stopped \
-v /local_data_dir/config:/data/config \
-v /local_data_dir/db:/data/db \
-v /local_data_dir:/data \
-v /etc/localtime:/etc/localtime:ro \
--tmpfs /tmp:uid=20211,gid=20211,mode=1700 \
-e PORT=20211 \
@@ -53,6 +52,8 @@ docker run -d \
ghcr.io/jokob-sk/netalertx:latest
```
Note: Your `/local_data_dir` should contain a `config` and `db` folder.
To deploy a containerized instance directly from the source repository, execute the following BASH sequence:
```bash
git clone https://github.com/jokob-sk/NetAlertX.git

View File

@@ -16,8 +16,7 @@ Start the container via the **terminal** with a command similar to this one:
docker run \
--network=host \
--restart unless-stopped \
-v /local_data_dir/config:/data/config \
-v /local_data_dir/db:/data/db \
-v /local_data_dir:/data \
-v /etc/localtime:/etc/localtime:ro \
--tmpfs /tmp:uid=20211,gid=20211,mode=1700 \
-e PORT=20211 \
@@ -26,6 +25,8 @@ docker run \
```
Note: Your `/local_data_dir` should contain a `config` and `db` folder.
> [!NOTE]
> ⚠ The most important part is NOT to use the `-d` parameter so you see the error when the container crashes. Use this error in your issue description.

View File

@@ -125,9 +125,9 @@ docker compose up
### Modification 1: Use a Local Folder (Bind Mount)
By default, the baseline compose file uses a single named volume (netalertx_data) mounted at /data. This single-volume layout is preferred because NetAlertX manages both configuration and the database under /data (for example, /data/config and /data/db) via its web UI. Using one named volume simplifies permissions and portability: Docker manages the storage and NetAlertX manages the files inside /data.
By default, the baseline compose file uses a single named volume (netalertx_data) mounted at `/data`. This single-volume layout is preferred because NetAlertX manages both configuration and the database under `/data` (for example, `/data/config` and `/data/db`) via its web UI. Using one named volume simplifies permissions and portability: Docker manages the storage and NetAlertX manages the files inside `/data`.
A two-volume layout that mounts /data/config and /data/db separately (for example, netalertx_config and netalertx_db) is supported for backward compatibility and some advanced workflows, but it is an abnormal/legacy layout and not recommended for new deployments.
A two-volume layout that mounts `/data/config` and `/data/db` separately (for example, `netalertx_config` and `netalertx_db`) is supported for backward compatibility and some advanced workflows, but it is an abnormal/legacy layout and not recommended for new deployments.
However, if you prefer to have direct, file-level access to your configuration for manual editing, a "bind mount" is a simple alternative. This tells Docker to use a specific folder from your computer (the "host") inside the container.

View File

@@ -25,8 +25,7 @@ Head to [https://netalertx.com/](https://netalertx.com/) for more gifs and scree
```bash
docker run -d --rm --network=host \
-v /local_data_dir/config:/data/config \
-v /local_data_dir/db:/data/db \
-v /local_data_dir:/data \
-v /etc/localtime:/etc/localtime \
--tmpfs /tmp:uid=20211,gid=20211,mode=1700 \
-e PORT=20211 \

View File

@@ -78,7 +78,7 @@ In the **Environment variables** section of Portainer, add the following:
>
> `sudo chown -R 20211:20211 /local_data_dir`
>
> `sudo chmod -R a+rwx /local_data_dir1`
> `sudo chmod -R a+rwx /local_data_dir`
>

View File

@@ -46,8 +46,7 @@ NetAlertX requires certain paths to be writable at runtime. These paths should b
```bash
docker run -it --rm --name netalertx --user "0" \
-v /local_data_dir/config:/data/config \
-v /local_data_dir/db:/data/db \
-v /local_data_dir:/data \
--tmpfs /tmp:uid=20211,gid=20211,mode=1700 \
ghcr.io/jokob-sk/netalertx:latest
```
@@ -84,8 +83,7 @@ services:
- NET_BIND_SERVICE # Required to bind to privileged ports (nbtscan)
restart: unless-stopped
volumes:
- /local_data_dir/config:/data/config
- /local_data_dir/db:/data/db
- /local_data_dir:/data
- /etc/localtime:/etc/localtime
environment:
- PORT=20211

View File

@@ -284,8 +284,7 @@ services:
- NET_BIND_SERVICE # 🆕 New line
restart: unless-stopped
volumes:
- /local_data_dir/config:/data/config # 🆕 This has changed from /app to /data
- /local_data_dir/db:/data/db # 🆕 This has changed from /app to /data
- /local_data_dir:/data # 🆕 This folder contains your /db and /config directories and the parent changed from /app to /data
# Ensuring the timezone is the same as on the server - make sure also the TIMEZONE setting is configured
- /etc/localtime:/etc/localtime:ro # 🆕 New line
environment:

View File

@@ -47,8 +47,7 @@ services:
- NET_ADMIN
- NET_BIND_SERVICE
volumes:
- /app_storage/netalertx/config:/data/config
- /app_storage/netalertx/db:/data/db
- /app_storage/netalertx:/data
# to sync with system time
- /etc/localtime:/etc/localtime:ro
tmpfs:
@@ -66,10 +65,7 @@ services:
```yaml
volumes:
- /volume1/app_storage/netalertx/config:/data/config
- /volume1/app_storage/netalertx/db:/data/db
# (optional) useful for debugging if you have issues setting up the container
# - local/path/logs:/tmp/log <- commented out with # ⚠
- /volume1/app_storage/netalertx:/data
```
![Adjusting docker-compose](./img/SYNOLOGY/08_Adjust_docker_compose_volumes.png)