How I got it running on my RaspberryPi

by derschmidt, Wednesday, March 20, 2013, 01:48 (4052 days ago)

I'm fairly new to servers as this was my first project and I just want to share my way of getting selfoss to run on my RaspberryPi to make it easier for everyone else.

On my journey to get it up and running I encountered some problems that made my head spin as I couldn't explain some strange behavior. At the end and after extensive research about apache config and the .htaccess file everything was fairly simple to fix. Thanks to this forum.

Now if you are equally new to the topic and just want to set it up on your pi, just follow this simple steps:

I assume you have Raspbian “wheezy” running on your pi and you did not change your username.
1. Create a folder selfoss in your homefolder (mkdir selfoss) and download the file into it (wget does it if on console).
2. Unzip the file via "unzip"
3. Make sure your .htaccess file has "RewriteEngine On" and "RewriteBase /selfoss"
(double check there's no "#" at the beginning of the line)
4. Change permissions via
"chmod a+w data/cache data/favicons data/logs data/thumbnails data/sqlite public/"
5. Now install apache2 with php:
sudo apt-get update && sudo apt-get upgrade (this is not necessary, but seems good anyway)
sudo apt-get install apache2 php5 sqlite libapache2-mod-php5 php5-sqlite php5-gd
6. Configure apache2:
6.1 Enable rewrite and headers:
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod php5
sudo service apache2 restart
6.2 Change rewrite-settings in "/etc/apache2/sites-available/default" by setting
"AllowOverride All" (I did it everywhere because it fixed my problem)
7. Change directory to "/var/www" and create a link to your installation of selfoss via
"sudo ln -s /home/pi/selfoss"

Now everything should be working just fine if you visit http://<your-ip>/selfoss.
If however you encounter a message about write only database while updating, manually add write permissions to your database with "chmod a+w /home/pi/selfoss/data/sqlite/selfoss.db"

This is the end. I hope this is useful to someone. If you find anything that I shouldn't have done this way, I would be glad to receive your feedback.

Complete thread:

 RSS Feed of thread

powered by my little forum