On a Synology use a Project (that is Container Manager’s name for a compose file). The graphical “Create container” wizard of Container Manager does not let you choose individual capabilities (it only has an all-or-nothing high privilege switch, which gives the container far more rights than Netlens needs). In a Project the two capabilities are simply lines in the file.
- Open Container Manager → Project → Create.
- Project name:
netlens. Path: press Set path and pick or create a shared folder for it (for exampledocker/netlens); this only holds the compose file. - Source: choose Create docker-compose.yml. An editor opens.
- Paste the complete file from Where do
NET_RAWandNET_ADMINgo? (or the contents ofdocker-compose.simple.yml).network_mode: hostand thecap_add:list are already in it. SetTZto your time zone if you like. - Press Next. The Web portal settings page can be skipped: Netlens does not need DSM’s reverse proxy. Press Next, then Done. Container Manager downloads the image and starts the container.
- Open
http://<nas-address>:8080.
Good to know on a Synology:
- Port 8080 busy? DSM itself uses 5000 and 5001. If another package already uses 8080, add
NETLENS_BIND=0.0.0.0:8081to theenvironment:list and open that port instead. With the host network there is no port mapping to set. - The data lives in a Docker volume (
netlens-data), so there are no folder permissions to set up. If you prefer a shared folder, replacenetlens-data:/datawith/volume1/docker/netlens-data:/dataand give the user10001read and write permission on that folder (File Station → folder → Properties → Permission), otherwise Netlens cannot save its data. - Firewall: if the DSM firewall is on, allow TCP 8080 from your LAN.
- To check the settings: Container Manager → Container →
netlens→ Details shows the network (host); the capabilities are in the project file. Or from SSH:sudo docker inspect netlens --format '{{.HostConfig.NetworkMode}} {{.HostConfig.CapAdd}}'. - To update later: Project → netlens → Action → Build (it pulls the newest image), then start it again.
- To change the file: Project → netlens → Action → Stop, then Edit the compose file (the capabilities are the
cap_add:lines), save and Build again. A container that already runs never picks up new capabilities until it is re-created like this. - Scans fail with
dnet: Failed to open device? That is the ext4 volume case: see Synology: scans fail on an ext4 volume (aufs). - Older DSM with the Docker package: if it has Project, use the same file. Without it, the container wizard’s Enable high privilege switch is the only way to get raw network access; it works, but prefer upgrading to Container Manager.