
Deploy Saas Start Kit
SaaS application using Next.js ,authentication, Stripe ,dashboard
Just deployed
/var/lib/postgresql/data
saas-starter-kit
Just deployed
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
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:
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.
- Add a PostgreSQL database service to your Railway project.
- Link the database to your application service using the Railway reference variable
${{Postgres.DATABASE_URL}}assigned toPOSTGRES_URL. - Run database migrations during initial deployment using
pnpm db:migrateor seed initial data viapnpm 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
- Open the application service in Railway.
- Navigate to Settings → Networking → Public Networking.
- Click Generate Domain to assign a public Railway URL.
- Open the generated domain in your browser.
- 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.
Template Content
saas-starter-kit
iqbalexperience/saas-starter-kitSTRIPE_SECRET_KEY
Stripe API secret key for payment processing.
STRIPE_WEBHOOK_SECRET
Stripe webhook signing secret.