Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

Offline Wikipedia on (Wired) Raspberry Pi using Kiwix

Update system
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt update && sudo apt upgrade
sudo apt update && sudo apt upgrade
sudo apt update && sudo apt upgrade
Modify these Settings to Suit
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo raspi-config
sudo raspi-config
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)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
wget (paste in url)
wget (paste in url)
wget (paste in url)
Decompress Kiwix Server
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
tar -zxvf kiwix-tools_linux-armhf.tar.gz
tar -zxvf kiwix-tools_linux-armhf.tar.gz
tar -zxvf kiwix-tools_linux-armhf.tar.gz
Install Kiwix Binaries
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo mv kiwix-tools_linux-armhf-3.0.3/* /usr/local/bin/
sudo mv kiwix-tools_linux-armhf-3.0.3/* /usr/local/bin/
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/
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo mv wikipedia_en_simple_all_nopic_2020-02.zim /var/local/
sudo mv wikipedia_en_simple_all_nopic_2020-02.zim /var/local/
sudo mv wikipedia_en_simple_all_nopic_2020-02.zim /var/local/
Create Kiwix Service
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo nano /etc/systemd/system/kiwix.service
sudo nano /etc/systemd/system/kiwix.service
sudo nano /etc/systemd/system/kiwix.service

Paste this in file:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
[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
[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
[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
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo systemctl enable kiwix
sudo systemctl enable kiwix
sudo systemctl enable kiwix
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo systemctl start kiwix
sudo systemctl start kiwix
sudo systemctl start kiwix
Enable Read Only System (Optional)
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo raspi-config
sudo raspi-config
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 *