Install SugarCRM on Cloud PaaS: DotCloud

sugarcrmdevelopers —  August 15, 2011 — 7 Comments

Editor’s Note: This article is the first in a series from Cedric Mourizard, one of the leading members of the Sugar Community and consultant for SugarCRM Gold Partner Synolia. The series talks about deploying SugarCRM in several different Cloud-based PaaS ( Platform as a Service  ) solutions. In this part of the series, he shows how to deploy SugarCRM in DotCloud.

DotCloud is a platform-as-a-service we give your the capability to deploy and scale your application in the cloud. You could find more information here. It’s possible to host your SugarCRM on free version of DotCloud because that require only two services (PHP and MySQL)

Step 1: Create your account
Go to and sign up for DotCloud.

Step 2: Set up your environnment
After than your account has been created, you could follow the first steps to set up your environment for dotcloud.

Step 3: Create your application
First, create the application:

$ dotcloud create YOUR_APPLICATION_NAME

Second, create the dotcloud.yml file wich defines services available for your application:

$ vi dotcloud.yml
  type: php
  type: mysql

Third, push this file on your dotcloud space to initialize it:

$ dotcloud push YOUR_APPLICATION_NAME .
 upload /home/cedric/dotcloud ssh://
# rsync
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added '[]:21122,[]:21122' (RSA) to the list of known hosts.
building file list ... done

sent 147 bytes  received 34 bytes  51.71 bytes/sec
total size is 35  speedup is 0.19
Deployment for "YOUR_APPLICATION_NAME" triggered. Will be available in a few seconds.
2011-08-10 16:43:44 [api] Deploy YOUR_APPLICATION_NAME scheduled for revision=latest
2011-08-10 16:43:45 [api] Waiting for the build. (It may take a few minutes)
2011-08-10 16:43:45 [www.0] Deploying...
2011-08-10 16:43:45 [db.0] Deploying...
2011-08-10 16:44:01 [www.0] Service booted
2011-08-10 16:44:06 [db.0] Service booted
2011-08-10 16:44:07 [api] All the services are ready. Beginning the build.
2011-08-10 16:44:08 [www.0] The build started
2011-08-10 16:44:08 [db.0] The build started
2011-08-10 16:44:08 [db.0] This service type does not support build method, ignoring...
2011-08-10 16:44:08 [db.0] The build finished successfully
2011-08-10 16:44:08 [www.0] Fetched code revision rsync-1312994609.96
2011-08-10 16:44:09 [www.0] Updating channel ""
2011-08-10 16:44:09 [www.0] Update of Channel "" succeeded
2011-08-10 16:44:09 [www.0] Updating channel ""
2011-08-10 16:44:10 [www.0] Channel "" is up to date
2011-08-10 16:44:10 [www.0] Updating channel ""
2011-08-10 16:44:10 [www.0] Update of Channel "" succeeded
2011-08-10 16:44:12 [www.0] Reloading nginx configuration: nginx.
2011-08-10 16:44:15 [www.0] php5-fpm: stopped
2011-08-10 16:44:15 [www.0] php5-fpm: started
2011-08-10 16:44:15 [www.0] The build finished successfully
2011-08-10 16:44:15 [api] Deploy finished

Deployment finished. Your application is available at the following URLs

Fourthly, retrieve your database information

$ dotcloud info YOUR_APPLICATION_NAME.db
cluster: wolverine
    mysql_password: YOUR_DATABASE_PASSWORD
created_at: 1312994625.530937
-   name: ssh
    url: ssh://
-   name: mysql
    url: mysql://
state: running
type: mysql

Step 3: Add SugarCRM files
Download and extract latest version of SugarCRM:

$ wget
$ unzip
$ rm -f
$ mv SugarCE-Full-6.2.1/.* .
$ mv SugarCE-Full-6.2.1/* .
$ rm -rf SugarCE-Full-6.2.1/

Deploy your files to your your OpenCloud space

$ dotcloud push YOUR_APPLICATION_NAME .

Step 5: Install SugarCRM
Go to and follow the install process with MySQL credentials retrieved in in previous step withour forgot to specify the complete host name with port number ( in our example).
If you forgot your URL, at each time your could use this command to retrieve it:


As of Red Hat OpenShift Express & PHP Fog platforms, make attention on three points:

  • At this time php_imap module isn’t available on DotCloud by consequence you couldn’t use Webmail, campaign bounce inbox or mail group.
  • Each time you will make a dotcloud push you will reset all your file and potentially lost your modifications made online, we suggest to retrieve your online file locally and merge them before your dotcloud push
  • DotCloud use Nginx web server, perhaps you should to adapt some .htaccess rules to increase your hosting. see here

But the main advantage of DotCloud is his simple way to scale your space and to add very easily a ton of additionnal services.

7 responses to Install SugarCRM on Cloud PaaS: DotCloud


    Great article. I followed your article step by step. However, at the last step in the process of the install, it takes forever and then I get a 504 Gateway Time-out error. Any ideas of what I can do to avoid this?

    Also, I did contact dotcloud about the php_imap extension. They already have it in the pipeline for the production service and said it’s definitely on it’s way.

      Jérôme Petazzoni August 16, 2011 at 6:25 am

      Hi Scott,

      DotCloud is constantly scaling up its cluster, and particularly the API “control plane”. The 504 error that you spotted was harmless — it only reflected that the CLI was unable to retrieve the end of the build log. The application was still deploying in the background. While we have fixed most of those errors, when in doubt, you can repeat the command without risk.


        Turns out I was wrong, sorry — the 504 error appears when you try to load the sample data. Our servers are configured with rather short timeouts. Since loading the sample data takes some time, the script is interrupted before it completes. Installing without the sample data works like a charm.

          Cedric Mourizard August 16, 2011 at 10:30 am

          Hi Scoot and Jérôme, I think the 504 error is a temporary error during the replication time. Just wainting some minutes and try to launch index.php file in your URL instead of install.php

    Jérôme Petazzoni August 16, 2011 at 6:28 am

    Hi John and Cedric,

    I wonder if it would be difficult (or even recommended?) to generate SugarCRM MySQL configuration.
    Since DotCloud exposes the database credentials in a JSON file, it might allow an even smoother installation, bypassing the install wizard.
    Of course, if the install wizard is also performing some extra steps (like preloading a SQL dump and creating auxiliary files), things might be more complex…

      Cedric Mourizard August 16, 2011 at 10:33 am

       I Jerome,

      In fact they are 2 possibilities :
      1. Install your SugarCRM locally and after put-it on DotCloud in this case your solution is the best solution
      2. Install your SugarCRM directly on DotCloud and in this case during install process SugarCRM create database, create table and add some files (cache files, customization files, etc)

Trackbacks and Pingbacks:

  1. Getting Started with Docker and Sugar 7 « Sugar Developer Blog – SugarCRM - October 7, 2015

    […] years after a post about how to use Sugar on the DotCloud PaaS, it is time to continue with the same company and to speak a little bit about […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s