# Setup Guide

URL: https://zerodev.ca/docs/kora/setup

> Install Kora, run the setup wizard and get your license server online.



Kora is set up in the browser. You start it once, open the dashboard and a setup wizard asks for everything it needs.

## Before You Start

You need:

* A host that runs **Node.js 20** or newer, or **Bun**.
* An empty **PostgreSQL**, **MySQL** or **MariaDB** database. Kora creates its own tables.
* A Discord application from the [Discord Developer Portal](https://discord.com/developers/applications).
* Your Kora license key from the [Zero Development Discord](https://discord.zerodev.ca).

## Hosting

| Option                        | Best for                                                                                   |
| ----------------------------- | ------------------------------------------------------------------------------------------ |
| Game panel (Pterodactyl)      | The easiest choice. The panel keeps Kora running and gives you a console and file manager. |
| Linux VPS or dedicated server | Full control. Use a process manager such as PM2 or systemd.                                |
| Your own computer             | Testing and development.                                                                   |

[Haven Development](https://havendevelopment.net) hosts Kora on Pterodactyl.

## Install

<Tabs items="[&#x22;Pterodactyl&#x22;, &#x22;Linux&#x22;, &#x22;Windows&#x22;]">
  <Tab value="Pterodactyl">
    1. Create a server with a Node.js 20 or newer egg.
    2. Upload the Kora files.
    3. Set the startup command to `node index.js`.
    4. Start the server.
  </Tab>

  <Tab value="Linux">
    1. Open a terminal in the Kora folder.
    2. Run `npm install`.
    3. Run `node index.js`.

    To keep Kora running after you close the terminal, use PM2:

    ```bash
    npm install -g pm2
    pm2 start index.js --name Kora
    ```
  </Tab>

  <Tab value="Windows">
    1. Open PowerShell in the Kora folder.
    2. Run `npm install`.
    3. Run `node index.js`.
  </Tab>
</Tabs>

On the first start Kora creates `config.json` and serves the dashboard on port `3000`. The console shows:

```text
Kora is not configured yet. Open the dashboard to run the setup wizard.
```

Kora installs the driver for your database the first time it connects, so there is nothing else to install.

## Discord Application

Everyone signs in to the dashboard with Discord.

1. Create an application in the [Discord Developer Portal](https://discord.com/developers/applications).
2. Go to **OAuth2** and add your dashboard address followed by `/api/auth/callback/discord` under **Redirects**:
   * On your own computer: `http://localhost:3000/api/auth/callback/discord`
   * On a domain: `https://kora.example.com/api/auth/callback/discord`
3. Copy the **Client ID** and **Client Secret** for the wizard.

## Setup Wizard

Open `http://localhost:3000`, or your server's address on port `3000`.

| Step            | What you enter                                                                                               |
| --------------- | ------------------------------------------------------------------------------------------------------------ |
| Welcome         | The dashboard language.                                                                                      |
| Database        | Type, host, port, user, password and database name. Click **Test Connection**.                               |
| License         | Your license key. Click **Check License**. The Discord account on the license becomes the dashboard owner.   |
| Branding        | Dashboard name, accent colour, **Dashboard URL** and **API URL**. Leave the URLs empty on your own computer. |
| Discord Sign In | Client ID and client secret. The wizard shows the redirect to add. Click **Test Credentials**.               |
| Launch          | Click **Launch Kora**.                                                                                       |

Kora then saves your settings, connects to the database, activates the license, loads its modules and checks for updates. The wizard shows each stage with the live console. When it finishes, click **Go to Sign In**. There is no restart.

## Hosting on a Domain

Point a reverse proxy at each port. Pick yours:

<ReverseProxy sites="[{ domain: &#x22;kora.example.com&#x22;, port: 3000 }, { domain: &#x22;api.kora.example.com&#x22;, port: 3001 }]" />

Set **Dashboard URL** and **API URL** in the wizard, or later under **Settings > Server URLs**. Changing them later asks you to restart Kora.

<Callout type="warn">
  The dashboard URL, the address in your browser and the redirect in the Developer Portal must all match, or sign-in fails.
</Callout>

## Next

* [Dashboard](/docs/kora/dashboard) to create your first product.
* [Validating Keys](/docs/kora/extensions/core/api-reference) to check licenses from your product.
