Quickstart

Quickstart

Clever Cloud is an automated hosting platform that lets you deploy apps and launch dependencies without worrying about infrastructure setup. This guide shows you how to deploy your first app while learning the basics of Clever Cloud.

Clever Cloud applications

Every Clever Cloud application must have:

  • A language or framework
  • A deployment method (Git, GitHub, or FTP)
  • Resource allocation (CPU, RAM, disk)
  • A configuration file (optional)

Except for the optional configuration file, Clever Cloud can’t deploy an application if any required element is missing.

Note

Clever Cloud runtimes use immutable infrastructure and always start fresh with each deployment. This means local file storage is not persistent. For data that needs to persist between deployments, use FS Bucket (file storage), Cellar (object storage), or a database service.

Supported runtimes

How Clever Cloud works

When you push your code via Git or FTP, Clever Cloud checks that all required elements are present and deploys automatically if they are. Once deployment completes, your application is live.

View application logs in the Logs tab of the Clever Cloud Console.

Create a Clever Cloud account

You can sign up for Clever Cloud using your email or your GitHub account.

Navigate to the Clever Cloud Console, click Create an account at the bottom of the page, and select the sign-up method you prefer.

You need a valid email address (not a temporary or disposable one) to sign up using email.

  • Create a password with at least 6 characters.
  • Validate your email address by clicking on the link in the confirmation email from Clever Cloud.

Use the GitHub sign up to create a Clever Cloud account or link an existing account to GitHub in one click. Signing up with GitHub requires permission to read your:

  • Public key
  • User repositories

Repository permission lets you deploy GitHub apps to Clever Cloud in one step.

Give the Clever Cloud API access to a specific GitHub organisation in your GitHub account Developer Settings.

Enable two-factor authentication

Enable two-factor authentication (2FA) in your Authentication settings.

Note

Save your recovery codes when Clever Cloud displays them. Without them, you won’t be able to recover your account if you lose access to your 2FA device.

Deploy your code

To deploy on Clever Cloud, you’ll create an application in the console, then push your code via Git, GitHub, or FTP.

Set up a Clever Cloud application

In the Clever Cloud Console:

Select the organization

From the left menu, choose the organization to deploy in. If you only have a Personal space, click Add an organization to create one.

Create an application

In the Organization manager panel at the top of the left menu, click + Create and select Application to start the creation wizard.

If your account is linked to GitHub, you can select a repository in the wizard.

To deploy an application from a GitHub organization, first grant the Clever Cloud API access to it.

Select the application type

Choose your language or framework.

💡
Note: PHP applications can use FTP or Git deployment.

Configure scaling

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.

Learn more about scaling and instance size.

Give the application a name

Enter a name and description for the application.

Optional steps

The wizard will prompt you to configure add-ons and environment variables, if needed.

Choose a deployment method

Follow the steps for your preferred deployment method in the tabs below.

Monitor deployment progress in the Logs tab of the Clever Cloud Console.

You’ll need Git installed on your machine to deploy with it. Learn more at git-scm.com.

To deploy with Git:

  • Navigate to the application information page in the Clever Cloud Console and copy the Git deployment URL. It will look something like git+ssh://git@push.<zone>.clever-cloud.com/<your_app_id>.git.
  • Open your terminal and go to your application directory. Initialize Git if you haven’t already:
git init
git add .
git commit -m "first commit"
  • Link your local repository to Clever Cloud by providing the Git remote URL:
git remote add <remote-name> <your-git-deployment-url>
  • Push your application to Clever Cloud:
git push <remote-name> <branch-name>:master

Note: The .git folder is automatically deleted during deployment for security. To track which version is deployed, use the COMMIT_ID environment variable.

Once you have created an application with GitHub, each push to the master branch triggers a deployment. If your repository uses main or another branch, go to the application’s information panel and select the default branch to use.

Selecting the GitHub deployment branch
Selecting the GitHub deployment branch

If the repository doesn’t appear in the list fetched from GitHub, you might need to relink your GitHub account to Clever Cloud. In GitHub, navigate to Authorized OAuth Apps (Settings > Applications) and revoke access for Clever Cloud API. Return to your Clever Cloud profile and click Link your GitHub account in the Information tab.

Note: You can use private GitHub repositories with Clever Cloud. However, personal GitHub accounts grant collaborators full access to private repositories. For granular permissions (like read-only access), use a GitHub organization.

Only PHP applications can be deployed with FTP.

Ensure you have FTP software like FileZilla installed on your machine. For more information, see the FileZilla Client Tutorial.

To deploy your application via FTP, create an FS Bucket with the same ID as your application ID. Find the FTP credentials in the FS Bucket Configuration tab.

PHP applications with FTP deployment start automatically when created, even without any code.

⚠️
FTP deployment is suitable for small websites. For large PHP websites, we strongly recommend using Git deployment.

Troubleshooting

Git ⋅ Prompted for a password when pushing

If Git asks for a password when you push, check your SSH key configuration.

Add your SSH key to Clever Cloud in the SSH Keys tab of your profile. See the SSH keys documentation for more information.

Git ⋅ Unable to resolve the reference master

This error means that Git can’t find the branch reference you’re trying to push.

  • You can only push to the master branch for deployment. Pushing to another branch will trigger an error.
  • You cannot push tags to trigger deployments. Only branch pushes will deploy your code.

To push to master from a different local branch, use this syntax:

git push <remote-name> <branch-name>:master
GitHub ⋅ fatal: does not appear to be a git repository

If you try to push directly to an application created from a GitHub repository, you’ll get this error:

fatal: '/data/repositories/<app_id>.git' does not
appear to be a git repository

Applications created from GitHub repositories are cloned directly from GitHub (no Git repository is created on Clever Cloud) and deploy automatically.

If you need to deploy by pushing directly to Clever Cloud (for example, from a CI/CD pipeline), create a non-GitHub application instead.

Manage Clever Cloud applications

The Clever Cloud application menu includes the following tabs:

  • Information: General information about the 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 previous deployments
  • Logs: View application logs
  • Metrics: View application metrics
  • Consumption: View application resource consumption

Add-ons for Clever Cloud applications

Applications often need databases, storage, or other services in addition to the runtime. Clever Cloud add-ons provide these services.

An add-on can be used independently, linked to an application, or shared between applications. For example, a database can be used standalone without linking it to an application, or it can be linked to multiple applications that share the data.

Clever Cloud hosts and manages most add-ons in the catalog. External vendors can also integrate their services with the platform (learn how).

Available add-ons:

Databases

Storage and messaging

Services and tools

Create your first add-on

When you link an add-on to an application (either during creation or afterward), the add-on provides configuration through environment variables. These variables are automatically available in your application.

Select a tab below depending on whether you’re creating a new add-on or linking an existing one.

  • In the Clever Cloud Console, navigate to the organization where you want to create the add-on (for example, your personal space).
  • Click Add an add-on.
  • Select the type of add-on to create.
  • Select the pricing plan for the add-on. See the add-on billing section below or the Clever Cloud pricing page for more information.
  • Select the application to link the add-on to. To use the add-on alone, don’t link it to an application.
  • Give the add-on a name and select a hosting region.
  • Click Create.
  • In the Clever Cloud Console, navigate to the organization, then select the application.
  • Go to Service dependencies.
  • Click Link add-ons and select the add-on from the dropdown menu.
  • Click Link.

Add-on billing

Add-ons with fixed resources (storage, CPU, RAM) are billed monthly, and add-ons that scale with consumption (like FS Bucket and Cellar) are billed based on usage.

📊
How you’re invoiced: Per-usage billing is deducted from daily runtime credits. Per-month billing appears as a line item on your monthly invoice.
⚠️
Free plans: Some add-ons offer free plans for testing purposes. Free plans run on shared resources with variable, non-guaranteed performance, and may run different versions than dedicated instances. Free plans are not suitable for production use.

Manage add-ons

Each add-on has a management interface and sidebar menu. The sidebar menu always includes:

  • Add-on dashboard: Connection credentials and configuration tools

“Add-on dashboard”
Example of an add-on dashboard

  • Information: Overview of add-on details, plan, and environment variables

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

Delete add-ons

To delete an add-on, go to the add-on’s Information view and click Remove add-on.

⚠️
Deleting an add-on permanently removes all associated data.
Last updated on

Did this documentation help you ?