Install GNU social on Debian 8

GNU social is an open source social media platform. Users on your own server can follow users on other servers and vice versa, essentially making it a distributed social media platform. It doesn’t do a whole lot but what it does it does well.

I’m installing on Debian 8.

Install Debian with the web server role installed. If you are installing on an existing server without a web server do
# tasksel, select web server and choose Ok.

Create the database

Create a database for GNU social:
# mysql -u root -p
CREATE USER gnusocial;
SET PASSWORD FOR gnusocial=PASSWORD("Passw0rd");
GRANT ALL PRIVILEGES on gnusocial.* TO gnusocial@localhost IDENTIFIED BY "Passw0rd";

Download the code

At the moment GNU social is being packaged for Debian so for the time being we should use git to download the code.

Install git:
# aptitude install git

Change to the web root and download GNU social:
# cd /var/www
# git clone

Configure Apache

In /etc/apache2/sites-available/000-default.conf change
# ServerName
DocumentRoot /var/www/html
DocumentRoot /var/www/gnu-social
<Directory /var/www/gnu-social/>
AllowOverride All
Order Deny,Allow
Allow from all

Replace by your own domain name.

Enable pretty URL’s: enable the rewrite mod in Apache and copy the htaccess file:
# a2enmod rewrite
# mv /var/www/gnu-social/htaccess.sample /var/www/gnu-social/.htaccess

Set permissions on the GNU social folder:
# chown -R www-data:www-data /var/www/gnu-social

Reload Apache to reflect the changes:
# service apache2 reload

Configuration via browser

Open the site in your browser:

Database settings:
Hostname: localhost
Name: gnusocial
DB username: gnusocial
DB password: Passw0rd

After this setup GNU social throws me a bunch of errors but it works anyway.


To install a theme check /var/www/gnu-social/theme/ to see which themes are available. Pick one and in /var/www/gnu-social/config.php add the line
$config[‘site’][‘theme’] = ‘yourthemename’;

Back to Top