Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide explains how to deploy Node.js
with a Cloud Server to always have the environment needed to compile or build modern frontends (React, Vue, etc.).
Preamble
- Node.js is a free software platform in JavaScript designed for network applications that need to scale, a simple and effective solution for integrating frontend tools into any server stack.
Node.js
= official name of the language/environment.NodeJS
= "technical" or simplified name in certain contexts (often for practical reasons, no real technical difference).
Install Node.js
Prerequisites
- Install NVM on your Cloud Server.
- Warning: Node.js version 18 is not compatible with older Cloud Servers; perform a migration beforehand!
⚠️ For additional help contact a partner or launch a free tender — also discover the role of the host.
Install the stable version of Node.js
nvm install stable
Install the latest version available
nvm install node
Install an older version (not recommended)
nvm install 17
List the available versions
nvm ls-remote
Install a specific version
nvm install <version>
Switch Node.js version and set version 6.3.1 (or another version) as default
nvm alias default 6.3.1
Use a specific version of Node.js in the current shell
nvm use <version>
Check the currently used version of Node.js
node -v
Source
To set up NVM, go to the WebSSH console of your Cloud Server.
Source the .profile
file
source ~/.profile
Run the following command to check the installation of NVM
nvm
Configure Node as a service
To configure Node as a service, it is recommended to use a "service systemd-user.
Redirect traffic to a specific port
Familiarize yourself with this other guide regarding traffic redirections to a specific port and dedicated IPs.
This guide concerns the database management features available on Infomaniak servers.
MySQL, SQLite, MariaDB, PostgreSQL…
At the level of Database Management System, Infomaniak servers support…
- … MySQL databases via PHP MySQL access or via Perl DBI+DBD::mysql
- You can use MySQL as a database management system (DBMS) on Infomaniak servers.
- You can access it either via PHP using the built-in MySQL database functions of PHP, or via Perl using the DBI and DBD::mysql modules
- … MySQLI, the native MySQL access interface (PHP5)
- MySQLI is a PHP extension that allows access to a MySQL database.
- It is an improved and more recent version of the old MySQL extension of PHP, offering enhanced features and performance.
- … SQLite 3.x
- SQLite is a lightweight, self-contained, serverless SQL database engine.
- Infomaniak servers support SQLite version 3.x, which means you can use SQLite to store data on these servers.
- … MariaDB
- MariaDB is a fork of MySQL and is often used as an alternative to MySQL
- You can therefore use MariaDB as a database management system on Infomaniak servers
- … the PGSQL module
- PGSQL is a PHP module that allows you to connect to a PostgreSQL database
- This specific feature allows you to connect to a REMOTE PostgreSQL database via PHP; this requires opening the appropriate port to the precise IP of the PostgreSQL database from the Infomaniak manager.
This guide explains how to update Web Applications installed via Infomaniak tools.
Preamble
- If an application is manually updated via FTP, it is then impossible to update it via the Manager and benefit from automatic updates.
- When installing your Web Application, automatic updates (at least security updates) are usually enabled by default:
Updating an application installed via Infomaniak
To access the Infomaniak Web Application and update it:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product:
- Click on the action menu â‹® located to the right of the relevant Web Application.
- Click on Settings for the application:
- Click on Edit in the Information block:
- Click on the dropdown menu to select a newer version.
- Click on the Save button:
This guide explains how to enable or disable the PHP function set_time_limit
for a Web Hosting.
Preamble
set_time_limit
is a PHP function that sets the expiration time of a script, in seconds; if this limit is reached, the script stops and returns a fatal error.set_time_limit
cannot be used to set values beyond the script execution time limit (max_execution_time) set in the Manager.
Enable or disable the PHP function set_time_limit
To access website management:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product:
- Click on Manage under Advanced Settings:
- Click on the PHP / Apache tab.
- Click the toggle switch button On/Off as desired:
- Click the Save button to confirm the changes.
This guide explains how to move a Web Hosting (and all the sites it contains) from a Cloud Server to another managed Cloud Server.
If you wish to update the current Serveur Cloud to a next-generation server, refer to this other guide.
Preamble
- FTP & MySQL
- When moving a hosting from one Cloud Server to another:
- FTP access and databases do not change.
- Only the supported versions of PHP and MariaDB, as well as the server's IPv4 and IPv6 addresses, change for the hosting.
- Hostnames do not change and are automatically updated to point to the new IP addresses.
- When moving a hosting from one Cloud Server to another:
- Temporary interruption:
- The sites on the hosting will be unavailable during the migration of the data.
- This process can take several minutes depending on the number of files to be transferred to the new Cloud Server.
- Potential switch to HTTP/2:
- **HTTP/2 is active** on the new servers.
- Some directives that may be present in your server's .htaccess file might require adjustment.
- Traffic redirection:
- A proxy is set up for 7 days to redirect traffic from the old server to the new one.
- It is therefore advisable to consider this during this period, especially for the crons (see below).
- Cron jobs not migrated:
- The SSH crons are not migrated.
- Files and crons are generally not deleted immediately, which can result in duplicates.
- Managing crons is your responsibility; depending on the progress of your migration, you must:
- deactivate and activate crons via SSH if you have any, to avoid any execution conflicts,
- check your crons,
- ensure they are properly configured on your new Cloud Server.
Move the hosting
Prerequisites
- Both servers must be in the same Organization and accessible to the user performing the operation.
Once the second Cloud Server is operational:
- Click here to access the management of your Web Hosting on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on the Manage button.
- Click on Move to another server in the menu that appears:
- Select the desired destination server.
- Click on Validate.
Adjust the DNS zone and finish
If your domain names are not managed at Infomaniak or in the same Organization as the Cloud Server:
- Adjust the A record of the domains concerned.
- Any DNS addition/modification can take up to 48 hours to propagate.
- It is therefore recommended not to cancel the old Cloud Server before this deadline.
- Cancel the old Cloud Server if necessary.
This guide explains how to migrate from a VPS Lite to a VPS Cloud while keeping all your data and without having to reconfigure your installation.
It is not possible to cancel this change or go back. Switching from a VPS Cloud to a VPS Lite is not possible.
Perform a migration from VPS Lite to VPS Cloud
To begin the operation, access the VPS Lite:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on Upgrade my offer:
- Click on the Upgrade button on the modal that appears.
- Complete the order to upgrade your VPS Lite.
- Wait during the migration, a service interruption will be felt during the process.
This guide explains how to display the IP address of a site on your Web Hosting.
Preamble
- The IPv4 address is generally the same for each site on the hosting (unless you have acquired a dedicated IP).
Display the IP address of your site
The IP address is specified on the hosting management page (Starter or containing multiple sites):
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Then click on the chevron ‍ to expand the Information section of this hosting.
- The IPv4 address is displayed on the page:
- The IPv6 address is also displayed in the case of paid hosting:
This guide explains how to move an existing website within an Web Hosting Infomaniak to another Infomaniak Web Hosting.
Preamble
- There are not many turnkey solutions for moving a website.
- Generally, few hosts offer the export or import of a complete site with its databases; this is largely due to the fact that there are many ways to build a site and just as many languages that are largely incompatible with each other.
- If the site to be transferred is built with WordPress, refer to this other guide illustrating a simplified solution.
- It is also possible to move a complete Web hosting (read below).
- For additional help, contact a partner or launch a free tender — also discover the role of the host.
Manual solution: website transfer example
To do this manually, it is necessary to:
- retrieve the web data as well as the associated databases,
- re-publish this on a site created on the destination web hosting,
- and if the associated domain name is the same, the first site will need to be deleted or renamed.
For the rest, here is an example of the procedure to follow:
- Order the other Web Hosting / Cloud Server if you haven't already.
- Create a «fake site» on this new hosting (for example dev.domain.xyz - read more below).
- Manually copy your data via FTP and MySQL (export / import).
- Adjust your site if necessary (database address, etc.).
- Once you are satisfied with the «new site», delete the old one.
- Change the name of the new site to give it its true name.
An alternative, at point 2 above, is to work with the alias www.
which you can detach beforehand from your current site. Indeed, the alias www(.domain.xyz) is often installed as an alias for your site, and it is enough to detach it, which allows the creation of a site on the other hosting with the name www.domain.xyz (do not forget, at point 6, to add your alias of type "domain.xyz" without the www to this new site).
Moving entire Web Hostings
There is an automated way to move a Infomaniak Web Hosting to:
- an Infomaniak Cloud Server (if the hosting is currently shared or if the hosting is already on Cloud Server)
- another Infomaniak Organization
A Starter hosting cannot be moved but it can be converted.
This guide details the use of Perl or Python scripts on Web Hosting Infomaniak.
Preamble
- Perl and Python scripts are often used with Apache's CGID module to generate dynamic content on web servers.
- This module allows Apache to process requests using scripts written in Perl or Python via the CGI (Common Gateway Interface) protocol, thus offering the possibility to create interactive and responsive web pages based on user interactions with the site.
- However, for security reasons, **Infomaniak has chosen to disable the ability to run scripts written in Perl or Python via this specific module (CGID) of Apache on its shared hosting offers.**
- Therefore, you should consider **changing your plan** to a Cloud Server plan if you are currently on a shared web hosting plan.
Using scripts
Here is some practical information:
- The path to the Python interpreter is
/usr/bin/python
. mod_python
is not supported.- Running scripts without the
pl
orcgi
extension is not possible. However, a file with a.pl
extension can exist and be called via a URL without the extension.
If you receive the following error message:
CGIWrap Error: Execution of this script not permitted
Execution of that script is not permitted for the following reason:
(1) Script file not found.
Request Data:Extra Path Info: /dossier/wwwdata/collection/vignettes/blabla.PL.12.34.56.gif
While the uploaded file is a simple GIF image with a filename type "blabla.PL.12.34.56.gif
", this is due to the name of the files in question. To bypass the issue, simply rename your files.
This guide concerns traffic permits entering and leaving between different hosting media at database level.
Access databases of another hosting...
... from shared accommodation
From a shared hosting (except former formula v1 - 60 GB), it is possible to connect to databases...
- ... of other shared accommodation
- ...of Cloud Server hosting
So you can share a base and establish a remote connection or even cross-access.
... from a Cloud Server
From a Cloud Server, it is possible to connect to databases...
- ... from another Cloud Server (it is necessary to open the port
3306
in TCP / entry into the Firewall)
but it is not possible to connect to the basics of shared hosting.
... from another hosting company
On access to MySQL databases from another host than Infomaniak ‍be aware of this other guide.