Tiny Banned Book Library
Broadcast a digital library of challenged or banned books with a portable anti-censorship e-book server.
Disclaimer: I am not responsible for how other people use this information. This information is for educational purposes only. I also personally did not put together the archive of books, but found it online, so if you are a book publisher don’t sue me. If you’re mad that people are sharing banned books, you are part of the problem. This information is freely available, but combined in a way to enable people to circumvent the tyrannical laws being enacted in the US. Who is doing this? The republican party, christian nationalists, fascists, and those standing in the way of LGBTQA+ liberation and racial justice. So we will use whatever tools we have to combat their ideas, unjust laws, hierarchies and harmful views of the world.
Overview
This is a guide for making a portable server that can host ebooks and make its own wifi network for other people to connect to. You can use any computer to do this but a Rasberry Pi micro computer will work well, though there are also options for booting a Chromebook to a USB or using your regular laptop as a server as well. Once you understand the general how - executing it will be easy to wrap your head around it.
This project is a continuation of an off grid “internet” that I have been working on, which is an off grid solar powered server connected to a wifi network that has not only books, but movies, music, a chat server, and educational content. You can make a similar thing, though on a smaller scale to make it more portable.
The server can be powered via a USB power bank and concealed, so you can walk around and broadcast a wifi network that allows anyone in the area to connect to your Calibre server library, and download or view any books that are in the library. The only way for someone to stop you from doing this is to find who is broadcasting the wifi signal, or to jam or de-auth the SSID (which is an insta felony) so it’s basically a censorship-proof way of sharing information. If someone does have the technical knowledge to track signal strength and figure out what person is hiding the server or where the server has been dropped, it’s easy to just take the SD card out and snap it in half to destroy the data.
A TikTok explaining how it works, and examples.
Enable 3rd party cookies or use another browser
How To Use / Install
There are multiple options to install or download - a pre-made all-in-one image, and multiple ways that you can replicate this based on what you have on hand.
Download and flash a premade image to a Rasberry Pi 3 or 4.
Manually install the files using this tutorial to a bootable USB and use any computer you want.
Just download the books to share over USB without any extra tech.
1. Download and flash to a Rasberry Pi 3 or 4
Here is a full disk image of the server with all the files and services ready to go. All you need to do is flash the image to an SD card, then insert it in either a Pi 3 or 4 (This was tested on both), and that's it! By default it’s set to boot to the desktop to quickly modify things or modify the library, but I suggest putting it in headless mode.
Then all you have to do is give it power, and in a minute or two, your server is running.
The credentials:
User: library
Pass: library
It is highly recommended that you change the password!!! By default, SSH is enabled for administration and you don’t want randos getting SSH access to your server.
Update: Google banned the account hosting this so it’s been moved.
Click here to download the image and flash it with the instructions below
Use this key to decrypt: GyLpVItjAERB3PgbllTa-loodkKmqqTl76kDv1y4TYs
Update: Some people have had issues running the image, if you have a ton of problems it might be better to do a manual install.
2. Manual install
Below are all the commands to install this onto an Ubuntu image. This can be on any computer that can boot to Ubuntu Linux, which gives you a ton of options. A portable option is to make an Ubuntu Live USB, and install your services following the directions below. Not every computer can use it’s own Wifi card to make a wifi hotspot, so you might need to use an external wireless card.
Included is a full text list of all the commands to run, along with the HTML files for the splash page and everything you need to copy things. Or customize it all to whatever you want.
File and Config Git Repo
3. USB drive / Sneakernet
You can also opt to just save the books onto a USB drive and manually share the files. Obviously, this won’t have the same reach but, it gets the job done without having to use very much tech. You can also download the books, and share them on an NFS or Samba fileshare, or through filesharing on your phone (though that kinda sucks but it works for sending like one or two books). Sneakernets are quick and easy.
Update: Someone reported the files to google, and the account got banned.
New files are uploaded here. Use the decryption key to download it: qS8sa84soMAemNa8bLbsCKbx7RZKGZv2vLjjhjX4xqI
Background
You can skip this unless you want to read it.
Republicans, right-wing conservatives, Christian nationalists, fascists, and fascist street gangs/militias have made a concerted push to attempt to ban certain books and information from being taught in schools, or even accessible in public libraries. As the right wing rages about CRT and LGBTQA+ books “turning their children gay”, or “making kids question americas greatness” - access to information is quickly being stripped from people. This is done through state legal apparatuses, and increasingly at the local level with right-wing extremists flooding school board meetings to attempt to get school districts to ban books. This at times includes fascist street gangs like the Proud Boys (also to be known as the Piss Boys for their black and yellow insignias) and other ultranationalist and racist groups who show up to intimidate people who attempt to stop this.
The books they are trying to ban are overwhelmingly about the cruel history of the United States, and books that center or feature LGBTQA+ people, or talk about themes that conservatives deem to be “inappropriate” such as growing up, going through puberty, finding out that you are gay or trans, police brutality, or questioning religious fundamentalism. Their attacks on history are a concerted effort to erase the realities of white supremacy, slavery, genocide, and torture that the US is based and founded on. We will not allow people to erase the realities of history, we will not allow people to sugarcoat the reality of things.
A common reply to the words above is “But what about confederate monuments, remove them is erasing history!1!!”, If you are reading this and had that thought, I challenge you to look into the actual history of confederate monuments, who paid for them, and when they were erected. The history that shows that most of them were erected between 1900 and 1920, with the rise of the KKK and again in the 1950’s when Black civil rights were gaining traction. Same with the use of the confederate flag, and other pseudo-historical “facts” that conservatives love to say. Didn’t know that history? Exactly, because that information is actively being suppressed.
These attacks aren’t new, and as we are seeing the rise of fascism in the US, the same parallels are happening that occurred in history, when fascists took over before. The first book burnings by the NSDAP (The Nazi party) were LGBTQA+ books from the Institute of Sexology, burning over 20,000 books in Bebelplatz Square. The Nazi party didn’t start burning books about their political opponents, it was books about being gay and transgender.
One way to fight this censorship is to use the technology we have to circumvent their unjust laws, to give access to information to the people who want it. Stopping someone from reading a book because they might see themselves in those pages is their goal. To shut off access to the language of people to question right-wing ideologies, and to stop people from living the lives they want to live. Fuck that, information wants to be free, and anyone who wants to read these books should be able to.
With this, you have the ability to create your own library of banned information, to spread access to whoever wants it. Later on, I will share some other ideas on how this can be used. But no matter what, always stand up to fascist ideology, subvert the state, and fight for the liberation of information and people.
Full step-by-step build guide with Ubuntu + Raspberry Pi
Installing Ubuntu on a Raspberry Pi
I am using Ubuntu to set all of this up, though alot of these commands will work for OSX. For windows, just download etcher and run the executable. The rest of the tutorial is in Linux because that is what will be running as our OS and to run our services.
You can follow the official guide but I always have problems with using the rpi-imager that is mentioned in the docs. If you have to clear any data on an old SD card, the verification will fail and be all weird so your best bet is to use etcher.
First, download the package for Ubuntu, they have specific ones for the Raspberry Pi. Ubuntu Desktop is fine, and kinda preferable.
https://ubuntu.com/download/raspberry-pi
Next download etcher.
Unzip etcher and run the etcher appimage.
sudo chmod + x balenaEtcher-1.7.9-x64.AppImage
./balenaEtcher-1.7.9-x64.AppImage
Wait a while for that to flash, then when etcher says it’s ready put your SD card into your pi and boot it. Follow the prompts, it’s really self explanatory. If you want during setup you can choose to auto login to the account. We aren’t going for security here but an easy-to-use plug-and-play server. If you don’t choose that you can always change it later.
Once you get logged in launch a terminal and update your stuff.
sudo apt-get update
sudo apt-get upgrade -y
That should get you updated with the latest packages and junk.
If you get an error about ‘waiting for the unattended-upgr’ or something, just wait, there are updates already being installed in the background.
Install Calibre
The Calibre client also includes the server but we will have to make a custom service in order to have the content server autostart on boot and serve up our libraries.
Run this to download and install Calibre.
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
Then just type calibre to start it.
calibre
Go through the wizard and select where your default library will go. We can add new ones so it’s ok to put it wherever, but the default works. On the next screen for devices choose smartphone. Then finish.
Next we need to make a library, Click the carrot next to Calibre Library and select Switch/create library.
Click the carrot next to Calibre Library and select Switch/create library.
Choose to make a new library and select your directory of where it will be. Tiny Banned Book Library works. In the prebuilt image, that is what the library name is set to and where you will add your books. Saving it in /home/Tiny Banned Book Library is fine.
Then add your books, click Add books then from folders and sub folders.
Press no when Multi file books comes up.
Remove the OG library from Calibre and then delete the folder on your filesystem (by default should be in /home). If you delete the file folder and then try to delete it in Calibre, it will freak out.
Deleting this will only show your Tiny Banned Book Library and save people the confusion when they do get connected to it.
Setting up the Calibre Content Server to auto start at boot.
Calibre has a content server that you can start manually in the GUI by pressing the “Connect/Share” button, but we want the server to start automatically and start serving our library without having to interact with it.
Now we need to make a custom service to make it autostart.
sudo nano /etc/systemd/system/calibre-server.service
A text editor will open, copy and paste this in.
[Unit]
Description=calibre Content server
After=network.target
[Service]
Type=simple
User=library
Group=library
ExecStart=/usr/bin/calibre-server "/home/library/Tiny Banned Book Library"
[Install]
WantedBy=multi-user.target
Change the user from “library” to whatever your username is when you set up your server. The group should be the same value as your username. In the prebuilt image, the user is library by default.
Your execstart should be the same unless you installed Calibre in /opt, change it if you did a custom install.
Manually add the path to each library separated by a space and quotes. This will allow Calibre to read that it’s a separate library and include it in your server. If you dont know the path, change directories to your library folder (typically /home/youruser/) and then type “pwd” and that will print the working directory.
Press control + x to exit nano and press y to save your new file.
When you make changes to configuration files, you need to run a daemon reload to tell the machine to reload your configs.
sudo systemctl daemon-reload
sudo systemctl start calibre-server
You might have to stop the calibre server service if it throws an error. Just replace start up there with stop. Then re-run the start command.
sudo systemctl status calibre-server
Will show the server is running. To escape out of the status report press “q”.
sudo systemctl enable calibre-server
Makes the service start at boot.
If you want to modify the books on the server and launch the Calibre GUI, stop the Calibre service and rerun and it should work.
sudo systemctl stop calibre-server
Only stop the service if you need to. If you don’t want to modify the library, just leave it running.
Broadcasting Wifi
Next step will be to setup everything we need to get our pi or computer to create its own Wifi network. This information will change depending on if you are using a pi or a laptop with an extra networking card. If you are using a computer with an extra network card, be sure to change the commands that point to wlan to whatever your wireless card comes up as.
It is recommended that you install all of your dependencies ahead of time.
Then we need to stop resolved that way dnsmasq can work correctly.
sudo systemctl stop systemd-resolved
sudo apt-get install hostapd dnsmasq git build-essential libmicrohttpd-dev net-tools nginx dhcpcd5 -y
Might as well pull your git repos now too.
cd /opt
sudo git clone https://github.com/nodogsplash/nodogsplash.git
sudo DEBIAN_FRONTEND=noninteractive apt install -y netfilter-persistent iptables-persistent
Next we will install everything to get the Wifi up and running, keep in mind, from this point on the machine will not have internet access from here on out. So make sure your stuff is pre-downloaded. If for some reason you need internet access on the device again, comment all the lines out in your /etc/rc.local file. It’s easy to do, but save some time and do all your internet stuff at the jump.
sudo systemctl unmask hostapd
sudo systemctl disable hostapd
Modify your DHCP config.
sudo nano /etc/dhcpcd.conf
If you are using a separate network card, change the interface below to whatever it is after you run ifconfig. You can also change the network ranges the network will work on, if you change it, be sure to change it in the config files later on too.
Add this to the end of the file.
interface wlan0
static ip_address=192.168.4.1/24
nohook wpa_supplicant
Now we will get the DNS situated.
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
sudo nano /etc/dnsmasq.conf
Add the following to the file and save it:
interface=wlan0
# Listening interface
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
# Pool of IP addresses served via DHCP
domain=wlan
# Local wireless DNS domain
address=/#/192.168.4.1
# Alias for this router
The address setting above forces DNS to allow our captive portal to work offline.
Run this to unblock radio function in case it is blocked.
sudo rfkill unblock wlan
Next, we have to modify hostapd configs.
sudo nano /etc/hostapd/hostapd.conf
Change the info to be how you want it. The SSID is what the Wifi network will be called.
country_code=US
interface=wlan0
ssid=Tiny Banned Book Library
hw_mode=g
channel=7
macaddr_acl=0
ignore_broadcast_ssid=0
Then we need to stop resolved that way dnsmasq can work correctly.
sudo systemctl stop systemd-resolved
It might also be a good idea to make your services autostart, that way you can make sure your wifi is working and that the services start every time.
sudo nano /etc/rc.local
#!/bin/bash
sudo ifconfig wlan0 192.168.4.1 netmask 255.255.255.0
service systemd-resolved stop
service hostapd start
service dnsmasq start
#sudo nodogsplash
#nginx -t
After that is going your wifi network should work after a reboot. You don’t have to reboot right now, cause we still have other stuff to do. But if you want to double check your wifi connection from here you can. If you run into issues, double check and make sure you ran:
sudo systemctl stop systemd-resolved
Because that seems to be the biggest culprit.
Installing and customizing the captive portal
We want a captive portal to allow people to connect to the wifi and be redirected to a webpage that tells them all the information about the server, and how to connect and get access to the books. Nodogsplash is great for this, but one issue with Calibre is that you can’t download ebooks through Nodogsplash, so we have to make a landing page with instructions. If you redirect to the Calibre server in the captive portal, you will be able to read books but the point is to download them.
cd /opt/nodogsplash
sudo make
sudo make install
Once nodogsplash finishes installing modify the config file.
sudo nano /etc/nodogsplash/nodogsplash.conf
This will open a long config file. You are looking for five different settings in there.
GatewayInterface
GatewayAddress
MaxClients
AuthIdleTimeout
FirewallRule
Go through and find those areas, then add your data to them
GatewayInterface wlan0
GatewayAddress 192.168.220.1
MaxClients 250
AuthIdleTimeout 480
FirewallRule allow tcp port 8080
Alternatively, you can peep the config file in the uploaded setup files.
Next run nodogsplash
sudo nodogsplash
Things might not be working correctly as we still need to tweak some things.
We can change the splash page by changing the HTML and CSS code that gets loaded. I created a custom splash page with the CSS and everything you need to get started that is included in the downloads.
/etc/nodogsplash/htdocs/splash.html
This is where the HTML will sit. If you want to use the custom splash page, rename splash.html and splash.css to splash_old.html and splash_old.css. Then rename your shiny new custom splash page to splash.html and splash.css. You can also change your config to point to these new files but, this is easier and you get to retain your old HTML in case you want it. Basically just replace the files in that directory and be sure to include the jquery and nice page CSS and js files in there too.
If you want to drag and drop the files into the directory, open a new terminal window and run nautilus with sudo.
sudo nautilus
Be aware that the page you want to edit is splash.html, Home.html is there as the OG template if you want it. If you want to make your own, you can take the HTML from the stock splash.html file and put it into your new one, it’s a small forum group that makes it easy to import into other HTML files.
Proxy server to connect to book.server site
After your user connects to your captive portal and sees your amazing landing page, they need to navigate to the actual Calibre server. So far from working on this project I don’t see an easy way to have the user connect to the captive portal, then have something open a web-browser separately. I know NDS allows for forwarding after you connect, but on iPhones and other mobile devices, you can’t download the books in the captive portal screen.
So we will use Nginx to make a proxy server so instead of having your users type HTTP://192.168.4.1:8080 , they can just type HTTP://book.server - pretty cool and easy.
First, disable the preconfigured host.
sudo unlink /etc/nginx/sites-enabled/default
Then create your proxy config
cd /etc/nginx/sites-available
and create your config
sudo nano example.conf
server {
listen 80;
server_name book.server;
location / {
proxy_pass http://192.168.4.1:8080;
}
}
This says that any traffic on port 80 to book.server will redirect to our server running Calibre on port 8080. You can also do this with HTTPS and redirect 443 to 8080 but then you will run into HTTPS stuff with the server, and then you will need to make a certificate, do that if you want. But it’s not necessary
Next make your symlink.
sudo ln -s /etc/nginx/sites-available/example.conf /etc/nginx/sites-enabled/
Test if the config works it should respond with “test successful”.
sudo nginx -t
Restart Nginx and the proxy should work.
sudo systemctl restart nginx
Autorun everything in a specific order
Next, we can set all of this to run when the pi is booted up. It is recommended that automatic login is enabled .
A very key thing to this is that we need to control the order that things run, but most importantly we need to self assign an IP to the machine. If an IP isn’t set, then the DNS settings won’t bind because we are pointing to a specific IP address and nothing will work. So we can manually run everything at the start of the machine.
sudo nano /etc/rc.local
Uncomment the rest of the file but leave the bash shebang at the top. Replace wlan0 if you are using a different network card and the IP if you opted to use a different IP address earlier. Just copy and paste if you have been following this guide exactly. If you want internet access again, comment out all of the lines in this file and restart and you should be set.
#!/bin/bash
sudo ifconfig wlan0 192.168.4.1 netmask 255.255.255.0
service systemd-resolved stop
service hostapd start
service dnsmasq start
sudo nodogsplash
nginx -t
We are telling the machine to set a static IP, then stop any other networking stuff that might mess with DNS, start our hostapd, then DNS settings, run our captive portal and then run our reverse proxy.
Then when you reboot your server, it should automatically login, set your IP address, stop your resolved service, start hostapd, start dnsmasq, start your captive portal and then start your proxy.
Open things up on another device and make sure you can connect to the wifi, are directed to your cool splash page, and when you press connect, the captive portal closes. Then open a web browser and go to your server, for this example by going to HTTP://book.server and making sure your books are visible and can be downloaded.
Headless mode
From here you should have your Calibre book server full of the books you downloaded, your wifi is running and you can connect other devices to it. Your splash page loads and when you click connect, will get you on the network. And you have verified you can download files, you are all set.
You can leave the desktop mode on, but leaving it on causes some performance drops. especially since this is more of a plug in and leave-alone box. So you can boot the machine into headless mode, and cut down on the processing power to be running a GUI.
This sill set the boot to go to a terminal instead of a GUI:
sudo systemctl set-default multi-user
Reboot or enter this in to go into a terminal start.
gnome-session-quit
To reenable the GUI you can run this to start the GUI boot sequence again:
sudo systemctl set-default graphical
Or while in the command line run this to reenable graphical stuff:
sudo systemctl start gdm3
Fixing potential problems with the image
Sometimes when you copy an image from a pi and use it on another, it freaks out and might boot to a screen complaining about having to do a manual fsck.
If that happens it will print out the drive name (usually /dev/mmcblk0p2)
So run:
fsck /dev/mmcblk0p2
Replace the location if its different.
Then it will prompt if you want to fix issues, press A to accept all, and it will do a bunch of checks and when it finishes reboot and you should be set.
Another problem that came up randomly was the Wifi not running and the login screen out hang. Reboot and it might force you to fsck, do that process and you should be good.
I don't see anywhere in here where you get the source files for the banned books. Love this idea, would like to learn more.
Hey I know this is a long shot of reaching you. My names Alex and I co-founded a non-profit called Denver Street Stories. We’re a podcast/platform aimed to uplift homeless folks by changing the narrative of how people see them through interviews, storytelling, and discussion. We’re VERY new and a podcast is our main platform but an idea, Luca, the other co-founder had was about giving homeless folks free access to the internet. I noticed your work from tiktok (we commented as denverstreetstories on a video of you cooking food for Christmas) and I’d really like to open a line of communication. I feel like you could really help us work towards making our goal a reality. I’d love to talk more. Our email is denverstreetstories@gmail.com