We removed our free Sandbox April 25th.
You can read more on our blog.

PHP Hello World


To manage your DotCloud applications, you need the Command-Line Interface client (CLI) installed on your computer. Before proceeding, make sure you have already signed up for an account. Here are the installation instructions:


Open Terminal and run the following command:

$ sudo easy_install pip && sudo pip install dotcloud


Windows is not officially supported at this time. However, if you feel brave, here is how to get DotCloud running on Windows in less than one minute (not counting download times).

  1. Start the Cygwin Setup.

  2. Select default choices until you reach the package selection dialog.

  3. Enable the following packages:

    • net/openssh
    • net/rsync
    • devel/git
    • devel/mercurial
    • python/python (make sure it’s at least 2.6!)
    • web/wget
  4. After the installation, you should have a Cygwin icon on your desktop. Start it: you will get a command-line shell.

  5. Download easy_install:

    $ wget http://peak.telecommunity.com/dist/ez_setup.py
  6. Install it:

    $ python ez_setup.py
  7. You now have easy_install; let’s use it to install pip:

    $ easy_install pip
  8. Now install dotcloud:

    $ pip install dotcloud

That’s it! Remember to always go through the Cygwin shell when running “dotcloud”.


If you already have Cygwin installed and are actually upgrading it when setting up DotCloud, you might have to do a “rebaseall”. If you see weird error messages in Cygwin after upgrading, read Cygwin Upgrades and rebaseall for a fix! (Thanks to Kevin Li for this tip!)

Max OS X

To install, open a terminal and run the following commands:

$ sudo easy_install pip && sudo pip install dotcloud

When the installation is finished, run “dotcloud” for the first time and enter your API key.

$ dotcloud
Enter your api key (You can find it at http://www.dotcloud.com/account/settings):

Hello World

Now that you have the DotCloud CLI installed, let’s go ahead and deploy our first application. In this example, we will be deploying a very simple application that serves a “Hello World” php script.

Create a new folder and change to that folder. Fire up your favorite text editor, and write a message to yourself and save it as index.php:

    <title>Hello World!</title>
    <?php echo "Hello World!\n"; ?>

Then create your application on the flavor of your choice. In this example, we’ll name the application “helloworldapp” and use the default flavor, Sandbox, which is free:

$ dotcloud create helloworldapp
Created application "helloworldapp" using the flavor "sandbox" (Use for development, free and unlimited apps. DO NOT use for production.)

Next, we’ll create a DotCloud build file that describes an application with a single php service. Create a file named dotcloud.yml with the following text:

  type: php

Your application is ready with a php service. Now you can push your current directory with your index.php file and your DotCloud Build File:

$ dotcloud push helloworldapp


You have just deployed your first DotCloud application.

We chose to deploy a very simple site in this example, but you’ll find that it’s just as easy to deploy any kind of application. See the full list of services available under the Services section in the navigation bar on the left. You can mix and match various services, such as a PHP service for your PHP application, and a MySQL service for the database.