Guide and Scripts for running ADClock on a Raspberry PI. The following guide will always run the latest version of ADClock Server.
- Buy a Raspberry & SD-Card (PI Zero in our case)
- Download the latest Raspberry PI OS.
- Flash the image to the SD-Card. Win32DiskImager will help you.
- Startup the pi and finish os installation. This might take up an hour.
- Don't forget to setup wlan or lan connection!
- Install pi4j.
curl -sSL https://pi4j.com/install | sudo bash - Create new folder in pi home.
mkdir /home/pi/adclock && cd /home/pi/adclock - Download the scripts from this repository.
git clone https://github.com/ADClock/raspberry-runner.git && cd raspberry-runner - Make
run.shexecutable.sudo chmod +x run.sh - Register
run.shin startup.- Edit rc.local:
sudo nano /etc/rc.local - Add following line before exit:
(cd /home/pi/adclock/raspberry-runner/ && sh run.sh) - Save and exit by pressing
^Xfollowed byYandEnter
- Edit rc.local:
- Reboot the raspberry pi.
sudo reboot - The ADClock Server should be online under
<raspberry-ip-adress>:80
If the server is not reachable you can try executing the script by yourself and view the console output:
cd /home/pi/adclock/raspberry-runner/
sh run.shYou might want to add sudo, because only root users can bind port 80. (See here) However the run.sh instance called on startup runs under root user - no special sudo needed there.
Run following commands:
cd /home/pi/adclock/raspberry-runner
git reset --hard HEAD
git pull
sudo chmod +x run.shI see a new version of ADClock Server on GitHub, but it doesn't download it.
Maybe your GitHub API rate limit exceeded. You can pass a specific version. See below.
Run the following commands:
cd /home/pi/adclock/raspberry-runner
sh run.sh <release-tag>If the given version is not downloaded yet it will download it from GitHub.
If you want to use a custom version simply create a subfolder and insert a server.jar. Run the script as mentioned above.
Well. Maybe a sudo reboot helps?
Well. Maybe you need to remove Java 11 and install Java 8 instead. See this.
apt list --installed *jre*
sudo apt remove openjdk-11-jre-headless
sudo apt get openjdk-8-jreWell. You should end the other process or change the port. Currently we do not provide an option for that. Sorry.