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

# Go Hosting Guide

> Learn how to deploy Go applications on ShardCloud platform.

# Getting Started with Go Hosting

Deploy your Go applications on ShardCloud with minimal configuration and maximum performance.

<Info>
  ShardCloud supports Go applications with automatic module resolution and dependency management.
</Info>

## Prerequisites

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

<CardGroup cols={2}>
  <Card title="Required Files" icon="circle">
    Essential files for deployment
  </Card>

  <Card title="Simple Structure" icon="check">
    Clean deployment process
  </Card>
</CardGroup>

## Required Files

Your Go application must include these three essential files:

### 1. Entry Point File

* **File**: `main.go` or your main Go file
* **Purpose**: Main application entry point with main() function
* **Requirements**: Must contain your application's main execution code

### 2. Module Configuration

* **File**: `go.mod`
* **Purpose**: Defines Go module and dependencies
* **Requirements**: Valid Go module file with module name and dependency versions

### 3. ShardCloud Configuration

* **File**: `.shardcloud`
* **Purpose**: Platform-specific deployment settings
* **Requirements**: Plain text configuration file in root directory

<Warning>
  All three files are mandatory. Missing any of these files will prevent successful deployment.
</Warning>

## ShardCloud Configuration

The [.shardcloud](/config) file configures your application deployment settings.

### Configuration Example

```bash theme={null}
DISPLAY_NAME=myfirstgoproject
DESCRIPTION=a simple go application
MAIN=main.go
MEMORY=512
VERSION=LATEST
```

<Note>
  Go applications are typically memory-efficient. Choose the minimum required memory for optimal performance.
</Note>

## Deployment Process

<Steps>
  <Step title="Initialize Module">
    Ensure go.mod is properly configured with all dependencies
  </Step>

  <Step title="Prepare Entry Point">
    Verify your main Go file contains the main() function
  </Step>

  <Step title="Configure Platform">
    Create .shardcloud file with deployment settings
  </Step>

  <Step title="Create Archive">
    Zip or RAR your project
  </Step>

  <Step title="Upload via Dashboard">
    Use [ShardCloud dashboard](https://shardcloud.app/dash) to upload your archive
  </Step>

  <Step title="Deploy & Monitor">
    Application automatically builds and deploys
  </Step>
</Steps>

## Common Configuration Examples

### Gin Web Server

```bash theme={null}
DISPLAY_NAME=gin-api
DESCRIPTION=REST API with Gin framework
MAIN=server.go
MEMORY=512
VERSION=LATEST
SUBDOMAIN=ginapi
```
