> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/supertokens/supertokens-core/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get SuperTokens Core running in 5 minutes

# Quickstart

Get SuperTokens Core up and running on your local machine in just a few minutes.

<Steps>
  <Step title="Run with Docker">
    The fastest way to start SuperTokens Core is with Docker:

    ```bash theme={null}
    docker run -p 3567:3567 -d supertokens/supertokens-postgresql
    ```

    This starts SuperTokens Core with an in-memory PostgreSQL database on port 3567.

    <Note>
      For production, you should use an external database. See [Database setup](/deployment/database-setup) for details.
    </Note>
  </Step>

  <Step title="Verify it's running">
    Test that SuperTokens Core is responding by checking the health endpoint:

    ```bash theme={null}
    curl http://localhost:3567/hello
    ```

    You should see:

    ```json theme={null}
    {
      "status": "OK"
    }
    ```
  </Step>

  <Step title="Create your first session">
    Let's create a test session to verify the authentication flow works:

    ```bash theme={null}
    curl -X POST http://localhost:3567/recipe/session \
      -H "Content-Type: application/json" \
      -d '{
        "userId": "test-user-123",
        "userDataInJWT": {},
        "userDataInDatabase": {},
        "enableAntiCsrf": false
      }'
    ```

    You should receive a response with session tokens:

    ```json theme={null}
    {
      "status": "OK",
      "session": {
        "handle": "...",
        "userId": "test-user-123",
        "userDataInJWT": {}
      },
      "accessToken": {
        "token": "...",
        "expiry": 1234567890,
        "createdTime": 1234567890
      },
      "refreshToken": {
        "token": "...",
        "expiry": 1234567890,
        "createdTime": 1234567890
      },
      "antiCsrfToken": null
    }
    ```
  </Step>
</Steps>

## What's next?

Now that SuperTokens Core is running, you can:

<CardGroup cols={2}>
  <Card title="Explore authentication methods" icon="key" href="/auth/email-password">
    Learn about email/password, passwordless, social login, and more
  </Card>

  <Card title="Understand sessions" icon="shield" href="/concepts/sessions">
    Deep dive into how session management works
  </Card>

  <Card title="Configure SuperTokens" icon="gear" href="/configuration">
    Customize settings for your use case
  </Card>

  <Card title="Browse API reference" icon="code" href="/api/core/overview">
    Explore all available endpoints
  </Card>
</CardGroup>

## Running with different databases

### PostgreSQL

```bash theme={null}
docker run \
  -p 3567:3567 \
  -e POSTGRESQL_CONNECTION_URI="postgresql://username:password@host:5432/database" \
  -d supertokens/supertokens-postgresql
```

### MySQL

```bash theme={null}
docker run \
  -p 3567:3567 \
  -e MYSQL_CONNECTION_URI="mysql://username:password@host:3306/database" \
  -d supertokens/supertokens-mysql
```

### MongoDB

```bash theme={null}
docker run \
  -p 3567:3567 \
  -e MONGODB_CONNECTION_URI="mongodb://username:password@host:27017/database" \
  -d supertokens/supertokens-mongodb
```

## Using with Backend SDKs

SuperTokens Core is designed to work with Backend SDKs. Here's a quick example with Node.js:

### Install the Backend SDK

<CodeGroup>
  ```bash npm theme={null}
  npm install supertokens-node
  ```

  ```bash yarn theme={null}
  yarn add supertokens-node
  ```

  ```bash pnpm theme={null}
  pnpm add supertokens-node
  ```
</CodeGroup>

### Initialize the SDK

```typescript theme={null}
import supertokens from "supertokens-node";
import Session from "supertokens-node/recipe/session";
import EmailPassword from "supertokens-node/recipe/emailpassword";

supertokens.init({
  framework: "express",
  supertokens: {
    // This is the connection URI for SuperTokens Core
    connectionURI: "http://localhost:3567",
    apiKey: "optional-api-key"
  },
  appInfo: {
    appName: "My App",
    apiDomain: "http://localhost:3001",
    websiteDomain: "http://localhost:3000"
  },
  recipeList: [
    EmailPassword.init(),
    Session.init()
  ]
});
```

<Tip>
  For complete integration examples with different Backend SDKs (Python, Go, etc.), see the [SuperTokens documentation](https://supertokens.io/docs/guides).
</Tip>

## Production deployment

For production use, you'll want to:

1. **Use an external database**: Don't rely on in-memory storage
2. **Configure API keys**: Secure the connection between your Backend SDK and Core
3. **Set up proper networking**: Keep Core on a private network
4. **Enable monitoring**: Configure logging and health checks

See the [Self-hosting guide](/deployment/self-hosting) for detailed production deployment instructions.

## Troubleshooting

### Port already in use

If port 3567 is already in use, you can change it:

```bash theme={null}
docker run -p 8080:3567 -d supertokens/supertokens-postgresql
```

Then connect to `http://localhost:8080` instead.

### Connection refused

Make sure:

* Docker is running
* The container started successfully: `docker ps`
* Check logs: `docker logs <container-id>`

### Database connection errors

If using an external database, verify:

* The database server is accessible
* Credentials are correct
* The database exists and user has proper permissions

See [Database setup troubleshooting](/deployment/database-setup#troubleshooting) for more help.

## Learn more

<CardGroup cols={2}>
  <Card title="Architecture" icon="diagram-project" href="/architecture">
    Understand how SuperTokens components work together
  </Card>

  <Card title="Docker deployment" icon="docker" href="/deployment/docker">
    Full Docker and docker-compose setup guide
  </Card>

  <Card title="Configuration reference" icon="book" href="/configuration">
    Complete list of all configuration options
  </Card>

  <Card title="Multi-tenancy" icon="sitemap" href="/concepts/multitenancy">
    Set up multi-tenant applications
  </Card>
</CardGroup>
