User:CSammy/Installation/Head

From diaspora* project wiki
< User:CSammy
Revision as of 15:48, 27 August 2016 by CSammy (talk | contribs)


}}

- Page 1 -

Introduction

NoteNote:You don't need to have your own pod to use diaspora*.
Running your own diaspora* server allows more control over your data, but it requires technical skills and time. Instead, you can register on one of the installations open to everyone that allow you to use diaspora* in a few clicks without any requirements

This guide will outline the procedure to get you set up with a production-ready installation of diaspora*.

Things to know

  • The install is a bit complex, but we're here to help.
    It's extremely helpful to have some experience in Linux/Unix server administration or Rails app deployment already. But don't worry, if you run into problems and need help, just visit us in our IRC channels on Freenode.
  • Running a common setup will get you the most help, if you need it.
    Most people in the community will have some experience running diaspora* with Unicorn as the app server using Nginx as outward-facing web server. Of course, you're free to run any other app server (Thin, Passenger...) or web server (Apache), but you might find it harder to get help if you run into unexpected troubles.
  • diaspora* is developed utilizing latest web standards
    Therefore UX is best with recent browsers, so please update your Firefox, Opera, Chrome or Safari to the newest version. We do not currently support any version of Internet Explorer, though we won't reject any contributions attempting to change that circumstance.
  • diaspora* strongly recommends HTTPS
    as we encrypt communication amongst servers and to the client browsers. You can get a free TLS certificate from Let's Encrypt.
    Unfortunately, self-signed certificates or certificates issued by CACert won't work.
  • We need your feedback
    to constantly improve and update this guide. Have a look at How we communicate
  • Do not run any of the commands you find in this guide as root (except if requested).
    Just use your normal user - or even better - create a separate user for diaspora* (rationale).


- Page 2 -

Before you start

You need to choose if you want a production setup or development setup. Diaspora has three development trees: master, stable and develop. The master tree always contains the current release. The stable tree is where new features and bug fixes are added before a new minor version is released. The develop tree is where new features and bug fixes are added before a new major version is released. Therefore if you want a development setup you should run from develop. But it isn't guaranteed to be in a good state, so it's not recommended to run a production setup from it.

Diaspora is written in Ruby on Rails and therefore knows different running modes. These have nothing to do with running from the master or the develop tree. Nonetheless we recommend the development mode for development setups and production mode for production setups. The difference is, apart from a slightly different default configuration, speed. The development mode reloads the code on each request, so it speeds up your development. The production mode doesn't do that, so pages load significantly faster. That's the only major difference you need to care about. To emphasize it one more time: Running a production setup in development mode gains you nothing.

Lastly you can choose between running on MySQL/MariaDB or PostgreSQL, in our experience PostgreSQL achieves a better performance.

Part 2 (Start install)

- Page 1 -

Versions of this guide

WarningWarning:Make sure to use the correct version of the guide, see below.

The current guide is for a production setup with PostgreSQL as database.

You can change them below:

Running mode: Production | Development
Database: MySQL | PostgreSQL | MariaDB


Requirements

Hardware

Minimum recommended:

  • Memory: 1.5 GB
  • Swap: 1 GB
  • CPU: decent multicore
  • Storage: The amount of hard disk space required largely depends on how many images you expect your users to upload.

It is possible to run a pod on a Raspberry Pi >= 2. However, this will be very slow and is not recommended for multi-user pods.

Software

Over the course of this manual, you will install the following software if not already installed.

  • Build tools - for compiling source packages
  • Ruby - the Ruby programming language
  • RubyGems - package manager for Ruby code libraries (like CPAN for Perl or PEAR for PHP)
  • Bundler - gem management tool for Ruby projects
  • MySQL or MariaDB or PostgreSQL - backend storage engine
  • OpenSSL - encryption library.
  • libcurl - multiprotocol file transfer library WARNING: Due to sidekiq longjmp error, you need at least curl 7.32
  • ImageMagick - image processing library
  • Git - version control system
  • Redis - persistent key-value store
  • one of the JavaScript runtimes on execjs' supported list.


Please note that running diaspora* together with other applications that use Redis on the same machine can be dangerous. Only do that if you absolutely know what you are doing, and if you know how to change the Redis database for all of the applications.

Prepare the system