Service Marketplace
Deploy Logto

Deploy Logto Service

Logto (opens in a new tab) is an open source identity verification service that helps you quickly implement identity verification in your applications, and is also the most famous open source alternative to Auth0 (opens in a new tab).

This article will teach you how to deploy Logto service on Zeabur through the service market, and bind your own domain name so that your other websites can use your deployed Logto service to verify identity.

Step 1: Deploy from template

Method 1: Deploy with a new project

First of all, visit the template page (opens in a new tab) for Logto.

You can see that the template is already configured with PostgreSQL service, so you don't need to do anything.

Template Page

Click on the Deploy button, and then select a region to deploy your services.

Select Region

After the selection, you will be automatically redirected to the project page where you can see the deployment progress.

Deployment

Wait a few more seconds, and your Logto service will be deployed successfully and start running.

Method 2: Deploy to an existing project

If you already have a project and you want to add an auth system for the project, you can deploy the Logto service to the existing project with one click as well.

Navigate to the project page, click on the Deploy New Service button, and then select the Logto from the template category.

Template in Project

After selecting Logto, the services in the template(Logto and PostgreSQL) will be automatically deployed to your project.

Step 2: Bind domain name for each port

In Zeabur dashboard, you can bind domain name for each port of Logto service in the Networking tab.

There are two ports for Logto service, one is for the web interface, and the other is for the admin console interface. You can bind a domain name for each port in the console.

Click on Generate Domain or Custom Domain, you will see an input box and a port selector, you can bind a domain name for each port here.

Logto domain for web

Logto domain for console

You can refer to Domain Binding for more information on how to bind a domain name for your service.

Step 3: Configure environment variables

After binding the domain name, we need to let the Logto service know about the domain name we bound.

Logto service requires 2 environment variables:

  • ENDPOINT: The domain name you bound for the web interface, for example https://logto-web.zeabur.app.
  • ADMIN_ENDPOINT: The domain name you bound for the admin console interface, for example https://logto-console.zeabur.app.

Open the Variables tab in the service page, click the Edit Raw Variables button, and you can fill the following variables in the input box.

{
  "ENDPOINT": "https://logto-web.zeabur.app", // Your domain name for web interface
  "ADMIN_ENDPOINT": "https://logto-console.zeabur.app" // Your domain name for admin console interface
}

After adding the variable, press the Restart button and wait for about 30 seconds, then the service will restart and take effect.

Step 4: Log in and Configure Logto

Now everything is ready for your Logto service, you may like to configure it. You can open the domain name you bound for the admin console interface, for example https://logto-console.zeabur.app, and you will see the login page of the Logto service.

Logto admin

And then you can create an account to get started with the Logto service, just follow the instructions given by the Logto service.