Skip to main content

Getting Started with Elixir Hosting

Deploy your Elixir applications on ShardCloud with minimal configuration and maximum performance.
ShardCloud supports Elixir applications with automatic dependency management via Mix and OTP support.

Prerequisites

Before uploading your Elixir application, ensure you have the following project structure ready.

Required Files

Essential files for deployment

Excluded Files

Files to exclude before upload

Required Files

Your Elixir application must include these essential files:

1. Entry Point File

  • File: lib/your_app.ex or main module file
  • Purpose: Main application entry point
  • Requirements: Must contain your application’s main module

2. Dependencies Configuration

  • File: mix.exs
  • Purpose: Defines project dependencies, configuration, and application metadata
  • Requirements: Valid Mix project file with all dependencies listed

3. ShardCloud Configuration

  • File: .shardcloud
  • Purpose: Platform-specific deployment settings
  • Requirements: Plain text configuration file in root directory
All three files are mandatory. Missing any of these files will prevent successful deployment.

Files to Exclude

Remove these files/folders before creating your deployment archive:
  • _build/
  • deps/
  • .elixir_ls/
  • *.beam (compiled files)

ShardCloud Configuration

The .shardcloud file configures your application deployment settings.

Configuration Example

DISPLAY_NAME=myfirstelixirproject
DESCRIPTION=a simple Elixir application
MAIN=lib/my_app.ex
MEMORY=512
VERSION=recommended
Elixir applications benefit from the BEAM VM’s efficiency. Choose memory based on your application’s concurrent workload.

Deployment Process

1

Prepare Application

Ensure all required files are present and configured
2

Verify mix.exs

Confirm all dependencies are listed in your mix.exs file
3

Exclude Unnecessary Files

Remove _build/, deps/, and .elixir_ls/ folders
4

Create Archive

Zip or RAR your project
5

Upload via Dashboard

Use ShardCloud dashboard to upload your archive
6

Deploy & Monitor

Application automatically builds dependencies and deploys

Common Configuration Examples

Phoenix Web Application

DISPLAY_NAME=phoenix-app
DESCRIPTION=Web application with Phoenix Framework
MAIN=mix.exs
MEMORY=1024
VERSION=recommended
SUBDOMAIN=phoenix
CUSTOM_COMMAND=mix phx.server

GenServer Background Worker

DISPLAY_NAME=elixir-worker
DESCRIPTION=Background worker with GenServer
MAIN=lib/worker.ex
MEMORY=256
VERSION=LATEST