Skip to main content

Diaspora_ Tutorial

How to Install Diaspora*

Diaspora* is an open-source user-owned distributed social network with more than 1 million accounts all over the world. It consists of separate nodes named podes. Each pode operates a copy of the Diaspora software and represents a personal web-server.

So, let’s find out how to create your own Diaspora* pode with the help of PaaS.

Create an Environment

  1. Log in to the platform dashboard using your credentials.
  2. Press Create environment button. In the opened environment topology wizard navigate to the Ruby programming language tab. Pick the following nodes:
  • Apache application server
  • MySQL database
  • Redis data structure server

Then state the resources limits for the chosen nodes. Finally, enter name for your environment (e.g. diaspora-network), and click Create button.

Locale Dropdown

  1. After about a minute your new environment will appear at the dashboard.

Locale Dropdown

Diaspora* Deployment

  1. Navigate to the Diaspora GitHub repository. There change the branch to master and click Download ZIP button.

Locale Dropdown

You will be offered to save .zip archive with the latest Diaspora* stable version.

  1. Then navigate back to the platform dashboard and upload this archive with the help of Deployment manager.

Locale Dropdown

  1. Then press Deploy to.. button next to the diaspora-master.zip package. In the opened window choose test deployment type and click Deploy.

Locale Dropdown

Note

In order to run Diaspora* in production mode you need to have certificate authorities (CA) certificates installed at your server.

  1. The process of deployment can take some time, so be patient, please. Finally, you’ll see a new test context listed for Apache.

Locale Dropdown

Database Configurations

  1. Press Open in Browser button next to the MySQL node in your environment.

Locale Dropdown

  1. In the opened browser tab log in using the MySQL credentials you’ve received while environment creation and navigate to the SQL section.

Locale Dropdown

  1. You’ll see an empty form for SQL request executing. Enter the following line there and click Go in order to create a new database named diaspora_test.
CREATE DATABASE diaspora_test CHARACTER SET utf8;

Locale Dropdown

  1. After that open the platform dashboard again and press Config button for Apache application server.

Locale Dropdown

  1. In the opened configuration manager navigate to the webroot > config folder, find database.yml.example file and copy its content.

Locale Dropdown

  1. Then create new database.yml file in the same (config) folder and paste the copied strings to it.

Locale Dropdown

  1. Now it’s necessary to set up the connection between your application and MySQL database.

Find the section for MySQL configurations. Specify your MySQL host (URL to your database without http://) and credentials you’ve received while environment creation in username and password strings.

Locale Dropdown

Don’t forget to Save the changes made.

Application Server and Redis Configurations

  1. Press Config button for Apache application server again.

Locale Dropdown

  1. Navigate to the webroot > config folder and create a new diaspora.yml file there. Then find diaspora.yml.example configuration file in the same folder, copy its content, and paste it into the newly created file.

Locale Dropdown

  1. After that navigate to the configuration section in this file and change the following values:
  • find the #url: “https://example.org/" string and paste your environment’s URL instead of https://example.org/ value (you can find it by pressing Open in Browser button for your environment and copying URL in the address bar).

Locale Dropdown

  • scroll a bit lower and find the settings for remote Redis connection in the same file:
## URL for a remote redis.
## Don't forget to restrict the IP access!
## Leave it commented out for the default (localhost)
#redis: 'redis://exmaple_host'
#redis: 'redis://username:password@host:6379/0'
#redis: 'unix:///tmp/redis.sock'

Delete the # symbol from the #redis: ‘redis://username:password@host:6379/0’ line. Then substitute the values in this parameter with your own data, received via email after the environment creation.

Locale Dropdown

Change username and password values to the credentials for admin access to your Redis node. The same story with the host word: substitute it with the DNS address you can find in this letter.

Locale Dropdown

  • finally, locate the #require_ssl: true line and change the true value to false

Locale Dropdown

It’s time to Save the changes.

  1. Then navigate to the application.rb file, located in the same config folder. Find #config.i18n.default_locale = :de string and change its value to :en.

Locale Dropdown

Don’t forget to press the Save button in the panel above.

  1. After that find the defaults.yml file (still in the config folder). At the #142-144 lines (or about it) you can see the following lines:
 i_am_a_dummy: # Remove if you add an actual override
test:
environment:
url: 'http://localhost:9887/'

Locale Dropdown

Please, delete the line started with i_am_a_dummy string, and change an url parameter’s value to the host url of your environment (it can be seen in the e-mail you’ve got earlier or by pressing the Open in Browser button next to your environment and copying URL in the address bar).

You should get something like following:

Locale Dropdown

Save the changes.

  1. Finally, create new rake_deploy file in the webroot folder. Enter the following strings there:
db:create
db:schema:load
assets:precompile

Locale Dropdown

  1. Press Save button one more time and Restart the Apache node in order to apply all the configurations you’ve made.
Note

The first restart of the server after applying new settings can take some time, please, be patient.

Locale Dropdown

  1. Now you can press Open in Browser button for your environment and start working with your own Diaspora* application hosted.

Locale Dropdown

Enjoy!