---
title: "Deploy Logto"
description: "Open-source auth: OIDC, OAuth 2.1, SSO, MFA, RBAC and organizations"
category: "Authentication"
url: https://railway.com/deploy/logto-2
---

# Deploy Logto

Open-source auth: OIDC, OAuth 2.1, SSO, MFA, RBAC and organizations

**[Deploy Logto on Railway](https://railway.com/template/logto-2)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/logto-2/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Authentication

## Template content

### Logto Console https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/logto.png

- **Source:** https://github.com/aalfath/logto-railway-template
- **Health check:** /healthz
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### Logto https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/logto.png

- **Source:** https://github.com/aalfath/logto-railway-template
- **Health check:** /oidc/jwks
- **Public domain:** Yes

## Documentation

# Deploy and Host Logto on Railway

Logto is an open-source identity and access platform for apps and APIs. It gives you hosted sign-in pages, OpenID Connect and OAuth 2.1, social and enterprise SSO (SAML, OIDC), multi-factor authentication, role-based access control and organizations for multi-tenant SaaS, all managed from a web admin console.

## About Hosting Logto

Logto is a Node.js server backed by PostgreSQL. It serves two things: the core (the OIDC provider, sign-in pages and Management API, which your apps talk to) and the admin console, each on its own port and public URL. This template runs Logto 1.46.0 from a pinned official image, with Railway Postgres for all data and a small Caddy proxy that gives the admin console its own domain. On every start, Logto seeds an empty database and applies the schema alterations for its version, so first boot and updates need no manual steps. Signing keys and secrets are generated in the database, and the deploy asks for nothing.

## Common Use Cases

* Add sign-in, sign-up and MFA to a web, mobile or single-page app through OIDC, without building authentication yourself
* Single sign-on across your own apps, with social logins and enterprise SAML or OIDC connections
* Multi-tenant SaaS with organizations, roles and permissions, and machine-to-machine access tokens for your APIs

## Dependencies for Logto Hosting

* PostgreSQL (Railway Postgres, included)
* A Caddy reverse proxy for the admin console (included, built from the template repo)

### Deployment Dependencies

* Logto source and releases: https://github.com/logto-io/logto/releases
* Logto self-hosting docs: https://docs.logto.io/logto-oss/get-started-with-oss
* Template repo (Dockerfiles, start script, changelog): https://github.com/aalfath/logto-railway-template

### Implementation Details

* **Logto** builds from the repo's `logto/` folder (`svhd/logto:1.46.0`, pinned by digest) and serves the core on port 3001 at its public domain. `ENDPOINT` and `ADMIN_ENDPOINT` are filled in from the two Railway domains.
* **Logto Console** builds from `console/` and forwards its public domain to Logto's admin port 3002 over the private network.
* **First step after deploying:** open the Logto Console URL and create the first account. It becomes the admin, and the console then only offers sign-in.
* Your apps use the Logto URL as the OIDC issuer (`https://YOUR-LOGTO-DOMAIN/oidc`). If you add a custom domain, change `ENDPOINT` (and `ADMIN_ENDPOINT` for the console) to match.
* Email and SMS sign-in, social logins and file uploads need connectors or storage that you set up in the console after deploying.
* Updates: the template builds from GitHub, so Railway tells you when a new Logto version is merged. Back up Postgres before you apply one.

## Why Deploy Logto on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Logto on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Keycloak](https://railway.com/deploy/mSwigX) — [2026-11-04] Keycloak with keywind theme + Apple & Discord providers
- [lua-protector](https://railway.com/deploy/lua-protector) — Test deployed my project first
- [bknd](https://railway.com/deploy/p4nTYL) — Feature-rich yet lightweight backend

Open this page in a browser: https://railway.com/deploy/logto-2
