---
title: "Deploy Pocket ID"
description: "Self-hosted OIDC provider with passkey login, PostgreSQL, and S3 bucket"
category: "Authentication"
url: https://railway.com/deploy/pocket-id-5
---

# Deploy Pocket ID

Self-hosted OIDC provider with passkey login, PostgreSQL, and S3 bucket

**[Deploy Pocket ID on Railway](https://railway.com/template/pocket-id-5)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/pocket-id-5/manifest.json

- **Creator:** Taf
- **Category:** Authentication

## Template content

### pocket https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/pocket-id.svg

- **Image:** ghcr.io/pocket-id/pocket-id
- **Public domain:** Yes

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

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

## Buckets

- **bucket**

## Documentation

# 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:

```env
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.


## 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/pocket-id-5
