RACHEL on Raspbian Stretch Install Script

I have been working on an installer script for Raspbian Stretch and this is the latest version. I decided to make this post and keep it up to date to avoid confusion. Notes on the specifics are below the installation instructions if you’re interested in the details. Please let me know if you have tried this. I’d love to hear feedback. This is unofficial and not supported by the RACHEL team.


  • A raspberry pi. ( Pi2 with edimax adapter and Pi3B have been tested. Pi3B+ should work. )
  • An Ethernet internet connection
  • A MicroSD or USB Flash drive with enough space. ( ~4GB should be okay )
  • The latest Raspbian Stretch Lite without Desktop image. Raspbian Stretch Lite
  • An image flashing program. I use Etcher
  • The installation package from this link. rachel installer zip

Preparing Raspbian

  1. Flash Raspbian lite to a MicroSD or Flash drive.
  2. Unpack the rachel_installer.zip and place it on the boot partition of the device you just flashed with Raspbian. This should be accessible with windows. There won’t be enough space for modules, so follow the USB Flash Drive instructions below to install them in this process.
  3. Insert the device into your Raspberry Pi that’s connected to the internet over Ethernet and boot up.
  4. Log in with the username “pi” and password “raspberry”.
  5. Type command “cd /boot/rachel_installer”
  6. Type command “./installer.py --update-pi” and wait for the pi to reboot after updating.

Installing Rachel

  1. Log in with the username “pi” and password “raspberry”
  2. Type command “cd /boot/rachel_installer”
  3. Type command “./installer.py” to run the installation.
  4. Type command “sudo reboot now” to reboot after the installation has completed
  • That should be it. The installer runs for 10 minutes or so. When it’s complete you should see a message that says “rachel has been successfully installed”. I suggested rebooting with “sudo reboot now” just to be sure as there can be issues with the hostname. You can also remove rachel_installer from the boot partition as it’s not used anymore. Rachel can be accessed at or http://rachel. http://rachel might not work on all platforms.

  • The default login/pass for the admin interface is admin/Rachel+1

Installation With USB Flash Drive

  • If you are booting from a USB flash drive for the operating system and also installing RACHEL from a USB flash drive you will need to do this to avoid boot conflicts. Turn on your pi with your Raspbian OS drive attached and when you see the rainbow square plug in your installer flash drive. There are tutorials for setting one device as your boot device available which will avoid this problem.

  • You can install support for exfat formatted drives with “sudo apt-get install exfat-fuse”

  1. Download and extract the installation.zip to a flash drive.
  2. Place unzipped modules you want to install from USB during installation into “modules” and they will be installed.
  3. Power up your pi with your flash drive attached and log in
  4. Type “sudo mkdir /media/usb”
  5. Type “sudo chown -R pi:pi /media/usb”
  6. Type “blkid” and look for your drive. You want the line that says “/dev/sda1” or “/dev/sdb1” next to it.
  7. Type “sudo mount /dev/sda1 /media/usb -o uid=pi,gid=pi” where /dev/sda1 is the path to your drive.
  8. Type “cd /media/usb/rachel_installer” to get to the installation directory.
  9. Type “./installer.py” to begin the installation

Manually Installing Modules and Ka-lite Essentials

  • Modules that are transferred manually need to have the proper ownership or else you may recieve a “The following modules were ignored because they had no rachel-index.php” error or a red “internal error (4)” button when trying to update a module. Follow the instructions below to give permissions.
  1. Copy your module to /var/www/modules/.
  2. Type “sudo chown -R www-data:www-data /var/www/modules/YOURMODULENAME”
  • To install ka-lite-ess do the following additional steps.
  1. Type “sudo chmod 755 /var/www/modules/en-kalite-ess”
  2. Type “cd /var/www/modules/ka-lite-ess”.
  3. Type “sudo sh install.sh
  4. While connected to the pi’s network go to " for the ka-lite interface to download and install the appropriate ka-lite language pack.
  • If everything went properly, you should now be able to access ka-lite-ess content through Rachel. I was only able to test with ess, but I assume this is the same for full versions that aren’t static.



  • Fixed reboot/shutdown not working due to a typo.
  • Added internet connection sharing back with iptables commands.
  • Fixed wifi-channel setting option.
  • Added ability to set ka-lite user/pass at installation time.
  • Cleaned up code for better readability


  • Removed mysql-client/server and other modules that were seemingly unused, required a larger download, and were taking up resources. If anyone knows of a module that used them, please let met know.
  • Added giving apache ownership to modules folder after module transfer.
  • Updated apache2.conf to match the latest version with previous settings.
  • Removed unused files.

Install Command Examples

  • ./installer.py --wifi-ssid=RACHEL-01 --wifi-channel=6 --share-internet
  • ./installer.py --update-pi --desktop --chromium --full-update


  • –pi-pass lets you set a custom password for the pi.
  • –auto-login sets auto-login for the pi.
  • –update-pi updates the pi. This is meant to be run once and will reboot after the update.
  • –desktop will install the Raspbian desktop when running update-pi.
  • –full-update fully updates the pi including the kernel and dist during the --update-pi process.
  • –chromium installs chromium when running update-pi.
  • –no-ka-lite skips the ka-lite installation.
  • –ka-lite-pass sets the password for ka-lite.
  • –ka-lite-user sets the user for ka-lite
  • –no-kiwix skips the kiwix installation.
  • –no-hotspot skips installation of the hotspot.
  • –wifi-ssid sets a custom ssid for the wifi hotspot. The max length is 32
  • –wifi-channel sets a custom channel for the wifi hotspot. Max is 11. 0 is auto.
  • –share-internet enables wired internet connection sharing to connected wifi clients.


  • Tested with Pi2 and an Edimax wifi adapter. It works well but requires a reboot after installation. With Stretch the default driver included is used for the Edimax 8188CUS and 8192CU and others are blocked in /etc/modprobe.d. There is no need to build a custom hostapd/wpa_supplicant anymore, so --wifi-adapter has been removed.
  • This is Wifi hotspot only right now. I will be updating with support for sharing the internet connection and Ethernet dhcp support soon. It’s top priority.
  • This is using dnsmasq instead of udhcpcd. I find it to be easier to handle on stretch as well as fast.
  • An ethernet internet connection will work and modules can be installed from the admin interface. Wifi internet while running RACHEL is untested.
  • This installer does not use the git right now because some fixes to the contentshell were implemented and new files were added.
  • This has been tested with a Pi2 and an edimax wifi adapter as well as a Pi3B with both USB and MicroSD.
  • I took that installed flash drive and plugged it into a pi0w via USB OTG cable and it worked well ( the pi0 was set up for usb booting ).
  • Stretch will check the disk sometimes after shutdown on some flash drives. This can be slow on the pi0w and make you think it isn’t working. If you wait a minute it will boot up normally and you’ll see the ssid.
  • I haven’t had a chance to try installing with a pi0w alone. I suspect connecting over wifi as well as running the wifi portion of the setup might cause an issue. I can look into this later if anyone is interested.
  • You may want to set your localization settings properly using “sudo raspi-config”. Changing wifi country will change the signal strength power according to the regulations for that country. This might set the time properly as well.
  • –update-pi will only update the repository and upgrade packages. To include the dist upgrade and kernel, use --full-update. It wasn’t necessary for the installation to work, but it might be good to do.
  • If the link to the package is against the rules let me know. I figured this is the easiest way to save the changes.

Admin Interface Fixes

  • is_rachelpi() in common.php was using “/var/www/rachel/modules” to determine if the device is a rachel plus or a rachel pi. This resulted in some things in the interface not showing up. I changed it to /var/www/modules which resulted in the shutdown/reboot buttons showing up on hardware.php and other things working again.
  • There was an fseek error in stats.php because it was using the path “/media/RACHEL” to write a temporary log. This doesn’t exist on a rachel-pi. I decided to use /var/logs/apache2/access.log instead because apache has permissions for that. This can probably be changed to a temp file, but I didn’t want to give apache write permissions.
  • After fixing the fseek error there was another error calling mb_strlen(). The solution was to add php7.0-mbstring to the install script.
  • “cat: /etc/kiwix/application.ini: No such file or directory” was happening in version.php because that file doesn’t exist and it was trying to get the version from it. I believe it’s part of the old xulrunner kiwix stuff that isn’t supported anymore. Fixed by only using /etc/kiwix-version when it’s a rachelpi.
  • “You are not running kalite as the default user root” with a traceback when looking for the ka-lite version was the result of kalite --version command in version.php. I didn’t want to do the kalite suggestion of running sudo su in exec, so I fixed it by just using /etc/kalite-version to determine the kiwix version on pis instead.
  • Reboot/poweroff were not working. I think this was a combination of apache not having permissions for /sbin/poweroff and /sbin/reboot or the sleep command was not working. This was fixed by adding www-data to /etc/sudoers for /sbin/shutdown and /sbin/reboot only. Then hardware.php was changed to call sudo reboot now and sudo shutdown now instead. There is no working sleep command so it happens right away. I don’t think the new permissions on shutdown and reboot will be an issue.
1 Like

Wow! Interesting Stuff! I will test over the weekend and provide feedback. Do I need to be connected to the Internet at any point?

Great! I look forward to some feedback. Yes you need to be connected to the internet and preferably over ethernet cable. I’m not sure if running the script while connected to wifi will work. I would also suggest using a Pi3B if you have one as that’s what I used so I know it works. Once this script is done I will be making a completely offline USB installer.

My current board is a Pi3B+. Is there anyway to run this completely offline?

This should work with a 3B+. As of right now it requires a connection to install all of the packages. An offline installer would still need you to download everything that has to he installed, so in that case a basic image would be better. What kind of connection do you have access to? I could upload a basic image but it might be large.

At the office I’ve got access to unlimited data. At home I’ve got limited access via 4G. I can’t bring in the Raspberry to the office for obvious reasons as Rachel is done on the side

For now I think you’ll have to find a way to do it online. Maybe at a net cafe or ask your work. Uploading an image would probably be too large and I don’t have a 3b+ to be sure my 3b image will work with yours.

Should I continue working on this? I figured I would have gotten a response to it by now…

Hi JamesK I am very much interested in what you are doing and eagerly awaiting a positive outcome, regards

1 Like

Apologies @jamesk. I should have provided an update before now. So my 3b+ for some reason failed to power up after trying several sd cards. Placed an order for delivery from the US and I’m picking it up this weekend. Busy weekend ahead as I’d be playing with this all weekend.

Thanks. I was just wondering if anyone was still interested in this before I continue to work on it. I hope your 3B+ works.

Hello Is there any progress on the Pi3+ image please?

Hello. I will get a pi 3b+ this week and make a basic 3B+ image. I have not received a response or comment from Jeremy or the Rachel team on the work that I’ve done so I’m not sure what the status of an official image is. If you want to try the install script it should make a basic installation on your pi and from there you can install modules from the admin interface.

hi @jamesk – we’re definitely eagerly following this! we haven’t made any efforts on our end, knowing yours on ongoing. happy to test at some point in the near future. thank you!

1 Like

Thanks! I’ve been in and out of hospital for several months so not much doing.
I don’t know how to do the things you suggest but if you have any basic instructions i would like to give it a try.
I next go to Zambia after Christmas and since I’m laid up I’m in a good place to try
My email is howard@giakonda.org.uk
Thanks for your hard work

Thank you, I’m glad to help. Sorry to hear about your health problems. I hope you have a quick recovery.

I just received my pi 3B+ and have tested the installation script. Everything seems to be working and I’m in the process of putting together a basic image that will only have a few modules, but the rest can be installed from the admin interface. I would upload larger images with more content but my internet connection is not fast enough to upload them right now. There may be some extra steps required for installing Ka-lite that I can help with if it’s an issue. I should have this uploaded in the next day.


thanks james eagerly waiting on you next post

Thanks James I’ll give this a try over the next week.
Kind Regards

Sorry for the delay. Some things came up but I will have it up as soon as possible.

Thanks James.
When it’s ready can you include instructions as to how exactly I can download it.