Offline Wikipedia on (Wired) Raspberry Pi using Kiwix

Update system
sudo apt update && sudo apt upgrade
Modify these Settings to Suit
sudo raspi-config

Localisation Options > Change Locale

Localisation Options > Change Timezone

Localisation Options > Change Keyboard Layout

Localization Options > Change Wi-fi Country

Download Kiwix Server

https://www.kiwix.org/en/downloads/kiwix-serve/

Copy link for GNU/Linux ARM (32bits)

wget (paste in url)
Decompress Kiwix Server
tar -zxvf kiwix-tools_linux-armhf.tar.gz
Install Kiwix Binaries
sudo mv kiwix-tools_linux-armhf-3.0.3/* /usr/local/bin/
Download Zim File

https://wiki.kiwix.org/wiki/Content_in_all_languages

Copy to server using scp

Copy to /var/local/
sudo mv wikipedia_en_simple_all_nopic_2020-02.zim /var/local/
Create Kiwix Service
sudo nano /etc/systemd/system/kiwix.service

Paste this in file:

[Unit]
Description=Kiwix Service
After=network.target

[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/local/bin/kiwix-serve /var/local/wikipedia_en_simple_all_nopic_2020-02.zim -p 80
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

Control-o to save and control-x to exit

Enable and Start Kiwix Service
sudo systemctl enable kiwix
sudo systemctl start kiwix
Enable Read Only System (Optional)
sudo raspi-config

Advanced Options > Overlay FS

Choose “Yes” to enable overlay file system and/or “Yes” to write protect boot partition.

Leave a comment

Your email address will not be published. Required fields are marked *