> ## Documentation Index
> Fetch the complete documentation index at: https://developers.stellar.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Stellar Info File (SEP-1)

> SEP-1 (Stellar Info File) allows wallets and other Stellar applications to discover information about your anchor service.

## Overview

SEP-1 (Stellar Info File) allows wallets and other Stellar applications to discover information about your anchor service. By hosting a `stellar.toml` file at `/.well-known/stellar.toml`, you enable applications to automatically find:

* Your organization's information
* Supported assets and currencies
* Authentication endpoints (SEP-10)
* SEP endpoints for SEP-6, SEP-24, SEP-31, SEP-38, SEP-45

For details, please refer to the [SEP-1 specification][sep-1].

## Creating Your stellar.toml File

Create a `stellar.toml` file with your service information. Here's a minimal example to get started:

```toml TOML theme={"theme":{"light":"github-light","dark":"github-dark"}}
# dev.stellar.toml
ACCOUNTS = ["GD...G"]  # Your distribution account public keys
SIGNING_KEY = "GD...G"  # Your signing key (public key) for SEP-10 authentication
NETWORK_PASSPHRASE = "Test SDF Network ; September 2015"  # Use "Public Global Stellar Network ; September 2015" for mainnet

[DOCUMENTATION]
ORG_NAME = "Your organization"
ORG_URL = "https://your-website.com"
ORG_DESCRIPTION = "A description of your organization"
```

> [!TIP]
>
> For a complete list of all available `stellar.toml` attributes, see the \[SEP-1 specification]\[sep-1]. You'll need to add additional sections like `[[CURRENCIES]]`, `TRANSFER_SERVER`, `TRANSFER_SERVER_SEP0024`, `WEB_AUTH_ENDPOINT`, `WEB_AUTH_FOR_CONTRACTS_ENDPOINT`, `DIRECT_PAYMENT_SERVER` etc., as you configure the supported assets and other SEPs.

> [!WARNING]
>
> **Production vs. Development**: You'll need separate `stellar.toml` files for testnet and mainnet:
>
> * **Testnet**: Use `NETWORK_PASSPHRASE = "Test SDF Network ; September 2015"`
> * **Mainnet**: Use `NETWORK_PASSPHRASE = "Public Global Stellar Network ; September 2015"`
>
> Make sure your production file includes your actual Mainnet distribution accounts, signing keys, and production service URLs.

## Configuration

To enable SEP-1, you need to configure how the Anchor Platform should access your `stellar.toml` file. The platform supports three methods:

| Type | Use Case | Description |
| - | - | - |
| `file` | **Recommended for most cases** | Read from a local file on the server |
| `string` | Quick testing or simple configs | Provide the TOML content directly in the config |
| `url` | External hosting | Fetch from a remote URL (useful for dynamic content) |

### Environment Variables

Configure SEP-1 using the following environment variables:

* `SEP1_ENABLED`: Set to `true` to enable SEP-1
* `SEP1_TOML_TYPE`: One of `file`, `string`, or `url`
* `SEP1_TOML_VALUE`: The value depends on the type (see examples below)

### Method 1: File (Recommended)

Best for: Production deployments where you manage the file on disk.

```bash bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# dev.env
SEP1_ENABLED=true
SEP1_TOML_TYPE=file
SEP1_TOML_VALUE=/path/to/your/stellar.toml
```

> [!TIP]
>
> When using Docker, mount your `stellar.toml` file as a volume and reference the path inside the container. For example:
>
> ```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
> # docker-compose.yaml
> volumes:
>   - ./config/stellar.toml:/config/stellar.toml:ro
> ```
>
> Then set `SEP1_TOML_VALUE=/config/stellar.toml` in your environment.

### Method 2: String

Best for: Quick testing, development, or when managing config via environment variables.

```bash bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# dev.env
SEP1_ENABLED=true
SEP1_TOML_TYPE=string
SEP1_TOML_VALUE="ACCOUNTS = [\"GD...G\"]
SIGNING_KEY = \"GD...G\"
NETWORK_PASSPHRASE = \"Test SDF Network ; September 2015\"
[DOCUMENTATION]
ORG_NAME = \"Your organization\"
ORG_URL = \"https://your-website.com\""
```

> [!WARNING]
>
> When using the `string` type, ensure your TOML content is properly escaped for your environment file format. For complex configurations, the `file` type is easier to manage.

### Method 3: URL

Best for: Dynamic content or when hosting the file externally.

```bash bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# dev.env
SEP1_ENABLED=true
SEP1_TOML_TYPE=url
SEP1_TOML_VALUE=https://example.com/stellar.toml
```

> [!NOTE]
>
> When using the `url` type, the Anchor Platform will fetch the file on each request. Make sure the URL is accessible from your Anchor Platform server and returns valid TOML content.

## Accessing Your stellar.toml File

Once configured and enabled, the Anchor Platform automatically serves your `stellar.toml` file at the standard SEP-1 endpoint:

* **`/.well-known/stellar.toml`** - The primary endpoint (served with `Content-Type: text/plain`)
* **`/`** - Redirects to `/.well-known/stellar.toml` when SEP-1 is enabled

### Testing Your Configuration

After starting the Anchor Platform, verify your configuration:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Test the endpoint
curl http://localhost:8080/.well-known/stellar.toml

# Or test the redirect
curl -L http://localhost:8080/
```

You should see your `stellar.toml` content returned as plain text.

### Alternative: External Hosting

You can also host your `stellar.toml` file using a static file server like [nginx] or a CDN. If you choose this approach:

1. Host the file at `https://your-domain.com/.well-known/stellar.toml`
2. Ensure it's publicly accessible
3. Make sure your `stellar.toml` file includes the correct URLs pointing to your Anchor Platform endpoints

The Anchor Platform's SEP-1 service is optional if you're hosting the file externally, but it provides a convenient way to manage everything in one place.

[sep-1]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0001.md

[sep-9]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0009.md

[sep-24]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md

[sep-38]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md

[sep24-get-info]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0024.md#info

[anchor-platform-image]: https://hub.docker.com/r/stellar/anchor-platform

[docker-compose]: https://docs.docker.com/compose/

[minikube]: https://minikube.sigs.k8s.io/docs/

[kubernetes]: https://kubernetes.io/

[nginx]: https://www.nginx.com/

[ap-default-values]: https://github.com/stellar/anchor-platform/blob/develop/platform/src/main/resources/config/anchor-config-default-values.yaml

[stellar-demo-wallet]: https://demo-wallet.stellar.org

[stellar-lab]: https://lab.stellar.org/

[postgresql]: https://www.postgresql.org/

[aurora-postgresql]: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraPostgreSQL.html

[h2]: https://www.h2database.com/html/main.html

[sqlite]: https://www.sqlite.org/index.html

[flyway]: https://documentation.red-gate.com/fd/redgate-flyway-documentation-138346877.html

[sep-24-ref-ui]: https://github.com/stellar/sep24-reference-ui

[sep-24-ref]: https://github.com/stellar/anchor-platform/tree/develop/kotlin-reference-server
