---
title: "Deploy Saas Start Kit"
description: "SaaS application using Next.js ,authentication, Stripe ,dashboard"
category: "Starters"
url: https://railway.com/deploy/saas-start-kit
---

# Deploy Saas Start Kit

SaaS application using Next.js ,authentication, Stripe ,dashboard

**[Deploy Saas Start Kit on Railway](https://railway.com/template/saas-start-kit)**

- **Creator:** Muhammad Bilal
- **Category:** Starters

## Template content

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

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

### saas-starter-kit

- **Source:** iqbalexperience/saas-starter-kit
- **Public domain:** Yes

## Documentation

# Deploy and Host SaaS Starter Kit on Railway

SaaS Starter Kit is a production-ready Next.js 15 SaaS boilerplate designed for high-performance applications. It features multi-tenant workspaces, role-based access control (RBAC), Stripe subscription billing, developer API key management, security audit logging, and a command palette interface. It is built for developers and teams looking to launch scalable SaaS products quickly.

## About Hosting SaaS Starter Kit

Deploying SaaS Starter Kit on Railway provides a fully managed, containerized environment using standard Docker infrastructure. Railway automatically builds the application directly from the repository's multi-stage Dockerfile and deploys it with automated HTTPS termination, edge routing, and built-in health checking via the `/api/health` endpoint.

Database capabilities are powered by a managed Railway PostgreSQL service, which connects seamlessly to the application using Drizzle ORM. Railway simplifies operational complexity by managing environment variables, reference cross-service URLs, automatic builds, and scale-on-demand resource management without requiring manual server configuration.

## Common Use Cases

* Subscription-based Software as a Service (SaaS) platforms
* Multi-tenant team workspace applications and client portals
* API management dashboards with user developer keys and audit logs

## Dependencies for SaaS Starter Kit Hosting

| Dependency | Type | Purpose |
| --- | --- | --- |
| PostgreSQL | Database | Primary relational database for users, teams, subscriptions, and logs |
| Stripe API | External API | Payment gateway, checkout sessions, and webhook handling |

### Deployment Dependencies

* [GitHub Repository](https://github.com/iqbalexperience/saas-starter-kit)
* [Official Railway Documentation](https://docs.railway.app)

### Implementation Details

#### Docker

The application includes a production-ready `Dockerfile` in the root directory. Railway automatically detects and builds this image without requiring custom build parameters.

#### Public Networking

| Networking Option | Value |
| --- | --- |
| Proxy Type | HTTP Proxy |
| Target Port | 8080 |

#### Environment Variables

| Variable | Required | Description |
| --- | --- | --- |
| `POSTGRES_URL` | Yes | Railway PostgreSQL connection string (`${{Postgres.DATABASE_URL}}`) |
| `AUTH_SECRET` | Yes | Edge-compatible session JWT secret key (random 32-character string) |
| `BASE_URL` | Yes | Base public domain URL (`https://${{RAILWAY_PUBLIC_DOMAIN}}`) |
| `STRIPE_SECRET_KEY` | Yes | Stripe API secret key obtained from the Stripe Dashboard |
| `STRIPE_WEBHOOK_SECRET` | Yes | Stripe webhook signing secret obtained from Stripe Webhooks settings |
| `PORT` | No | Application listening port (defaults to `3000`) |

Example configuration for the Railway Variables Raw Editor:

```env
POSTGRES_URL=${{Postgres.DATABASE_URL}}
AUTH_SECRET=your-random-32-character-secret-key
BASE_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
PORT=8080

```

#### Persistent Storage

Persistent volumes are not required. All user data, workspace details, and session data are stored directly in the PostgreSQL database.

#### Database

A PostgreSQL database service is required.

1. Add a **PostgreSQL** database service to your Railway project.
2. Link the database to your application service using the Railway reference variable `${{Postgres.DATABASE_URL}}` assigned to `POSTGRES_URL`.
3. Run database migrations during initial deployment using `pnpm db:migrate` or seed initial data via `pnpm db:seed`.

#### Build & Start

Railway automatically builds the project using the multi-stage `Dockerfile`.

* **Build Command**: `pnpm db:migrate` (Optional post-build step for database schema application)
* **Start Command**: Managed automatically by the Dockerfile container entrypoint.

#### Accessing the Application

1. Open the application service in Railway.
2. Navigate to **Settings** → **Networking** → **Public Networking**.
3. Click **Generate Domain** to assign a public Railway URL.
4. Open the generated domain in your browser.
5. If seeded using `pnpm db:seed`, log in with default credentials:
* **Email**: `test@test.com`
* **Password**: `admin123`



## Why Deploy SaaS Starter Kit on Railway?

Railway is the best place to deploy SaaS Starter Kit. With instant deployments, infrastructure as code, continuous delivery, and automatic HTTPS, Railway makes it simple to run applications in production without managing servers or cluster configuration.

## Similar templates

- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [caring-vibrancy](https://railway.com/deploy/caring-vibrancy) — Deploy and Host caring-vibrancy with Railway
- [Appsmith](https://railway.com/deploy/appsmith-1) — Low-code platform for internal tools, dashboards, and admin panels.

Open this page in a browser: https://railway.com/deploy/saas-start-kit
