I was a student not too long ago — one who always looked for cool tools to use. Having spent four years of my life pursuing a degree in electronics engineering, I know how overwhelming student life can be — especially when it comes to completing assignments and projects on time. I've spent hours researching the web for various answers and solutions to problems I would encounter. What made it worse was the spotty Wi-Fi network inside the campus that would take ages to load simple webpages. I would always wish there was a way for me to access these websites and forums even when I was offline, since it would be more efficient that way. While I couldn't do it back then, I've found a tool that can do it now.

Hosting the Kiwix server on your local network allows you to download knowledge bases like Wikipedia, Stack Overflow, the Python Documentation, etc. You can then access the content on all of these sites offline, and even search for specific topics within them. This serves mainly two purposes — for starters, you don't always need a reliable internet connection to access data on the web. Along with that, you can avoid all the distractions that come with opening multiple websites on the internet. There have been instances where I opened the browser to look for some information, but ended up doom-scrolling on Twitter for an hour. If you want to avoid such situations, here's how to use the Kiwix server to download large knowledge bases from the internet.

👁 weekend-raspberry-pi-pico-projects-featured
5 projects you can complete in a weekend with the $8 Raspberry Pi Pico 2 W

The Raspberry Pi Pico is small but powerful, and you can build a number of projects using it over the weekend

By  Jeff Butts

Hosting the Kiwix server using Docker

A straightforward process

Running the Kiwix server on your home network is pretty much like running any other Docker container. Pull the latest version of the image from the Docker Hub. Once done, it's time to download the relevant ZIM files for all the sites that you want to download offline. You can find several of these files in the Kiwix Library. There are a ton of downloadable files, like the PHP manual, the entire Wikipedia database, iFixit manuals, WordPress docs, and pretty much any online knowledge source that you can think of.

Notably, most of these ZIM files are quite large, depending on the volume of information stored on the corresponding website. For instance, the entire Wikipedia site's ZIM file is 109 GB. This is why I recommend running the Kiwix server on a dedicated machine with lots of free storage like a Raspberry or a NAS. The good part, though, is that if you don't want to download the entire site's contents, there are much smaller ZIM files like the top 100 Wikipedia pages, or pages in a certain language. You can also download topic-specific segments, like those related to a sport or a movie. There's a search bar at the top along with filters that you can use to download files from specific sources.

Downloading the relevant websites

All you need is a single file from the library

Let's say you downloaded the Wikipedia ZIM file. Now, place it in the /tmp/wiki folder on your computer. Then, launch the terminal and enter the following command:

docker run -v /tmp/wiki:/kiwix-data -p 8080:8080 jasiek/kiwix-server wikipedia.zim

This will run the Docker container, after which you will be able to access Wikipedia completely on-device by visiting the port via a browser. You can jump between different topics and pages, and you should be able to view all the information without the help of an active internet connection. Since the service is hosted on your home network, any device connected to the same network will be able to access the site.

Once you experiment with one service, you can download several different ZIM files to access on your device. Gradually, you can build a personal offline library of all important books and documentation. While this is certainly useful, one of the biggest downsides is that, since these documents aren't connected to the internet, they cannot sync any updates or changes made to them. So, if there are any factual errors, they wouldn't be corrected in the offline version. That said, it's still good enough for referencing, following instructions or syntaxes for programming, and casually reading about different topics.

Store important knowledge aggregators locally

The best part about being able to host the Kiwix server on your local network is that you can download resources on a dedicated device like a Raspberry Pi, and use that as a portable knowledge databank. Every time you want to access any information or seek help from documentation, all you have to do is access your Kiwix library and look for the right keywords. You can also host it on your NAS or an older laptop, as long as there's sufficient storage available to store the ZIM files.

👁 Habit tracker Notion template on the screen
7 Notion templates I use as a student

Conquer academic chaos, and overhaul your student life with these X Notion templates.

By  Yash Patel