GNU Social

GNU Social is a Free Software alternative for Twitter like micro-blogging sites.

Though this is an alternative to Twitter, it has more powerful features than twitter from the application architecture point of view.

  1. Since it is free software, anyone can download, customize and install on local networks. This is not possible with twitter since it is a proprietary software. You cannot run your own twitter. But you can run your own GNU Social server.
  2. GNU Social is federated. Meaning, if there is another gnu social server running on the network, then people from two different servers can communicate with each other.
  3. Unlike Twitter, the number of characters for a tweet (or called as 'Quip' here) is not limited to 180 characters, instead it is 1000 charactes.

Applicaiton Screenshots

Public Timeline

User Timeline

Application Requirements

  • Hardware Requirements
    • A Computer with Ethernet or Wifi that runs 24x7. Using a laptop (or) Desktop computer for this purpose is not recommended because they are not energy effecient. Therefore it is recommended to use Single Board Computers (SBC) like Raspberry Pi (or) BeagleBone Black for these purposes.
    • An Ethernet cable to connect the computer with the router. If you are connecting the computer to the router using WiFi, then you don't need this. But in order to reduce the wireless traffic, it is advisable to connect this computer alone through Ethernet cable.
  • Software Requirements
    • GNU/Linux Operating System
    • Git Version Control System
    • GNU Social Source Code
    • Nginx Web Server
    • PHP 5.x
    • MariaDB 10.x

Application Setup

The following steps have to be performed on the SBC.

  1. Installing the Requirements

    Debian/Ubuntu/Raspbian/Armbian based distros

    sudo apt-get update
    sudo apt-get install git nginx php5 mariadb-server mariadb-client php5-curl php5-gd php5-intl php5-gmp php5-json php5-mysqli openssl exif gettext
    
  2. Download GNU Social

     git clone https://git.gnu.io/gnu/gnu-social.git
     sudo mv gnu-social /var/www/
     sudo chmod a+w /var/www/gnu-social/
     cd /var/www/gnu-social && mkdir file avatar
     chmod a+w file avatar
    
  3. Create a new database for GNU Social in MariaDB

     mysql -uroot -p"your_password"
    

    Replace your_password with the password which you have set to mariadb root user at the time of installation.

     create database social;
     GRANT ALL on social.* TO 'social'@'localhost' IDENTIFIED BY 'aGoodPassword';
    

    Replace "social" at "social@localhost" and 'aGoodPassword' with your desired username and password.

  4. Confiugre Nginx Web Server to Server GNU Social

    In my setup, I have configured the router and nginx to server GNU Social when people visit http://social.p2p in their browser.

    To configure nginx to server our site, we need to create a configuration file

     cd /etc/nginx/sites-available
     sudo vim gnu_social.conf
    

    Copy and paste the following configuration.

     Server {
       listen 80;
       server_name social.p2p www.social.p2p;
    
       root /var/www/gnu-social/;
       index index.php;
    
       location ~ \.php {
         include snippets/fastcgi-php.conf;
         fastcgi_pass unix:/var/run/php5-fpm.sock;
       }
    
       location / {
         try_files $uri $uri/ @gnusocial;
       }
    
        location @gnusocial {
          rewrite ^(.*)$ /index.php?p=$1 last;
        }
    
        location ~ /\.(ht|git) {
          deny all;
        }
     }
    

    Save the configuration file and quit vim by pressing ESC + :wq

     sudo ln -s gnu_social.conf ../sites-enabled/gnu_social.conf
    
  5. Start the Web Installation

    Once nginx is configured, we need to restart nginx for the changes to take effect.

    sudo service nginx restart
    

    Now using another computer or laptop connected to the same router, try to open http://social.p2p in your web browser. You should see the page which asks you to start the installation of GNU Social. Follow the steps to complete the installation. Those steps are self explanatory.

    Note: If you get 404 Not Available error in browser, then make sure you have put an hosts entry for social.p2p in your openwrt router.

    If you get 500 Bad Gateway, make sure you have php5-fpm up and running. If not,

    sudo service php5-fpm start
    
  6. Install the Qvitter Theme

    The default user interface / theme might give a bad first impression about GNU Social to first time users, especially to those who come from twitter. Qvitter is a modern user interface / skin / theme for GNU-Social which is still WIP (Work In Progress). Nevertheless, we can install and start using it.

  7. Disable Email

    Since PYMESH is not the Internet, regular email services on the Internet like Gmail, Yahoo Mail are also not accessible. You can host your own SMTP (Email) servers on local network too, but then you should also ask people to sign-up.

    If the idea of including email address verification while signing up for GNU social is to verify the authenticity of the user, then with no verification mechanism for email signup in place, this also becomes meaningless. Therefore, let's get rid of email verification from the GNU Social signup form.

results matching ""

    No results matching ""