Skip to content

Latest commit

 

History

History
65 lines (55 loc) · 3.09 KB

README.md

File metadata and controls

65 lines (55 loc) · 3.09 KB

raspberry-runner

Guide and Scripts for running ADClock on a Raspberry PI. The following guide will always run the latest version of ADClock Server.

Install

  1. Buy a Raspberry & SD-Card (PI Zero in our case)
  2. Download the latest Raspberry PI OS.
  3. Flash the image to the SD-Card. Win32DiskImager will help you.
  4. Startup the pi and finish os installation. This might take up an hour.
    • Don't forget to setup wlan or lan connection!
  5. Install pi4j. curl -sSL https://pi4j.com/install | sudo bash
  6. Create new folder in pi home. mkdir /home/pi/adclock && cd /home/pi/adclock
  7. Download the scripts from this repository. git clone https://github.com/ADClock/raspberry-runner.git && cd raspberry-runner
  8. Make run.sh executable. sudo chmod +x run.sh
  9. Register run.sh in 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 ^X followed by Y and Enter
  10. Reboot the raspberry pi. sudo reboot
  11. The ADClock Server should be online under <raspberry-ip-adress>:80

Debugging

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.sh

You 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.

FAQ

What if I want to upgrade raspberry-runner? (should never be needed)

Run following commands:

cd /home/pi/adclock/raspberry-runner
git reset --hard HEAD
git pull
sudo chmod +x run.sh

I 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.

How do I run a specific version?

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.

It seems like raspberry is frozen.

Well. Maybe a sudo reboot helps?

I get the error "Server VM is only supported on ARMv7+ VFP"

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-jre

BindException: The adress is already used.

Well. You should end the other process or change the port. Currently we do not provide an option for that. Sorry.