Movim, the opensource social network based on XMPP

movim-logoMovim is one of my favorite project and yet I’ve never presented it there… Their new website, even fancier than the previous one, pushed me to do so.

Movim is an opensource decentralized social network, based on XMPP (Jabber). I used to follow them and support them (a bit) several years ago and well, the project has improved a lot !!

Movim is web based (But they also have a desktop version for Debian/Ubuntu and Redhat/Fedora type of distro in their repo, but also an Android app).

You can basically chat with your contacts (Single or group discussion, with all the history,..), send files, attach pictures, … like any robust chat platform (with sync conversations across devices, edit function, stickers, …) but also, have your news (RSS type) on the same interface with a neat design (Focusing on the content without ads,…).

chat-movim

And similar to a social network, you can join and participate into groups and let you post your content (You have something to share?). You can even search some content or use Markdown for your posts and it will also automatically embeds your links and images in your post.

Obviously all this in real time and decentralized.

Movim has been translated in 20 languages, but feel free to help them translate new languages or keep the current ones updated.

 

Interested to host your own instance? Of course you are !!

 

Installation

You will first need to have a working web server, based on Apache (my case) or Nginx. Movim will also need a database (MySQL or PostgreSQL), with PHP 5.4 minimum.

 

1) Install the PHP dependencies on top of Git, Curl and Mercurial

With root user (or with sudo), run:

apt-get install php5-curl php5-imagick php5-gd php5-mysql git mercurial curl

 

2) Clone their repository

Still in root, run:

cd /var/www
git clone https://github.com/movim/movim.git
cd movim

 

3) Install the app dependencies with composer

To install the rest of the dependencies, the easiest way is with composer. Install it first:

curl -sS https://getcomposer.org/installer | php

then fix the file permission to ensure your webserver user can write into your movim folder:

chown -R www-data:www-data /var/www/movim

then log-in with the www-data user and install the dependencies with composer:

sudo -s -u www-data
php composer.phar install

This will take some time to download and install all required dependencies.

 

4) Configure the database

Now that Movim and its dependencies are installed, you need to configure the database.

I’m first creating a database dedicated for Movim, using Phpmyadmin (Quite easy with it). And then, I can configure the db conf file.

cd config/
cp db.example.inc.php db.inc.php
nano db.inc.php

You will have to configure the type of database (mysql in my case), the host, user, pass and database name.

Once done, simply save and quit the file (CTRL +X)

 

5) Configure and launch the daemon

Movim is using a daemon to keep the websocket connection. The daemon has to be manually started, but we will do a service to ease the operation.

To do it, you can exit the www-data user first and then run:

nano /etc/systemd/system/movim.service

with the following content:

[Unit]
Description=Movim daemon
After=apache2.service network.target local-fs.target mysql.service
 
[Service]
User=www-data
Type=simple
ExecStart=/usr/bin/php daemon.php https://pod.yourdomain.COM/ 8080
WorkingDirectory=/var/www/movim/
StandardOutput=syslog
SyslogIdentifier=movim
PIDFile=/run/movim.pid
 
[Install]
WantedBy=multi-user.target

Don’t forget to replace the URL pod.yourdomain.com by the real one. (And with HTTPS or not, if you have a SSL certificate)

Then enable this service at startup:

systemctl enable movim.service

Before launch the service, you need to tweak the daemon, that only listen to the local network (127.0.0.1), by doing something like:

sed -i s/127.0.0.1/192.168.1.101/ daemon.php

Now, you can initiate the daemon by running:

systemctl start movim.service

You will then, need to update Movim’s database:

php mud.php db --set

And finally restart the service:

systemctl restart movim.service

 

6) Configure the web interface

To use the web interface, you will first need to enable the Apache module to connect with the websocket:

a2enmod proxy_wstunnel

then you will need a dedicated virtualhost like usual, but with:

ProxyPass /ws/ ws://localhost:8080/
ProxyPassReverse /ws/ ws://localhost:8080/

Then restart apache.

service apache2 restart

You should now be able to use your own instance of Movim !

Gravatar

Loves to discover web-based apps to install on his own server@home and write articles about it

0 Comments:

Add a comment