> For the complete documentation index, see [llms.txt](https://supersonic-ai.gitbook.io/supersonic-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://supersonic-ai.gitbook.io/supersonic-documentation/for-developers/self-hosting-guide.md).

# Self-Hosting Guide

SuperSonic is built to be fully self-hosted, giving you complete control over your data and operations. Follow this guide to set up and run your own instance of SuperSonic on your server or local machine.

### Prerequisites

* **Server/Cloud Instance or Local Machine:** (e.g., AWS, DigitalOcean, or your own PC)
* **Node.js:** Version 23+ installed
* **Git:** To clone the repository
* **pnpm:** Install globally with `npm install -g pnpm`
* **Basic Knowledge:** Familiarity with TypeScript/Node.js is recommended
* **API Keys:** For Sonic operations (e.g., EVM\_PRIVATE\_KEY, OPENAI\_API\_KEY, etc.)

### Installation Steps

#### 1. Clone the Repository

```bash
git clone https://github.com/nicoware-dev/supersonic
cd supersonic/eliza
```

#### 2. Install Dependencies

```bash
pnpm install --no-frozen-lockfile
```

#### 3. Set Up Environment Variables

Copy the example file:

```bash
cp .env.example .env
```

Edit the `.env` file and fill in your credentials:

```env
# Required for Sonic operations
EVM_PRIVATE_KEY=your_private_key
EVM_PROVIDER_URL=https://sonic.drpc.org

# Choose an API provider and add the API_KEY
OPENAI_API_KEY=your_openai_api_key

# Optional: Enhanced Features
ANTHROPIC_API_KEY=your_anthropic_api_key    # Optional
```

### Running Your Instance

#### 1. Build the Project

```bash
pnpm build
```

#### 2. Start the Agent(s)

**For Testing (Single Agent)**

```bash
pnpm start --characters="characters/demo-agent.character.json"
```

**For Full Swarm Deployment**

```bash
pnpm start --characters="characters/coordinator.character.json,characters/metrics-agent.character.json,characters/sales-agent.character.json,characters/meme-agent.character.json,characters/nfts-agent.character.json,characters/alpha-agent.character.json,characters/analyst-agent.character.json,characters/trading-agent.character.json,characters/wallet-agent.character.json,characters/dao-agent.character.json,characters/defi-agent.character.json,characters/demo-agent.character.json,characters/kol-agent.character.json,characters/token-deployer-agent.character.json,characters/nft-deployer-agent.character.json,characters/sonic-expert-agent.character.json,characters/predictions-agent.character.json,characters/advisor-agent.character.json"
```

#### 3. Run the Web Client

Open a new terminal window:

```bash
cd client
pnpm run dev
```

Your web client will be available at a local URL (usually `http://localhost:3000`) or your server's address.

### Support & Maintenance

#### Community Support

Need help? Join our [Discord](https://discord.gg/dCtktdkt6J) for real-time assistance and community discussions.

#### Regular Updates

Keep your instance up to date:

* Regularly pull updates from the repository
* Check for new features and improvements
* Apply security updates when available

#### Documentation

For troubleshooting and advanced configuration:

* Review our technical documentation
* Check the [plugin documentation](/supersonic-documentation/for-developers/elizaos-plugin.md)
* Explore our [development guides](/supersonic-documentation/for-developers/developer-quick-start.md)

Enjoy full control over your SuperSonic instance and make the most of a self-hosted, AI-powered DeFi experience! 🚀


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://supersonic-ai.gitbook.io/supersonic-documentation/for-developers/self-hosting-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
