On this page

Quickstart

Create a Clever Cloud account

The API of Clever Cloud uses OAuth 1 to perform authentication actions. There are two ways to signup to Clever Cloud: email or GitHub login.

Go to the Clever Cloud Console and select the method you prefer.

Email Authentication

This kind of auth requires a valid and non-temporary disposable e-mail, and a password having at least 6 characters. Do not forget to validate your email by clicking the link you will receive.

GitHub Authentication

The GitHub signup allows you to create an account or link your existing one to GitHub, in one click. This process asks the following permsissions: 

  • Read your Public Key
  • Read User Repositories

The “repository permission” is used to deploy your GitHub apps directly to Clever Cloud, with a simple step.

If you need to give access to Clever Cloud’s API to a specific GitHub organization, you can do it here.

Two Factor Authentication (2FA)

Clever Cloud supports 2FA. You can enable it here: https://console.clever-cloud.com/users/me/authentication

Please, backup your recovery codes, we won’t be able to restore access to your account if you lose access to your regular codes.

Deploy your code

What is an application

An application is defined on Clever Cloud by the following elements:

  • a dedicated language/framework
  • a deployment method (FTP and/or Git)
  • RAM and CPU consumption, depending on the language or framework used
  • an optional configuration file you may add to your project

If one of these elements is missing, Clever Cloud can’t deploy your application properly (except the configuration file, optional in some cases).

Supported platforms:

How it works

When an application’s code is pushed to git or via FTP, the platform receives it. It then checks the resources’ requirements. If they are complete, the deployment is launched. When finished and successful, the application is up and running.

The log system retrieves all output from the application and displays it in the logs tab of your application in the Clever Cloud console.

Create an application

In the Clever Cloud Console:

  1. Select the proper organization you want to add the application to. At this point you must only have the Personal Space but you can create one. Then, click on the Add an application button in the Organization Manager panel. This starts the application creation wizard. If your account has been linked to GitHub, you can select a repository from your GitHub account.

If you want to deploy an application within a GitHub organisation, first grant the Clever Cloud API access to it.

  1. Select the language or the framework you need

  2. Optional: For PHP applications, you can choose between FTP and Git deployment.

  3. You will be able to fine-tune your scaling configuration. Horizontal scaling is the number of instances that can run at the same time. Vertical scaling sets the minimum and maximum size the instance can be.

  4. Enter the name and description of your application.

  5. Optional: The wizard will offer you to add an add-on to your application.

  6. Optional: The wizard will offer you to add environment variables to your application.

Git Deployment

To deploy via Git, you need it installed on your machine. You can find more information on Git website: git-scm.com

Note: During the deployment, the .git folder is automatically deleted to avoid security problems. If you need to know which version is used on the server please use the COMMIT_ID environment variable.

Follow these steps to deploy your application:

  1. Get the git deployment url in the application information page, which looks like: git+ssh://git@push.<zone>.clever-cloud.com/<your_app_id>.git.

  2. In your terminal, go to your application repository. If you do not already track your app with git, start by typing:

$ git init
$ git add .
$ git commit -m "first commit"
  1. Then, link your local repository to Clever Cloud by providing the Git remote url:
$ git remote add <remote-name> <your-git-deployment-url>
  1. Push your application to Clever Cloud:
$ git push <remote-name> <branch-name>:master

You can see your application logs in the dashboard to monitor the deployment.

Automated Deployment with GitHub

Once you have created your application with GitHub, each push on the master branch will trigger a deployment. If you want to deploy an other branch than master, you can go to the information panel of your application and select the default branch to use.

Private GitHub repositories are also supported.

Caution: in GitHub, private repositories in an ordinary user account are an all-or-nothing deal: either someone has full read write access (i.e., they’re a collaborator) or they have no access. However, if you set up an organization, create the repo under the aegis of the organization, and then add the collaborator, you have much more fine-grained control (including giving read-only access to a private repository).

FTP Deployment

It is possible to deploy via FTP with PHP applications.

To deploy via FTP, you need an FTP software installed on your machine. Filezilla is one of them.

When you have chosen to deploy your application via FTP, a FS Bucket has been created with an ID matching your application’s ID. You will find the FTP credentials in the configuration tab of this particular FS Bucket.

More documentation about Filezilla.

Application management generalities

There are many tabs available in the application’s menu:

  • Information: General informations about your application
  • Scalability: Set-up scalability options
  • Domain names: Manage custom domain names
  • Environment variables: Manage environment variables
  • Service dependencies: Link add-ons and applications
  • Exposed configuration: Manage exposed environment variables
  • Activity: Track last deployments
  • Logs: Visualize application’s logs
  • Metrics: Visualize application’s metrics
  • Consumption: Visualize your application’s consumption.

Create your first add-on

Applications often requires one or more services in addition to the runtime itself. Add-ons are services you can use independantely, or you can link them with your application(s). For instance, you may want to add a database or a caching system to your application or just have a database with no linked application.

An add-on can be shared by different applications to share data between them. It can be a database shared by two or three applications of your infrastructure for example, or they can be independent.

Most of the add-ons catalog is provided by Clever Cloud, but vendors are also allowed to provide services external to Clever Cloud (See how to integrate your SaaS with Clever Cloud)

Available add-ons

Clever Cloud provides multiple add-ons to work with your applications:

Add-on Billing

There are two kinds of billing:

  • Per-month billing: Add-ons with fixed resources (storage, CPU and RAM)
  • Per-usage billing: Add-ons based on consumption, like FS-Buckets and Cellar

Note: Per usage billing will be taken on runtime credits each day, while per-month add-ons will create a new line in the monthly invoice.

Create an add-on for an existing application

Here we will assume you want to create a new add-on and link it to your application.

In order to create it, go to the Clever Cloud Console. Go to the organization in which you wan to create the add-on, for example your personal space.

  1. When you are in the organization, click on Add an add-on. This space let you create and configure the add-on according to your needs.

  2. Choose which type of add-on you want to create. See above the list of available add-ons and their corresponding documentation pages for further information on how they work.

  3. Select the plan you need for you add-on. You can find details about the pricing, the capacity of the add-on, … on this page or in the corresponding documentation page.

  4. You will be able to choose with which application you want to link you add-on. Linking an add-on to an application will provide configuration to the application through environment variables. The environment variables provided by the add-on are available for use in the linked application.

If you want to use your add-on alone, just don’t link it to any application.

  1. Choose the name of the add-on and the region where the add-on will be hosted.

  2. Click on the Create button and the add-on will now be available in your organization, and corresponding environment variables will be available for the applications linked to the add-on you just created.

To link an already existing add-on with your application, just follow these steps:

  1. Go in the organization of your application and click on the name of the application you want to link with your add-on.
  2. Go in the Service dependencies section.
  3. Select the add-on you want to link under the “Link addons” dropdown menu.
  4. Click on the Link button of the add-on you want to link to your application.

Managing your add-on

Once an add-on is created, at least two managment tabs are available in the Clever Cloud console:

  • the Information tab
  • the Configuration tab

Other tabs may be available, depending on the add-on type.

Information screen

This screen sums-up the characteristics of the selected add-on. Features and environment variables (if applicable) are shown.

Example of the information tab of an add-on
Example of the information tab of an add-on

Configuration screen

Add-ons can be managed from the Configuration tab. This screen is managed directly by the provider of the add-on.

Example of the configuration tab of an add-on
Example of the configuration tab of an add-on

Delete an add-on

To delete an add-on, go to the Configuration page of the add-on, and click on Remove add-on. Warning: After deletion of the add-on, all associated data will be removed.