Deploy Logto
Open-source auth: OIDC, OAuth 2.1, SSO, MFA, RBAC and organizations
Logto Console
Just deployed
Just deployed
/var/lib/postgresql/data
Just deployed
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.ENDPOINTandADMIN_ENDPOINTare 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, changeENDPOINT(andADMIN_ENDPOINTfor 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.
Template Content
Logto Console
aalfath/logto-railway-template
