From diaspora* project wiki
Revision as of 19:59, 12 October 2013 by Jhass (talk | contribs)
Jump to: navigation, search
»» Work in progress
This article is a work in progress, it may contain incomplete or inaccurate information. There may be additional information on the talk page.
»» Note
OpenShift lacks a sane way to manage configuration, using it for deploying Diaspora is not recommended and considered experimental by the developers

Here is a quick guide to deploy Diaspora* on OpenShift, the cloud solution powered by RedHat

Look at if you want a adapted diaspora :)

  1. Create an account on [OpenShift] (it's free !)
  2. Choose Ruby on Rails application
  3. Choose a public URL and change "Source Code" to git://
  4. Keep a copy of your MySQL settings, you will need it ;)
  5. Connect to your cloud with ssh : You have a example with git :
git clone ssh://

Connect by transform this command to


You probably need to set a public key in your account setting first. If you don't have one, generate one with ssh-keygen and put it in .ssh in your home

In your cloud, go to the app folder :

cd app-root/repo/

run bundle install :

bundle install

Edit your diaspora.yml and database.yml file :

cd config
mv diaspora.yml.example diaspora.yml
mv database.yml.example database.yml
nano diaspora.yml

edit the url and remove the # in front of

certificate_authorities: '/etc/pki/tls/certs/ca-bundle.crt'


port: 3000



in your shell to know the IP of the database, then edit the file with

nano database.yml

And edit host with the IP found, put the username and the password saved on step 4. Change the socket to MySQL with the value below too. (host can work by letting localhost)

host: "theIPFound"
port: 3306
username: "admin"
password: "xxx"
socket: ~/mysql-5.1/socket/mysql.sock

Okay, so now, connect to the mysql database with

mysql -u admin -p

then create the diaspora database with

CREATE DATABASE diaspora_production;



You can now create the tables with

RAILS_ENV=production bundle exec rake db:schema:load