Skip to main content

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:

DISPLAY_NAME [*]

Name that will appear for your application.
DISPLAY_NAME=My Cool App
Max 50 characters.

DESCRIPTION

A brief description of your application.
DESCRIPTION=My First App with shard cloud!
Max 1024 characters.

MAIN [*]

Entry file of your application (only required if LANGUAGE or CUSTOM_COMMAND are not defined).
MAIN=src/index.js
Max 50 characters. This field is ignored ifCUSTOM_COMMAND is present.

LANGUAGE

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.
LANGUAGE=node
Accepted values: node, python, java, go, static, php

MEMORY [*]

RAM allocated to your application in MB.
MEMORY=512
Must be a positive integer.

VERSION [*]

Version to run your application with.
VERSION=recommended
Accepted values: recommended, latest

SUBDOMAIN

Subdomain for your web application.
SUBDOMAIN=mycoolapp
Only alphanumeric characters. Max 100 characters.Website will be available atmycoolapp.shardweb.app

CUSTOM_COMMAND

Custom command to start your application (optional).
CUSTOM_COMMAND=npm run build && npm run start
Max 250 characters.
If LANGUAGE is set and CUSTOM_COMMAND is used, the MAIN parameter will be ignored.

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

Minimal config
DISPLAY_NAME=Basic Bot
MAIN=index.js
MEMORY=256
VERSION=recommended
Full config with description and language
DISPLAY_NAME=My Super App
DESCRIPTION=My app helps you organize everything.
MAIN=main.py
MEMORY=512
VERSION=latest
LANGUAGE=python
Config with custom startup
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
Website config with subdomain
DISPLAY_NAME=My WebApp
LANGUAGE=html
MEMORY=512
VERSION=recommended
SUBDOMAIN=mywebapp
CUSTOM_COMMAND=npm run start

Parameter limits summary

ParameterMax Length
DISPLAY_NAME50 characters
DESCRIPTION1024 characters
MAIN50 characters
CUSTOM_COMMAND250 characters
SUBDOMAIN100 characters
LANGUAGE35 characters
MEMORYMust be a valid non-negative integer
VERSION60 characters
I