Configure your Application
Applications support various configuration options to customize their behavior. This page provides an overview of the configuration options available for applications running on StateMesh.
Application can be configured from the Configuration
tab in the application details page.
Application-level configuration
Replicas
The number of replicas determines how many instances of the container will be running. This is useful for high availability and load balancing. If you set the number of replicas to 2, for example, two instances of the container will be running and the traffic will be load balanced between them.
Containers
Configure one or more containers that package your application. Each container has its own configuration, such as the container image, port settings, storage volumes, and environment variables. See the Container-level configuration section for more details.
Advanced Settings
The Advanced Settings section allows you to configure additional settings for your application.

The following options are available:
- Update Strategy: If there are multiple replicas of your application, the update strategy determines how the containers are updated after you change the configuration. The options are:
- Simultaneous Update: Old containers are stopped and new ones are started.
- Rolling Update (recommended): The new containers are started and the old ones are stopped, one at a time.
Annotations
Annotations are key-value pairs that can be used to add metadata to your application.
Container-level configuration
Container image
Every application running on StateMesh is packaged as a container image. The container image contains the application code, dependencies, and runtime environment. You can use any Docker-compatible container image.
Images can be pulled either from public repositories, or from private repositories that require authentication. You can also build your own images and publish them to a public or private repository and have StateMesh use that image.

To choose an image from DockerHub choose
and enter some search terms.To use a private image, choose
and enter the registry URL, username, and password.Network
Once you've selected your desired container image, you can configure the ports the image will expose from the Network section

The following options are available:
- Protocol: TCP or UDP
- Name: This is the name of the port, and is used to reference the port in other parts of the application configuration.
- Container Port: The port the container is listening on.
- Service Port: The port to expose the container to other containers / applications.
- Ingress: Whether the port is used as the ingress port for public internet traffic to your application. If you enable this, the public DNS name of your application will route traffic to this port.
You can use
to pre-fill all ports exposed by the container image.Storage
The Storage section allows you to configure storage volumes that will be attached to the container.

The following options are available:
- Name: The name of the volume. You can create a new volume or use an existing one.
- Size: The size of the volume in GB.
- Mount Path: The path in the container where the volume will be mounted.
- Read Only: Whether the container can write to the volume.
- Ephemeral: Whether the volume is ephemeral and will be deleted when the container is stopped.
The default storage provider for the volume is StateMesh, which means that volumes are provided by the StateMesh organization, using our own network storage system.
The data you store with us is encrypted and replicated across multiple machines. This is typically used for sensitive data, because nodes never have access to this data.
You can switch the storage provider to
to bring your own storage using any S3-compatible provider like AWS, Cloudflare R2, etc. StateMesh does not store any data from your S3 bucket.Please see the Storage Providers page for more information on how each storage provider works and how to configure it.
Start command
This option is available under the Advanced section.
You customize the command run by the container upon startup. By default, the container runs the default command specified in the container image.

The following options are available:
- Start command: The command to run when the container starts. This can be a shell command or a script.
- Parameters: Additional parameters to pass to the command. Note that you cannot append parameters to the command itself, you must specify them separately here.
Environment variables
This option is available under the Advanced section.
Use this section to configure environment variables that will be available to the container at runtime.

Resource allocation
This option is available under the Advanced section.
Use this section to configure environment variables that will be available to the container at runtime.

The following options are available:
- CPU: The number of CPU cores to allocate to the container. You can also specify fractions of a core.
- Memory: The amount of memory to allocate to the container.