---
title: Deploying LobeHub Database on Zeabur
description: >-
  Learn how to deploy LobeHub on Zeabur with ease. Follow the provided steps to
  set up your chat application seamlessly.
tags:
  - Deploy LobeHub
  - Zeabur Deployment
  - OpenAI API Key
  - Custom Domain Binding
---

# Deploying LobeHub Database on Zeabur

<Callout type="info">
  This article assumes that you are familiar with the basic principles and processes of deploying
  the LobeHub server database version, so it only includes content related to core environment
  variable configuration. If you are not familiar with the deployment principles of the LobeHub
  server database version, please refer to [Deploying Server
  Database](/docs/self-hosting/server-database) first.
</Callout>

The template on Zeabur includes 4 services:

- Logto for authrization.
- PostgreSQL with Vector plugin for data storage and indexing.
- MinIO for image storage.
- LobeHub database version.

## Deploying on Zeabur

Here is the process for deploying the LobeHub server database version on Zeabur:

<Steps>
  ### Go to the template page on Zeabur

  Go to the [LobeHub Database template page](https://zeabur.com/templates/RRSPSD) on Zeabur and click on the "Deploy" button.

  ### Fill in the required environment variables

  After you click on the "Deploy" button, you will see a modal pop-up where you can fill in the required environment variables.

  Here are the environment variables you need to fill in:

  - OpenAI API key: Your OpenAI API key to get responses from OpenAI.

  - LobeHub Domain: A free subdomain with `.zeabur.app` suffix.

  - MinIO Public Domain: A free subdomain with `.zeabur.app` suffix for yout MinIO web port to enable public access for the uploaded files.

  - Logto Console Domain: A free subdomain with `.zeabur.app` suffix for your Logto console.

  - Logto API Domain: A free subdomain with `.zeabur.app` suffix for your Logto api.

  ### Select a region and deploy

  After you fill all the required environment variables, select a region where you want to deploy your LobeHub Database and click on the "Deploy" button.

  You will see another modal pop-up where you can see the deployment progress.

  ### Configure Logto

  After the deployment is done, you need to configure your Logto service to enable authrization.

  Access your Logto console with the console domain you just binded, and then create a `Next.js 14(App router)` application to get the client ID and client secret, and fill in the cors and callback URLs. You can check [this document](../advanced/auth.mdx) for a more detailed guide.

  Fill in those variables into your LobeHub service on Zeabur, here is a more detailed guide for [editing environment variables on Zeabur](https://zeabur.com/docs/deploy/variables).

  For detailed configuration of Logto, refer to [this document](/docs/self-hosting/auth/providers/logto).

  ### Access your LobeHub Instance

  Press on the `LobeHub-Database` and you can see the public domain you just created, click on it to access your LobeHub Database.

  You can also bind a custom domain for your services if you want, here is a guide on how to [bind a custom domain on Zeabur](https://zeabur.com/docs/deploy/domain-binding).
</Steps>
