Perhaps you’re (legitimately) concerned about your privacy on Facebook, and for whatever reason the major alternative social networks just aren’t cutting it for you. Or maybe you wish there were some way to get your clients more engaged with your business.
Why not create your own social network with open source software?
Today I’m going to introduce you to Elgg, a full-featured open source social networking engine that is easy to install and set up. You can augment its power with many third-party plugins. Elgg is dual-licensed under the GPL and MIT License. This article applies to Elgg 1.8.
Here’s what you need to set up your Elgg network:
- Web hosting and a domain name. If you don’t want to spend anything, you can use your own server. Look into a free dynamic DNS service such as DynDNS, which will give you a domain name. If you’re running your server on a wireless network, you’ll also need to enable port forwarding on your router to make your site accessible outside your LAN.
- PHP 5
- MySQL 5+
- The latest release of Elgg
Or an internal social network where we can upload information and post on our internal network. For this, we have Elgg as a great help. It is a wonderful application that is very complete in functionalities. So, in this post, I will show how to install Elgg on Debian 10. Briefly, what is Elgg? So, what is Elgg?
Getting Started
Download the .ZIP file from the Elgg download page and unpack it wherever you want on your server.
Now navigate to the
install.php
page within that directory. Read the welcome message and click “Next”; Elgg will now check your server for the required software. If all goes well, you should see this:Elgg will then prompt you to initialize a database. Note that you must first create the database on your server and give the database user read/write privileges. Most web hosting companies provide a management interface for MySQL, such as phpMyAdmin.
Next you’ll get to name your site and fill in some other details, such as the installation directory and administrator information. When you get to the “Data Directory” section, the installer will ask you for “the directory that you created for Elgg to save files,” so be sure to create this directory before proceeding. I made mine outside the root directory of my site (
public_html
) to keep it secure.When you’re done with the installation and go to visit your site, you will see something like this:
Configuring Elgg
The right-side menu gives you several links to Elgg settings. You can change the site name and description in “Basic Settings” (under the “Settings” drop-down menu), and going to “Advanced Settings” will let you adjust several other parameters, including the default post privacy level and the ability for new users to register.
Go to the “Plugins” section to activate or deactive plugins. Several of the pre-installed plugins are already activated by default. Some noteworthy deactivated plugins that you might wish to activate include:
- Elgg Developer Tools (for writing plugins and themes)
- Embed (for letting users embed media content in their posts)
- User dashboard
- OAuth API (allows an Elgg installation to connect to other OAuth-protected sites)
If you enable the Developer Tools, you’ll see a new menu called “Develop” on the bottom right on your screen. You can go here to Tools->Theming Sandbox to test out themes for your Elgg installation using CSS. The Sandbox serves as a visual overview of the CSS properties of various site elements.
The Dashboard
The dashboard acts as a customizable site portal for registered users. Any user can change the configuration of their own dashboard. I registered as a non-administrative user to test out the registration process (which has become much smoother since the last time I tried out Elgg, a year or two ago; this time the confirmation email actually came through!). Upon logging in as this user, I was initially greeted by the (so far) rather plain-looking activity page, which by default shows public events and interactions on the site:
Rubbing Alcoholic is my developer friend who helped test my Elgg installation. Now we’ve consummated our friendship the Elgg way!
From there I went to the dashboard (
your-elgg-installation.com/dashboard
), which was also perfectly empty:To soup up your own dashboard, just click the “Add widgets” button on the right. If you wish to modify the appearance of the default dashboard for all new users, log in as the administrator and go to Appearance->Default Widgets in the right-side toolbar (this will not change the dashboard for already-registered users).
Now select the “Dashboard” tab under the page header and click “Add widgets.” You can choose to add any of the following:
- Activity (kind of like Facebook’s news feed)
- Bookmarks
- Friends
- Group membership
- The Wire (for microblogging)
- Blogs
- Files (yes, you can share files with Elgg!)
- Group activity
- Pages
Once you’ve added a widget, you can modify its settings by clicking the gear wheel on top of the widget. You can also use this section to add default widgets to users’ profiles. This is what my user dashboard looked like after I added some widgets and produced some site activity:
Third-Party Tools
The buck doesn’t stop here. There are thousands of third-party plugins and themes available for Elgg.
Once you’ve downloaded a plugin or theme, install it by placing the extracted folder into the “mod” directory of your Elgg installation. Then, logged in as the administrator, go to Configure->Plugins and activate it. You can sort plugins by newest to quickly find the one you just uploaded.
Here are some cool plugins I found on the Elgg community site:
- Independence Pro theme
- SW Wire Links Pro – thumbnails for links posted in The Wire (to make this one work you need to go into the plugin settings and select “Yes” where it asks, “Do you want to use Wirelinks Pro?”)
- Social Connect – lets you connect through a number of other social networks using the HybridAuth engine
- Elgg Chat – adds a bottom chat bar much like Facebook’s
Developers, build your own plugins! The Elgg website has plenty of documentation on creating plugins, themes, and other customizations.
Conclusion
While Elgg doesn’t offer all the bells and whistles of Facebook and Google+ out of the box, it is highly configurable and thus could make a great solution for anyone’s needs. It has matured gracefully over the past couple of years, and its user community continues to grow.
On this page
Elgg is a free, open source and self-hosted social networking application that can be used to create your own social networking website. You can easily create social networks for your university, organization, school and college using Elgg. Elgg is simple, easy to use and highly customizable. You can extend Elgg functionality with built-in plugins and themes.
In this tutorial, we will show you how to install Elgg with Apache web server on Ubuntu 18.04 server.
Requirements
- A server running Ubuntu 18.04.
- A non-root user with sudo privileges.
Getting Started
First, update your system with the latest version by running the following command:
Once your system is updated, restart your system to apply the changes.
Install LAMP Server
Elgg is written in PHP and uses MariaDB to store their database. So, you will need to install Apache, PHP and MariaDB server to your system.
You can install all the packages by running the following command:
Once all the packages are installed, open the PHP default configuration file and make some changes:
Make the following changes:
Save and close the file. Then, start Apache and MariaDB service and enable them to start on boot time:
Configure Database
By default, MariaDB is not secure. So, you will need to secure it first. You can secure it by running the following command:
Answer all the questions as shown below:
Once the MariaDB is secured, log in to MariaDB shell:
Enter your root password, then create a database and user for Elgg:
Replace the word 'howtoforge' in the command above with a secure password. Next, grant all the privileges to the Elgg database:
Replace the word 'howtoforge' in the command above with a secure password. Next, flush the privileges and exit from the MariaDB shell:
Install Elgg on Ubuntu
First, download the latest version of Elgg with the following command:
Next, unzip the downloaded file with the following command:
Next, copy the extracted directory to the Apache root directory:
Next, create a data directory for Elgg:
Next, give proper permissions to the Elgg:
Configure Apache for Elgg
Next, create an Apache virtual host file for Elgg with the following command:
add the following lines:
Replace example.com with your domain name. Save and close the file. Then, enable Apache virtual host file with the following command:
Next, enable Apache rewrite module and restart Apache web service with the following command:
Access Elgg Web Interface
Now, open your web browser and type the URL http://example.com. You will be redirected to the following page:
Click on the Next button. You should see the following page:
Once all the Elgg requirements are satisfies. Click on the Next button. You should see the following page:
Provide your database details and click on the Next button. You should see the following page:
Now, provide your site name, data directory '/var/www/html/elgg/data', site URL. Then, click on the Next button. You should see the following page:
Now, provide your admin username and password. Then, click on the Next button. Once the installation has been finished, you should see the following page:
Now, click on the Go to site button. You should see the Elgg dashboard in the following page:
An this is how the Elgg frontend looks like:
Virtual machine image download of this tutorial
This tutorial is available as ready to use virtual machine image in ovf/ova format that is compatible with VMWare and Virtualbox for HowtoForge subscribers. The virtual machine image uses the following login details:
SSH / Shell Login
Username: administrator
Password: howtoforge
Password: howtoforge
This user has sudo rights.
Elgg Login
Username: admin
Password: howtoforge
Password: howtoforge
MySQL Login
Username: root
Password: howtoforge
Password: howtoforge
and
Username: elgg
Password: howtoforge
Password: howtoforge
The IP of the VM is 192.168.1.100, it can be changed in the file /etc/netplan/01-netcfg.yaml. Please change all the above passwords to secure the virtual machine. The Download-Link for the VM is in the menu on the right side, near the top.