---
title: "Deploy slashdocs + Google OAuth"
description: "Deploy and host slashdocs from Razorpay + Google OAuth"
category: "Blogs"
url: https://railway.com/deploy/slashdocs-google-oauth
---

# Deploy slashdocs + Google OAuth

Deploy and host slashdocs from Razorpay + Google OAuth

**[Deploy slashdocs + Google OAuth on Railway](https://railway.com/template/slashdocs-google-oauth)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/slashdocs-google-oauth/manifest.json

- **Creator:** Yeswanth 's Projects
- **Category:** Blogs
- **Total deploys:** 2

## Template content

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

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

### slashdocs-render https://devicons.railway.app/  https://raw.githubusercontent.com/razorpay/slashdocs/master/frontend/public/favicon.svg

- **Image:** razorpay/slashdocs:0.3
- **Health check:** /readyz
- **Public domain:** Yes

### slashdocs https://devicons.railway.app/  https://raw.githubusercontent.com/razorpay/slashdocs/master/frontend/public/favicon.svg

- **Image:** razorpay/slashdocs:0.3
- **Health check:** /readyz
- **Public domain:** Yes

## Buckets

- **slashdocs-docs**

## Documentation

# Deploy and Host slashdocs + Google OAuth on Railway

slashdocs is a self-hosted platform for publishing, versioning and reviewing HTML documents. Engineers and AI agents publish reports, specs and RCAs from a CLI, and reviewers comment inline in the browser. This template comes with Google OAuth sign-in already set up, so your team logs in with their Google accounts.

## About Hosting slashdocs + Google OAuth

This template deploys four resources, already wired together. **slashdocs** runs the web app, API, MCP endpoint and CLI downloads. **slashdocs-render** serves uploaded HTML on a separate domain, so documents run in a sandbox away from your login session. **Postgres** stores metadata, comments and sessions, and a **storage bucket** holds every document version. Database URLs, bucket credentials, both public origins and the session secret are configured for you. You only provide a Google OAuth client ID and secret. After deploying, add your app's callback URL to the Google OAuth client so sign-in works.

## Common Use Cases

- Publishing and reviewing engineering documents (RCAs, specs, design docs, reports) with inline comments and version history
- Giving AI agents a place to publish long-form output through the CLI or MCP, for people to review
- Hosting interactive HTML documents, dashboards and trackers behind Google sign-in for your team or organization

## Dependencies for slashdocs + Google OAuth Hosting

- A Google Cloud project with an OAuth 2.0 client of type Web application (free)
- PostgreSQL and S3-compatible object storage (both included in this template)

### Implementation Details

**1. Create Google OAuth credentials (before deploying)**

1. In [Google Cloud Console](https://console.cloud.google.com/), create or select a project.
2. Go to **APIs &amp; Services → OAuth consent screen**. Choose **Internal** to allow only your Google Workspace organization, or **External** to allow any Google account. An External app in *Testing* mode only admits the test users you list.
3. Go to **APIs &amp; Services → Credentials → Create credentials → OAuth client ID** and choose application type **Web application**.
4. Copy the **Client ID** and **Client secret** into the template's `GOOGLE_OAUTH_CLIENT_ID` and `GOOGLE_OAUTH_CLIENT_SECRET` fields.

**2. Add the redirect URI (after deploying)**

Copy the public domain of the `slashdocs` service (not `slashdocs-render`) and add this to the OAuth client's **Authorized redirect URIs**:

```text
https:///v1/auth/google/callback
```

**3. Install the CLI and publish**

```bash
curl -fsSL https:///install.sh | sh
slashdocs auth login https://
slashdocs docs create report.html --title "Report"
```

**Restricting sign-in (optional)**

Set these on the `slashdocs` service and redeploy:
- `ALLOWED_OAUTH_DOMAINS=example.com` allows only those email domains.
- `SLASHDOCS_DEPLOYMENT=org` and `SLASHDOCS_ORG_DOMAINS=example.com` make it a company-only deployment.

**Health check:** `https:///readyz` should return `{"status":"ok","checks":{"blob":"ok","postgres":"ok"}}`.

## Why Deploy slashdocs + Google OAuth 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 slashdocs + Google OAuth 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

- [Pixelfed](https://railway.com/deploy/OZSdEw) — Explore + Share beautiful photos and videos on the Fediverse
- [Hexo](https://railway.com/deploy/hexo) — Hexo — fast static blog framework with admin editor and S3 media storage
- [Bluesky PDS (Atproto Spaces Alpha)](https://railway.com/deploy/bluesky-pds-atproto-spaces-alpha) — "The Atproto Spaces Alpha" version of Bluesky PDS.

Open this page in a browser: https://railway.com/deploy/slashdocs-google-oauth
