# Turso + Koyeb

> Deploy a JavaScript/Rust app using [Turso Cloud embedded replicas](/features/embedded-replicas) to [Koyeb](https://www.koyeb.com/).
> Canonical HTML: https://tursodb.cn/docs/features/embedded-replicas/with-koyeb/
> Upstream Source (MIT): https://docs.turso.tech/features/embedded-replicas/with-koyeb
> Language: en

---
![Koyeb banner](/images/turso-docs/platforms/koyeb-banner.png)

## Prerequisites

Before you start, make sure you:

* [Install the Turso CLI](/docs/cli/installation/)
* [Sign up or login to Turso Cloud](/docs/cli/authentication/#signup)
* Have a Koyeb account - [create one](https://app.koyeb.com/)

**1. Retrieve database credentials**

You will need an existing database to continue. If you don't have one, [create one](/docs/quickstart/).

Get the database URL:

```bash
turso db show --url <database-name>
```

Get the database authentication token:

```bash
turso db tokens create <database-name>
```

Assign credentials to the environment variables inside `.env`.

```bash
TURSO_DATABASE_URL=
TURSO_AUTH_TOKEN=
```

<div class="doc-callout doc-callout-info"><div class="doc-callout-title">NOTE</div><div class="doc-callout-body">

You will want to store these as environment variables.

</div></div>


**Step 2**

Fork one of the following embedded replica project from GitHub

<div class="doc-cards">
<a class="doc-card" href="https://github.com/tursodatabase/embedded-replicas-with-js" target="_blank" rel="noopener noreferrer"><div class="doc-card-title"><span>My Expenses Tracker - (Elysia + Bun)</span><span class="doc-card-arrow" aria-hidden="true">↗</span></div><p class="doc-card-desc">See the full source code</p></a>
<a class="doc-card" href="https://github.com/tursodatabase/embedded-replicas-with-rust" target="_blank" rel="noopener noreferrer"><div class="doc-card-title"><span>Web Traffic API - (Rust)</span><span class="doc-card-arrow" aria-hidden="true">↗</span></div><p class="doc-card-desc">See the full source code</p></a>
</div>


<div class="doc-callout doc-callout-info"><div class="doc-callout-title">NOTE</div><div class="doc-callout-body">

Or, you can:

> [card] [Deploy to Koyeb with a single-click](https://app.koyeb.com/deploy?name=er-with-js&type=git&repository=tursodatabase/embedded-replicas-with-js&branch=main&env\[PORT]=8000&env\[TURSO_DATABASE_URL]=REPLACE_ME&env\[TURSO_AUTH_TOKEN]=REPLACE_ME&env\[LOCAL_DB]=file:expenses.db)

</div></div>


**3. Add a new Koyeb app**

1. Create a new app in the Koyeb control panel.

2. Select GitHub as the deployment option.

3. Import the GitHub project to Koyeb.

**4. Fill in the environment variables on Koyeb's deploy page**

![Koyeb deploy page - environment variables](/images/turso-docs/platforms/koyeb-env-variables.png)

**5. Deploy**

Click the **Deploy** button at the bottom to deploy your web service.
