For the complete documentation index, see llms.txt. This page is also available as Markdown.

discloud.config

Learn everything about the configuration file for hosting applications on Discloud.

📄 What is 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

✅ 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 - 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 - 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.

If the TYPE is set to site, you must also define the ID option with your subdomain. See more here.

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 - 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


🪅 Examples of discloud.config files

See 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.

Bot 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.

Discord bot made in Python where the entry point is the main.py file in the root of the project.

Simple website with plain HTML, using the "friendbook" subdomain from the user's account.

Web 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.


⚙️ Options reference

The discloud.config file contains essential settings for your Discloud application. Below are the available configuration options along with their respective limits and descriptions.

Option
Limit / Values
Description

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.

RAM

100 - 32000 MB

The amount of RAM allocated to the application (varies by plan).

VERSION

latest / current / suja / specific

Defines the versioning options for the environment and dependencies.

ID

User-defined subdomains

Custom subdomain for your application (for websites only).

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