---
title: "Installing Camaleon CMS on your Cloud Web hosting plan"
url: https://docs.ovhcloud.com/it/guides/web-cloud/web-hosting/install-camaleon
lang: it
lastUpdated: 2022-05-04
---
# Installing Camaleon CMS on your Cloud Web hosting plan

## Objective

[Camaleon CMS](http://camaleon.tuzitio.com/) is a Content Management System (CMS) written in Ruby and based on the [Ruby on Rails](https://rubyonrails.org/) web framework. [OVHcloud Cloud Web hosting](https://www.ovhcloud.com/it/web-hosting/cloud-web-offer/) allows you to use Ruby as a runtime engine for your websites, and therefore to install and host Camaleon CMS or any other web application built in Ruby. In this tutorial, we will install a website with Camaleon CMS on an OVHcloud Cloud Web hosting plan and make it available through your domain name.

**Find out how to install Camaleon CMS on Cloud Web**

## Requirements

- A [OVHcloud Cloud Web hosting plan](https://www.ovhcloud.com/it/web-hosting/cloud-web-offer/).
- Access to your <ManagerLink to="/">OVHcloud Control Panel</ManagerLink>, in the `Web Cloud` section.
- What you should know:
  - The basics of the Ruby ecosystem.
  - How to connect via SSH.
  - How to edit a file from the command line using Vim, Emacs or Nano, for example.

## Instructions

### Step 1: enabling Ruby as a runtime engine

To access the runtime engines of your Cloud Web hosting plan, log in to your OVHcloud Control Panel
. Click `Hosting`
 in the services bar on the left, then choose the name of the relevant Cloud Web hosting plan. Finally, go to the `Runtime engines`
 tab.
The table that appears displays the runtime engines currently added. Make sure that the Ruby runtime engine is enabled. If it is, proceed to Step 2 _Associating Ruby with a multisite_.

![The Ruby runtime engine must be present](/images/assets/screens/control-panel/product-selection/web-cloud/cloud-web/runtime-software-application/tab-phpfpm7-4.png)

If it is not, add a new one (if your plan allows it) or modify the existing runtime engine.

- **If you want to add an engine**: click `Actions` above the table, then `Add a runtime engine`.
- **If you want to modify an engine**: click the `...` button to the right of the relevant engine, then `Edit`.

In the window that appears, fill in the requested information with the following values from our example, or adapt them to your own situation.

| Information                  | Value to enter |
| ---------------------------- | -------------- |
| Custom name                  | Ruby 2.6       |
| Runtime engine               | ruby-2.6       |
| Path to the public directory | public         |
| Application environment      | production     |
| Application launch script    | config.ru      |

Once the information is filled in, click `Confirm`. If you would like more information about managing runtime engines, refer to our guide _[Managing the runtime engines of Cloud Web](/it/guides/web-cloud/web-hosting/manage-runtime-software-applications.md)_.

![Adding the Ruby runtime engine](/images/assets/screens/control-panel/product-selection/web-cloud/cloud-web/runtime-software-application/modify-a-runtime-software-application-ruby2-6.png)

### Step 2: associating Ruby with a multisite

Now that Ruby is enabled as a runtime engine, you must associate it with one of your multisites. To do this, go to the `Multisite` tab. The table that appears contains all the domain names that have been added as a multisite.

![Associating Ruby with a multisite](/images/assets/screens/control-panel/product-selection/web-cloud/cloud-web/multisite/tab-phpfpm7-4-full-disabled.png)

Two columns should draw your attention in the table above. Check that the Ruby runtime engine is properly linked to the relevant domains and that the root folder is correct. Use the information below if needed. If it is, proceed to Step 3 [Connecting to your Cloud Web via SSH](#sshconnexion).

| Column         | Description                                                                                                                                                                                                               |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Root folder    | This is the root folder that must contain the source code of the relevant domain (it corresponds to the "DocumentRoot"). In our example, we choose to specify "camaleon". It must therefore contain our Ruby source code. |
| Runtime engine | This is the runtime engine associated with the relevant domain. The name displayed corresponds to the _Custom name_ you defined when creating the runtime engine. In our example, you should find _Ruby 2.6_.             |

If it is not, add a new multisite or modify the existing one.

- **If you want to add a multisite**: click `Actions`, then `Add a domain or subdomain` to the right of the table.
- **If you want to modify a multisite**: click the `...` button to the right of the relevant domain name, then `Edit`.

In the window that appears, fill in the requested information according to your own situation. The table below shows the values used for this tutorial.

| Information    | Example value used for this tutorial |
| -------------- | ------------------------------------ |
| Domain         | `camaleon.demo-cloudweb.ovh`         |
| Root folder    | `camaleon`                           |
| Runtime engine | Ruby 2.6                             |

As for the additional options, choose the ones you want to enable. Once the information is filled in, click `Next`, then finalise the operation. This addition can take up to one hour. However, the change to the DNS configuration can take up to 24 hours to become fully effective. If you would like more information about managing multisites, refer to our guide "[Sharing your hosting plan between several websites](/it/guides/web-cloud/web-hosting/multisites-configure-multisite.md)".

![Sharing your hosting plan between several websites](/images/assets/screens/control-panel/product-selection/web-cloud/cloud-web/multisite/add-a-domain-or-sub-domain-step-2-django.png)

### Step 3: connecting to your Cloud Web via SSH [](#)
First, retrieve the information you need to connect. To do this, go to the `FTP - SSH` tab. If it does not appear in the list, first click the button with three bars. The information related to your storage space then appears. Locate the details listed in the table:

- **SSH**: The element that appears lets you retrieve two pieces of information.
  - **the server address**: it starts after `ssh://` and ends before the `:`
  - **the connection port**: the number is shown after the `:`
    For example, you might find: `ssh://sshcloud.cluster000.hosting.ovh.net:12345`, so `sshcloud.cluster000.hosting.ovh.net` as the server address and `12345` as the connection port.
- **Login**: This is the main SSH username created on your hosting plan.

If you no longer know the password of the SSH user, click the `...` button to the right of the relevant user in the table, then `Change password`.

![Connecting to your Cloud Web via SSH](/images/assets/screens/control-panel/product-selection/web-cloud/cloud-web/ftp-ssh/change-password.png)

Now, to connect via SSH, you need to use a terminal. This tool is installed by default on macOS and Linux. A Windows environment will require the installation of software such as PuTTY or the addition of the "OpenSSH" feature. As this procedure is specific to the operating system you use, we cannot detail it in this documentation.

Here is an example of a command line you can use. Replace the "sshlogin", "sshserver" and "connectionport" elements with the ones matching your own situation. Once the command is sent, you will be prompted to enter the password of the SSH user.

```
ssh sshlogin@sshserver -p connectionport
```

### Step 4: preparing the Ruby environment

We will now prepare the Ruby environment needed to host our Camaleon CMS application. From the SSH connection opened on your Cloud Web, define the PATH and GEM\_HOME environment variables.

```sh
democld@cloudweb-ssh:~ $ export PATH=$PATH:/usr/local/ruby2.6/bin:~/.gem/ruby/2.6.0/bin
democld@cloudweb-ssh:~ $ export GEM_HOME=~/.gem/ruby/2.6.0
```

You can make these changes persistent by adding the exports to the `~/.profile` file:

```sh
democld@cloudweb-ssh:~ $ echo 'export PATH=$PATH:/usr/local/ruby2.6/bin:~/.gem/ruby/2.6.0/bin' >> ~/.profile
democld@cloudweb-ssh:~ $ echo 'export GEM_HOME=~/.gem/ruby/2.6.0' >> ~/.profile
```

Install the Ruby on Rails framework.

```sh
democld@cloudweb-ssh:~ $ gem install rails --user --no-doc
Fetching thread_safe-0.3.6.gem
Fetching rack-test-1.1.0.gem
Fetching mini_portile2-2.4.0.gem
...
Successfully installed sprockets-3.7.2
Successfully installed sprockets-rails-3.2.1
Successfully installed rails-5.2.3
37 gems installed
democld@cloudweb-ssh:~ $ rails -v
Rails 5.2.3
```

You can now move into the `camaleon` folder and create your project:

```sh
democld@cloudweb-ssh:~ $ cd camaleon/
democld@cloudweb-ssh:~/camaleon $ rm -f config.ru
democld@cloudweb-ssh:~/camaleon $ RAILS_ENV=production rails new .
exist 
create  README.md
create  Rakefile
identical  .ruby-version
create  config.ru
create  .gitignore
create  Gemfile
run  git init from "."
...
run  bundle exec spring binstub --all
* bin/rake: Spring inserted
* bin/rails: Spring inserted
```

### Step 5: installing and configuring Camaleon CMS

Edit the Gemfile to install Camaleon CMS (source: [https://github.com/owen2345/camaleon-cms](https://github.com/owen2345/camaleon-cms)).

```sh
democld@cloudweb-ssh:~/camaleon $ echo 'gem "camaleon_cms",  ">= 2.4.6"' >> Gemfile
democld@cloudweb-ssh:~/camaleon $ echo 'gem "draper", "~> 3"' >> Gemfile
```

Install the prerequisites and dependencies.

```sh
democld@cloudweb-ssh:~/camaleon $ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.....
Using rake 12.3.2
Using concurrent-ruby 1.1.5
...
Using uglifier 4.1.20
Using web-console 3.7.0
Bundle complete! 20 Gemfile dependencies, 103 gems now installed.
Use bundle info [gemname] to see where a bundled gem is installed.
```

Camaleon CMS uses execjs, which requires a JS runtime engine. We will use NodeJS 8 as the JS runtime engine.

```sh
democld@cloudweb-ssh:~/camaleon $ sed -i 's@\["nodejs", "node"\],@["/usr/local/nodejs8/bin/node"],@' ${GEM_HOME}/gems/execjs-2.7.0/lib/execjs/runtimes.rb
```

Install Camaleon CMS (for the demo, we will use an SQLite database).

```sh
democld@cloudweb-ssh:~/camaleon $ RAILS_ENV=production rails generate camaleon_cms:install
rails generate camaleon_cms:install
Running via Spring preloader in process 12603
create  config/system.json
create  lib/plugin_routes.rb
exist  app/apps
create  app/apps/themes/readme.txt
exist  app/apps/themes
...
create  app/apps/themes/new/views/post_type.html.erb
create  app/apps/themes/new/views/search.html.erb
append  Gemfile
democld@cloudweb-ssh:~/camaleon $ RAILS_ENV=production rake camaleon_cms:generate_migrations
Copied migration 20190625130636_create_active_storage_tables.active_storage.rb from active_storage
Copied migration 20190625130637_create_db_structure.cama_contact_form_engine.rb from cama_contact_form_engine
Copied migration 20190625130638_post_table_into_utf8.camaleon_cms_engine.rb from camaleon_cms_engine
Copied migration 20190625130639_rename_column_posts.camaleon_cms_engine.rb from camaleon_cms_engine
Copied migration 20190625130640_add_confirm_token_to_users.camaleon_cms_engine.rb from camaleon_cms_engine
Copied migration 20190625130641_add_feature_to_posts.camaleon_cms_engine.rb from camaleon_cms_engine
Copied migration 20190625130642_move_first_name_of_users.camaleon_cms_engine.rb from camaleon_cms_engine
Copied migration 20190625130643_improve_menus_structure.camaleon_cms_engine.rb from camaleon_cms_engine
Copied migration 20190625130644_add_group_to_custom_field_values.camaleon_cms_engine.rb from camaleon_cms_engine
Copied migration 20190625130645_install_migrated_seo_plugin.camaleon_cms_engine.rb from camaleon_cms_engine
Copied migration 20190625130646_drop_user_relationship_table.camaleon_cms_engine.rb from camaleon_cms_engine
Copied migration 20190625130647_create_media.camaleon_cms_engine.rb from camaleon_cms_engine
Copied migration 20190625130648_adjust_field_length.camaleon_cms_engine.rb from camaleon_cms_engine
democld@cloudweb-ssh:~/camaleon $ RAILS_ENV=production rake db:migrate
== 20190625130636 CreateActiveStorageTables: migrating ========================
-- create_table(:active_storage_blobs)
-> 0.0076s
-- create_table(:active_storage_attachments)
-> 0.0170s
...
-- change_column("cama_term_taxonomy", :name, :text, {})
-> 0.1065s
== 20190625130648 AdjustFieldLength: migrated (0.2999s) =======================
democld@cloudweb-ssh:~/camaleon $ RAILS_ENV=production rake assets:precompile
```

### Step 6: restarting the Ruby _daemon_

To restart the Ruby _daemon_
, go back to your OVHcloud Control Panel
. Go to the `Multisite`
 tab, click the `...`
 button to the right of the relevant domain name, then click `Restart`
.
Once this is done, the application will be accessible through the domain name chosen in your multisite configuration.

Congratulations, your website using Camaleon CMS is now available! All that is left is to configure it.

### Step 7: using HTTPS

For added security on your website, you can set up an automatic HTTP to HTTPS redirection. To do this, while still in the `camaleon` folder, create a `.htaccess` file with the following content:

```
RewriteEngine On
RewriteCond %{ENV:HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
```

## Conclusion

We have seen how to install a Ruby application on a Cloud Web hosting plan by following the various steps. All that is left is to use Camaleon CMS and publish your first content! You will find more documentation specific to Camaleon CMS and its features in the [project's official documentation](http://camaleon.tuzitio.com/).

## Go further

[Migrating my website to OVHcloud](/it/guides/web-cloud/web-hosting/hosting-migrating-to-ovh.md)

[Putting my website online](/it/guides/web-cloud/web-hosting/hosting-how-to-get-my-website-online.md)

[Installing your website with 1-click modules](/it/guides/web-cloud/web-hosting/cms-install-1-click-modules.md)

[Sharing your hosting plan between several websites](/it/guides/web-cloud/web-hosting/multisites-configure-multisite.md)

For specialised services (SEO, development, etc.), contact the [OVHcloud partners](https://partner.ovhcloud.com/it/directory/).

If you would like assistance using and configuring your OVHcloud solutions, we invite you to consult our various [support offers](https://www.ovhcloud.com/it/support-levels/).

Join our [community of users](https://community.ovhcloud.com/).
