discloud.config
Learn everything about the configuration file for hosting applications on Discloud.
📄 What is discloud.config and what is it used for?
discloud.config and what is it used for?It is a configuration file that streamlines the process of deploying your applications to Discloud. With this file, you can easily configure the information for each application you upload to the hosting service.
📂 Placement of the discloud.config File
discloud.config File✅ Correct Placement
The discloud.config file must be in the root of your project.
your-project/ # ← ROOT DIRECTORY
├── discloud.config # ✅ REQUIRED HERE
├── package.json # Example root file
├── src/ # Source code folder
│ └── index.js # Main application file
├── .gitignore # Config files
└── README.md # Documentation❌ Invalid Locations
These placements will cause deployment failures:
your-project/
├── src/
│ └── discloud.config # ❌ SUBFOLDER ERROR
├── config/
│ └── discloud.config # ❌ SUBFOLDER ERROR
└── .github/
└── discloud.config # ❌ HIDDEN FOLDER ERROR🛠️ Configuration options
See below all the configuration options for the discloud.config file. Click here to check out some examples of different applications.
Define information for your application on the hosting platform, such as NAME and AVATAR. This allows you to easily identify your application on the dashboard or in the Visual Studio Code extension. See:
NAME=MyApp
AVATAR=https://i.imgur.com/bWhx7OT.png
NAME- determines the name of your application on the hosting platform.AVATAR- uses the image URL as the avatar for your application on the hosting platform.
For your application to start correctly on the hosting, you need to define its type using the TYPE option, set the entry point with the MAIN option, specify the maximum RAM it can use with the RAM option, and indicate the language version with the VERSION option. See below:
TYPE=bot
MAIN=index.js
RAM=100
VERSION=latestTYPE- can have two values: bot or site.MAIN- should contain the path to the main file of your application.RAM- determines the maximum amount of RAM available for the application.VERSION- specifies the language version of your project.
TYPE=site
ID=your-subdomain
MAIN=index.js
RAM=100
VERSION=latest
To host a website, a minimum of 512MB of RAM is required, along with a Platinum Plan.
Depending on the programming language of your project, you can define which commands will be executed for the build process and the command to start the application using the BUILD and START properties.
To enable automatic restart in case of failures, set the AUTORESTART option to true (available only for Platinum Plan or higher).
You can install packages using the APT option.
BUILD=npm run build
START=npm run start
AUTORESTART=true
APT=toolsBUILD- defines the command or script for compiling the project.START- defines the command or script for starting the project.AUTORESTART- ensures that the application restarts automatically in case of failure.APT- allows you to specify a list of packages to be installed.
⚠️ Mandatory options in your discloud.config
discloud.configOnly one field is required:
MAIN=index.jsAll other fields are optional and will use smart defaults if omitted:
TYPEdefaults tobotRAMdefaults to100(MB)VERSIONdefaults tolatest
🪅 Examples of discloud.config files
discloud.config filesSee below examples of discloud.config files for 🤖 Discord Bots and 🌐 Websites and APIs.
Discord bot made in JavaScript where the entry point is the index.js file in the root of the project.
NAME=Lorito
TYPE=bot
MAIN=index.js
RAM=100
VERSION=latestBot made in TypeScript where the entry point is the index file inside the build folder. The application will start by executing the start script from the package.json file.
NAME=Mee8
TYPE=bot
MAIN=build/index.js
START=npm run start
RAM=200
VERSION=latestDiscord bot made in Python where the entry point is the main.py file in the root of the project.
NAME=Dyna
TYPE=bot
MAIN=main.py
RAM=300
VERSION=latestSimple website with plain HTML, using the "friendbook" subdomain from the user's account.
NAME=Friendbook
TYPE=site
MAIN=index.html
RAM=512
VERSION=latest
ID=friendbookWeb API built with Express.js, where the entry file is index.js inside the server folder. The application will start by executing the start script from the package.json file.
NAME=Crud cinema
TYPE=site
MAIN=server/index.js
START=npm run start
RAM=512
VERSION=latest
ID=moviemark⚙️ Configuration options
The discloud.config file contains essential settings for your Discloud application. Below are the available configuration options along with their respective limits and descriptions.
NAME
1 - 30 characters
The name of your application (used for display purposes).
AVATAR
Image URL (.gif, .jpeg, .jpg, .png)
A URL to the application's avatar. Supported formats: GIF, JPEG, JPG, PNG.
TYPE
bot / site
Defines whether the application is a bot or a website.
MAIN
Relative file path
Specifies the main file that should be executed in the project folder.
VERSION
latest / current / suja / specific
Defines the versioning options for the environment and dependencies.
BUILD
(Custom build commands)
If specified, defines commands to run before the application starts (e.g., installing dependencies).
START
(Custom start command)
Overrides the default start command to launch the application.
AUTORESTART
true / false
Determines whether the app should automatically restart if it crashes.
VLAN
true / false
Enables Virtual LAN (VLAN) for internal networking between applications.
HOSTNAME
(Custom hostname)
Specifies a custom hostname for the application.
APT
(List of packages)
Installs additional Linux dependencies required by your app. View available packages.
Last updated