Giter VIP home page Giter VIP logo

synology-pihole's Issues

Incorrect version

The update script displays the incorrect version for the latest available package. Tested on DSM 7.1.

Install or Update Pi-hole as Docker container on Synology

Step 1 from 4: Validating DSM, Docker, and Docker Compose versions on host
Current DSM:               7.1
Current Docker:            20.10.3
Current Docker Compose:    1.28.5
Step 2 from 4: Detecting current and available Pi-hole versions
Current Pi-hole:           Unavailable
Target Pi-hole version:    76184753
76184753
76184753
2022.09.1
76184753
1998970
1998970
2022.09.1
2022.09.1
2022-09-02
20:37:10
2022-09-02
21:30:40
2022.09.1
2022.09.1
0d5a001916335
4b27408217063
9e04
7e0
2022.09
2022.09.1
5.14.1
2323
2324
76184753
Step 3 from 4: Creating Pi-hole container
Step 4 from 4: Testing Pi-hole availability
Testing...  Successfully connected to Pi-hole portal (http://192.168.1.250/admin/)
Done.

'sed' error during execution

following the README, I get this output:

Step 4 from 8: Generating Docker Compose file
sed: -e expression #1, char 56: unterminated `s' command

but it continues on to execute without issue

Recreating Host <-> Container Bridge Interface after reboot ends in timeout

While trying to add this to my task scheduler

/bin/sh /path/to/your/script/syno_pihole.sh network --ip 192.168.0.250 --log /var/log/syno_pihole.log --force

ends with timeout. Obviously updated the path and tried executing it directly from the folder with sudo rights.

It outputs

Step 1 from 5: Testing Docker service availability
Testing... |^C

And eventually stops here. This is with the latest DSM DSM 7.2-64570 Update 1.

Workaround is i removed the check whether Docker service is available and the remaining steps run through without issues. Also the installation worked flawless.

Might be interesting, that i use bond0 as network parent (both eth0 and eth1 are being used). Not sure if that makes a difference.

Step 1 from 5: Validating DSM, Docker, and Docker Compose versions on host
Current DSM: 7.2
Current Docker: 20.10.23
Current Docker Compose: 2.9.0
Step 2 from 5: Testing network service availability
Testing... Network service detected
Step 3 from 5: Initializing network and Pi-hole settings
Interface: bond0
Subnet: 192.168.254.0/24
Gateway: 192.168.254.1
Host IP address: 192.168.254.28
VLAN: macvlan0
Pi-hole MAC address: d0:7a:c5:93:db:f4
Pi-hole IP address: 192.168.254.27
Docker network IP range: 192.168.254.27/32
Domain name: pihole.local
Hostname: pihole
Timezone: Europe/Luxembourg
Europe/Amsterdam
Europe/Brussels
DNS1: 1.1.1.1
DNS2: 1.0.0.1
Data path: /volume1/docker/synology-pihole/data
Web password: (not set)

how to attach nginx proxy manager network to pihole to do reverse proxy

networks:
macvlan:


nginx-proxy-manager_network:
external:
name: nginx-proxy-manager

networks:
macvlan:
ipv4_address: ${ipv4_address}
nginx-proxy-manager_network:

when i use this there is issue with port 53 is being used. please help how to attach nginx proxy manager in order to reverse proxy port 80 for using with ssl. thanks

Current Pi-Hole: Unavailable

First off, this will be super helpful when I get it working, so I appreciate you putting this together.
Second, had installed pihole previously, manually, through Container Manager.
Third, used git to copy over script (v1.2.3) then ran under sudo and received the following. Not sure what else I can influence from command line arguments to get the script aligned to my synology/docker/pihole instance.

INFO: IP of synology (.10), pi-hole instance (.11). Container is pihole. Docker network for container is ph_network (macvlan). host is synofile, pihole is pihole on DNS. Full IP addresses redacted with 'x'.

~/synology-pihole$ sudo ./syno_pihole.sh --ip x.x.x.11 --host-ip x.x.x.10 --log ./logfile update

[2024-07-14 18:14:39-05:00] [SYNO_PIHOLE] Step 1 from 4: Validating DSM, Docker, and Docker Compose versions on host
[2024-07-14 18:14:39-05:00] [SYNO_PIHOLE] Current DSM: 7.2.1
[2024-07-14 18:14:39-05:00] [SYNO_PIHOLE] Current Docker: 20.10.23
[2024-07-14 18:14:39-05:00] [SYNO_PIHOLE] Current Docker Compose: 2.9.0
[2024-07-14 18:14:39-05:00] [SYNO_PIHOLE] Step 2 from 4: Detecting current and available Pi-hole versions
[2024-07-14 18:14:39-05:00] [SYNO_PIHOLE] Current Pi-hole: Unavailable
[2024-07-14 18:14:39-05:00] [SYNO_PIHOLE] Target Pi-hole version: 2024.07.0
[2024-07-14 18:14:39-05:00] [SYNO_PIHOLE] Step 3 from 4: Creating Pi-hole container
[2024-07-14 18:14:39-05:00] [SYNO_PIHOLE] stat /volume1/homes/username/synology-pihole/docker-compose.yml: no such file or directory
[2024-07-14 18:14:39-05:00] [SYNO_PIHOLE] ERROR: Could not download latest Docker image

~/synology-pihole$ sudo docker_inspect pihole <--WORKS, returns container information

Error in step 4 and step 6

I receive the following error when running the script for install as sudo:

Step 4 from 8: Generating Docker Compose file
sed: -e expression #1, char 53: unterminated `s' command

However, it continues though to step 6:

Step 6 from 8: Creating Pi-hole container
The TIMEZONE variable is not set. Defaulting to a blank string.
Creating network "synology-pihole_macvlan" with driver "macvlan"
Creating pihole ... error

ERROR: for pihole Cannot start service pihole: b"Bind mount failed: '/volume1/homes/sam/synology-pihole/data/dnsmasq.d' does not exists"

ERROR: for pihole Cannot start service pihole: b"Bind mount failed: '/volume1/homes/sam/synology-pihole/data/dnsmasq.d' does not exists"
Encountered errors while bringing up the project.
ERROR: Could not create Docker network and/or container

At this point the script exits.

--log command line option is positional

If the --log option is used with syno_pihole.sh and a log file is not specified then this option must be specified last after all other commands, parameters and options. Otherwise a parsing error occurs when the next command line argument is blindly assumed to be the name of the log file.

For example: syno_pihole.sh -l update will fail with a 'no command' error and error messages logged to ./update

Update command requires IP to function

  • Existing instructions for scheduled update will timeout
    /bin/sh /path/to/your/script/syno_pihole.sh update -l /var/log/syno_pihole.log

  • They should specify
    /bin/sh /path/to/your/script/syno_pihole.sh update --ip 192.168.0.250 -l /var/log/syno_pihole.log

  • Additionally, the script should exit if --ip is not specified.

How to uninstall?

I'm moving my pi-hole from my synology-nas to a dedicated raspberry pi that I got. What steps do I need to do to uninstall synology-pihole from my nas? I removed the scheduled task and deleted the docker container, but I don't know what else the script does. Can documentation or a command for uninstall, be added?

Boot error Pi-hole version 2022.01

The latest Docker version of Pi-hole fails to start correctly. The issue can be found here. The logs show the following error:

[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing... 
 ::: Starting docker specific checks & setup for docker pihole/pihole
Failed to set capabilities on file `/usr/bin/pihole-FTL' (Operation not supported)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file
ERROR: Failed to set capabilities for pihole-FTL. Cannot run as non-root.
[cont-init.d] 20-start.sh: exited 1.

Is there a better way by not assigning 2 ip address

Hello,

I have tried your solution, thanks for great work. It works fine.
I have question regarding each macvlan container will use 2 ip address from router when creating network link between container and synology(Host)
1st is for actual container and 2nd is to network traffic between host(synology) and container app.

Is there other way so we can have only 1 ip address on actually DHCP server(Router). as when i will have many macvlan containers then i need to maintain 2 ip address for each one.

Thank you for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.