Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The podman run command given fails to mount the /mnt/data/ntopng/redis dir into the container... #9

Open
kahlkevin opened this issue Aug 29, 2020 · 4 comments

Comments

@kahlkevin
Copy link

kahlkevin commented Aug 29, 2020

The README.md @0b67c64 offers this command to run the container:

podman run -d --net=host --restart always \
   --name ntopng \
   -v /mnt/data/ntopng/GeoIP.conf:/etc/GeoIP.conf \
   -v /mnt/data/ntopng/ntopng.conf:/etc/ntopng/ntopng.conf \
   -v /mnt/data/ntopng/redis.conf:/etc/redis/redis.conf \
   -v /mnt/data/ntopng/lib:/var/lib/ntopng \
   docker.io/tusc/ntopng-udm:latest

Shouldn't there also be a -v /mnt/data/ntopng/redis:/var/lib/redis argument?

@SamErde
Copy link

SamErde commented Dec 10, 2020

This block is working fine for me on UDM firmware 1.8.3-beta2 and controller version 6.0.36. What UDM versions are you on?

@SamErde
Copy link

SamErde commented Dec 11, 2020

I updated to official 1.8.3 with controller 6.0.41 last night, and this is still working on my UDM.

@jsermer
Copy link

jsermer commented May 9, 2021

I found that if the redis podman volume mount is not present, when the container is stopped/deleted, the ntopng admin password and other ntopng preferences are reset to their respective defaults. If the volume mount is present, then that information persists. So I think the documentation should be updated to include -v /mnt/data/ntopng/redis:/var/lib/redis

@jsermer
Copy link

jsermer commented Jun 30, 2021

One additional comment I should make....you need to create the redis dir with the proper ownership:

uid/gids inside container

root@router:/# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Jun23 ?        00:00:00 /bin/bash /entrypoint.sh
redis       16     1  0 Jun23 ?        00:21:54 /usr/bin/redis-server 127.0.0.1:6379
ntopng      22     1 93 Jun23 ?        6-16:32:42 ntopng /etc/ntopng/ntopng.conf
root@router:/# id redis
uid=101(redis) gid=102(redis) groups=102(redis)
root@router:/# id ntopng
uid=999(ntopng) gid=999(ntopng) groups=999(ntopng)

create dirs outside container

mkdir /mnt/data/ntopng/redis
chown 101:102 /mnt/data/ntopng/redis

Additionally, if the docs do not mention it, I also set the main ntopng lib dir as follows (ntopng uid/gid are both 999):

mkdir /mnt/data/ntopng/lib
chown 999:999 /mnt/data/ntopng/lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants