Deploy Pocket ID
Self-hosted OIDC provider with passkey login, PostgreSQL, and S3 bucket
Just deployed
/app/data
Just deployed
/var/lib/postgresql/data
bucket
Bucket
Just deployed
Deploy and Host Pocket ID on Railway
Pocket ID is a simple, self-hosted OpenID Connect (OIDC) provider that lets you sign in to all your apps with passkeys instead of passwords. It gives you a central, secure single sign-on (SSO) layer for your self-hosted services, with a clean admin UI, user groups, and per-client access control.
About Hosting Pocket ID
Hosting Pocket ID means running its Go backend and web UI as a single service, backed by a database for users, OIDC clients, and passkey credentials, and a storage backend for uploaded files such as logos and profile pictures. This template deploys Pocket ID with PostgreSQL for the database, connected over Railway's private network, and a Railway S3-compatible Bucket for file storage. That keeps the Pocket ID service stateless, so you can redeploy or scale it without losing data. Once deployed, set your public domain as the app URL and create your first admin account through the setup page.
Common Use Cases
- Single sign-on (SSO) for self-hosted apps such as Grafana, Portainer, Immich, Nextcloud, or Gitea
- Passwordless, passkey-based authentication for internal tools and team dashboards
- A central OIDC identity provider for your own web apps and side projects, with user and group-based access control
Dependencies for Pocket ID Hosting
- PostgreSQL (database, connected via Railway private networking)
- Railway Bucket (S3-compatible object storage for files)
Implementation Details
Pocket ID is configured through environment variables. The key ones in this template:
APP_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}
TRUST_PROXY=true
ENCRYPTION_KEY=
DB_PROVIDER=postgres
DB_CONNECTION_STRING=${{Postgres.DATABASE_PRIVATE_URL}}
FILE_BACKEND=s3
S3_BUCKET=
S3_REGION=
S3_ENDPOINT=
S3_ACCESS_KEY_ID=
S3_SECRET_ACCESS_KEY=
Keep ENCRYPTION_KEY safe and unchanged after the first deploy, since it is used to encrypt sensitive data stored in the database.
Why Deploy Pocket ID 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 Pocket ID 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
ENCRYPTION_KEY
Encrypts sensitive data such as the token signing keys, at least 16 bytes. See Encryption Keys
bucket
Bucket

