> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shardcloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# How to create your .shardcloud config file

> Learn how to create your ShardCloud configuration file

***

## Our configuration File

The configuration file is a simple text file that defines how your application should be deployed on Shard Cloud. It includes details like the app's main file, memory usage, programming language, and more. The file must be located in the root

## Creating the configuration file

Just create a file named `.shardcloud` and include the parameters described below.

## Configuration parameters

These are the supported configuration parameters:

<Steps>
  <Step title="DISPLAY_NAME [*]" icon="text">
    Name that will appear for your application.

    ```systemd theme={null}
    DISPLAY_NAME=My Cool App
    ```

    <Info>
      Max 50 characters.
    </Info>
  </Step>

  <Step title="DESCRIPTION" icon="text">
    A brief description of your application.

    ```systemd theme={null}
    DESCRIPTION=My First App with shard cloud!
    ```

    <Info>
      Max 1024 characters.
    </Info>
  </Step>

  <Step title="MAIN [*]" icon="file">
    Entry file of your application (only required if `LANGUAGE` or `CUSTOM_COMMAND` are not defined).

    ```systemd theme={null}
    MAIN=src/index.js
    ```

    Max 50 characters. This field is **ignored** if`CUSTOM_COMMAND` is present.
  </Step>

  <Step title="LANGUAGE " icon="code">
    Programming language of your application.\
    This parameter is automatically detected when `MAIN` is provided. If `MAIN` is not set, you must explicitly define this parameter along with `CUSTOM_COMMAND`.

    ```systemd theme={null}
    LANGUAGE=node
    ```

    <Info>
      Accepted values: `node`, `python`, `java`, `go`, `static`, `php`
    </Info>
  </Step>

  <Step title="MEMORY [*]" icon="memory">
    RAM allocated to your application in MB.

    ```systemd theme={null}
    MEMORY=512
    ```

    <Info>
      Must be a positive integer.
    </Info>
  </Step>

  <Step title="VERSION [*]" icon="arrow-up-9-1">
    Version to run your application with.

    ```systemd theme={null}
    VERSION=recommended
    ```

    <Info>
      Accepted values: `recommended`, `latest`
    </Info>
  </Step>

  <Step title="SUBDOMAIN" icon="globe">
    Subdomain for your web application.

    ```systemd theme={null}
    SUBDOMAIN=mycoolapp
    ```

    Only alphanumeric characters. Max 100 characters.Website will be available at`mycoolapp.shardweb.app`
  </Step>

  <Step title="CUSTOM_COMMAND" icon="terminal">
    Custom command to start your application (optional).

    ```systemd theme={null}
    CUSTOM_COMMAND=npm run build && npm run start
    ```

    <Info>
      Max 250 characters.
    </Info>

    <Info>
      If `LANGUAGE` is set and `CUSTOM_COMMAND` is used, the `MAIN` parameter will be ignored.
    </Info>
  </Step>
</Steps>

## Configuration logic note 🧠

If **both** `LANGUAGE` and `CUSTOM_COMMAND` are provided, then the `MAIN` parameter will be **ignored**, even if specified. This gives you flexibility to fully customize startup behavior for more complex projects.

## Example configurations

```systemd Minimal config theme={null}
DISPLAY_NAME=Basic Bot
MAIN=index.js
MEMORY=256
VERSION=recommended
```

```systemd Full config with description and language theme={null}
DISPLAY_NAME=My Super App
DESCRIPTION=My app helps you organize everything.
MAIN=main.py
MEMORY=512
VERSION=latest
LANGUAGE=python
```

```systemd Config with custom startup theme={null}
DISPLAY_NAME=Custom Starter
DESCRIPTION=A Node.js app with a custom command
LANGUAGE=node
MEMORY=1024
VERSION=recommended
CUSTOM_COMMAND=npm run build && npm run start
```

```systemd Website config with subdomain theme={null}
DISPLAY_NAME=My WebApp
LANGUAGE=html
MEMORY=512
VERSION=recommended
SUBDOMAIN=mywebapp
CUSTOM_COMMAND=npm run start
```

## Parameter limits summary

| Parameter       | Max Length                           |
| --------------- | ------------------------------------ |
| DISPLAY\_NAME   | 50 characters                        |
| DESCRIPTION     | 1024 characters                      |
| MAIN            | 50 characters                        |
| CUSTOM\_COMMAND | 250 characters                       |
| SUBDOMAIN       | 100 characters                       |
| LANGUAGE        | 35 characters                        |
| MEMORY          | Must be a valid non-negative integer |
| VERSION         | 60 characters                        |
