---
title: "Deploy Logto"
description: "Modern open-source auth with multi-tenancy, SSO, and RBAC"
category: "Authentication"
url: https://railway.com/deploy/logto
---

# Deploy Logto

Modern open-source auth with multi-tenancy, SSO, and RBAC

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

- **Creator:** Rees
- **Category:** Authentication
- **Total deploys:** 60

## Template content

### Logto Auth https://avatars.githubusercontent.com/u/84981374

- **Image:** svhd/logto:latest
- **Start command:** `sh -c "npm run cli db seed -- --swe; npm run alteration deploy latest; npm start"`
- **Public domain:** Yes

### Logto Admin Console https://avatars.githubusercontent.com/u/84981374

- **Image:** svhd/logto:latest
- **Start command:** `sh -c "npm run cli db seed -- --swe; npm run alteration deploy latest; npm start"`
- **Public domain:** Yes

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

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

- **Image:** postgres:17-alpine

## Documentation

# Deploy and Host Logto on Railway

**Logto** is the modern, open-source auth infrastructure for SaaS and AI apps. It takes the pain out of OIDC and OAuth 2.1 and makes it easy to build secure, production-ready auth with multi-tenancy, enterprise SSO, and RBAC.

## About Hosting Logto

### Deployment Steps

**Logto Auth**

1.  Click on the Logto Auth deployment, then click on the pre-generated URL.
2. If it takes you to a “404 Not Found” page at `/unknown-session`, you’re all set here!

If you see a Railway error page instead, it’s likely Railway hasn’t automatically added the port to your domain. Go to Settings → Networking, click the Edit button next to the domain and click “edit port”, then select or enter port `3001`.

If you wish to use a custom domain, you simply need to click on the deployment, go to Settings → Networking and click on the **\+ Custom Domain** button. Enter your domain and select or enter port `3001`.

**Logto Admin Console**

1.  Click on the Logto Admin Console deployment, then click on the pre-generated URL. You should see a page titled “Welcome to Admin Console”.
2.  Click on **Create account** and complete the form to create your account.
3.  You’re all set!

If you see a Railway error page instead, it’s likely Railway hasn’t automatically added the port to your domain. Go to Settings → Networking, click the Edit button next to the domain and click “edit port”, then select or enter port `3002`.

If you wish to use a custom domain, you simply need to click on the deployment, go to Settings → Networking and click on the **\+ Custom Domain** button. Enter your domain and select or enter port `3002`.

**Disable Redis (Optional)**

This deployment comes with Redis included, but it’s entirely optional. If you don’t want Redis, simply:

1.  Right-click → Delete the Redis service
2.  Right-click → Delete the detached volume (it’ll be floating somewhere by itself)
3.  Click on the Logto Auth deployment → Variables
4.  Find and delete the `REDIS_URL` variable
5.  Click on the Logto Admin Console deployment → Variables
6.  Find and delete the `REDIS_URL` variable
7.  Deploy your changes

## Dependencies for Logto Hosting

### Deployment Dependencies

| Service | Version | Purpose | Source Image |
| --- | --- | --- | --- |
| Logto Core | latest | Main authentication service | [svhd/logto](https://hub.docker.com/r/svhd/logto) |
| Postgres | 17-alpine | Database for user data and configuration | [postgres](https://hub.docker.com/_/postgres) |
| Redis (optional) | 7.2.5 | Cache for well-known data | [bitnami/redis](https://hub.docker.com/r/bitnami/redis) |

## Resource Requirements

- **Memory**: 1GB+
- **CPU**: 1+
- **Storage**: Database grows with usage

## Troubleshooting

For common issues and community support, visit the [Railway Community Forum](https://station.railway.com/discuss/thread/logto-b31685e2).

## Template Changelog

### 16 July, 2025

- Initial template release

---

## Common Use Cases

- **SaaS Authentication**: Secure user authentication for multi-tenant SaaS applications with organization management
- **AI Agent Authentication**: Auth infrastructure for Model Context Protocol and agent-based AI architectures
- **Enterprise SSO**: Single sign-on integration with existing enterprise identity providers
- **Mobile App Auth**: Secure authentication flows for mobile applications with social login support
- **API Authentication**: Machine-to-machine authentication for APIs and microservices

## 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) — Keycloak template with keywind theme + apple and 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
