Skip to main content

Configuration file? What is it? 🤔

The configuration file is a file that contains the parameters of your application, such as the main file, memory, version, and other parameters. This file is used to configure and deploy your application on the DS Cloud platform.

Creating the configuration file

It’s very simple to create the configuration file, just create a file with the name dscloud.config and put the configuration parameters inside it.

Configuration parameters

Below you can see the configuration parameters that you can use in your configuration file.

MAIN [*]

The MAIN parameter is used to define the main file of your application.
Example:
MAIN=index.js
Also supports subdirectories.
MAIN=src/loaders/index.js
This parameter has a maximum of 32 characters.
This configuration is IGNORED if you use the START parameter.

MEMORY [*]

The MEMORY parameter is used to define the amount of memory that your application will use on the DS Cloud platform.
MEMORY=256
The value is in megabytes (MB).
The minimum memory for a bot is 256MB and for a website is 512MB.

VERSION [*]

The VERSION parameter is used to define the version of your application.
VERSION=recommended
For each language, there is a different version, see the table below.
LanguageVersion recommendedVersion latest
JavaScript [Node.js]22.11.023.1.0
Python3.13.03.13.0
JavaJDK 17JDK 22
We recommend using the recommended version as our team has performed extensive testing on all recommended versions.

DISPLAY_NAME [*]

The DISPLAY_NAME parameter is used to define the name of your application.
Example:
DISPLAY_NAME=Admin BOT
This parameter has a maximum of 32 characters.

DESCRIPTION

The DESCRIPTION parameter is used to define the description of your application.
Example:
DESCRIPTION=This bot is designed to help you with your daily tasks.
This parameter has a maximum of 280 characters.

AUTORESTART

The AUTORESTART parameter is used to define if your application should restart automatically if it crashes.
Example:
AUTORESTART=true
By default, this parameter is set to true.

SUBDOMAIN

The SUBDOMAIN parameter is used to define the subdomain of your website.
Example:
SUBDOMAIN=mysite
This parameter has a maximum of 63 characters.
Website URL will be: mysite.dscloudweb.pt

START

The START parameter is used to define a custom startup command for your application.
Example:
START=npm run start
This parameter has a maximum of 128 characters.
This parameter ignores the MAIN parameter, which is used to join DS Cloud’s standardized initialization commands.

Examples of configuration for bots

We have some examples of configurations for bots, below you can see some examples.
This example just uses required parameters. (minimum configuration)
MAIN=index.js
MEMORY=256
VERSION=recommended
DISPLAY_NAME=SuperBot
This example is a bot with all parameters.
MAIN=index.js
MEMORY=256
VERSION=recommended
DISPLAY_NAME=SuperBot
DESCRIPTION=SuperBot is a bot designed to help you with your daily tasks.
AUTORESTART=true
This example uses all parameters and CUSTOM STARTUP COMMAND in a bot.
MAIN=index.js
MEMORY=512
VERSION=recommended
DISPLAY_NAME=NightWatcher
START=npm run start

Examples of configuration for websites

We have some examples of configurations for websites, below you can see some examples.
Website URL will be: mysite.dscloudweb.pt
This example uses all parameters and CUSTOM STARTUP COMMAND in a website.
MAIN=index.js
MEMORY=512
VERSION=recommended
DISPLAY_NAME=Awesome Website
DESCRIPTION=Great content and features await you. Stay tuned for updates!
SUBDOMAIN=mysite
START=npm run build && npm run start
AUTORESTART=true

Reinforcing the limits

For security and performance reasons, there are limits on the configuration parameters. Below you can see the limits of each parameter.
ParameterCharacter limit
MAIN32 characters
DISPLAY_NAME32 characters
DESCRIPTION280 characters
START128 characters
SUBDOMAIN63 characters