---
title: "Deploy Better Auth"
description: "A ready to use auth server! Secure by default and extremely configurable."
category: "Authentication"
url: https://railway.com/deploy/VOQsdL
---

# Deploy Better Auth

A ready to use auth server! Secure by default and extremely configurable.

**[Deploy Better Auth on Railway](https://railway.com/template/VOQsdL)**

- **Creator:** Medim's Projects
- **Category:** Authentication
- **Total deploys:** 84

## Template content

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

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

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### Better-Auth Server https://avatars.githubusercontent.com/u/163827765?&v=4

- **Source:** https://github.com/kadumedim/better-auth-starter
- **Health check:** /health
- **Public domain:** Yes

## Documentation

## Better Auth Server Template

A simple but production-ready authentication server that gives you complete control over your user data. This template provides email/password authentication with Redis session storage and a clean API, all powered by Hono.js and Bun.
For complete documentation, visit [Better Auth Docs](https://www.better-auth.com).

## What's Included
- Email/password authentication (login, registration, logout)
- Session management with Redis
- OpenAPI documentation out of the box
- Health check endpoint
- Single binary deployment

## Getting Started
After deployment, your auth server will be accessible at your Railway-provided URL. Use the following endpoints:
- `GET /health` - Check the health of the server
- `GET /api/auth/reference` - Scalar docs for all of the OpenAPI endpoints
- `GET /api/auth/sign-out` - Logout a user
- `POST /api/auth/sign-up/email` - Register a new user
```
{
  "name": "",
  "email": "",
  "password": "",
  "callbackURL": ""
}
```
- `POST /api/auth/sign-in/email` - Login a user
```
{
  "email": "",
  "password": "",
  "callbackURL": "",
  "rememberMe": ""
}
```

Connect your frontend using the Better Auth client library and point it to your new auth server or use your own http client.

## Similar templates

- [Keycloak](https://railway.com/deploy/mSwigX) — Keycloak template with keywind theme + apple and 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/VOQsdL
