---
title: "Deploy Vaultwarden + PostgreSQL – Self-Hosted Password Manager"
description: "Vaultwarden with PostgreSQL and persistent storage on Railway."
category: "Authentication"
url: https://railway.com/deploy/vaultwarden-postgresql-self-hosted-passw
---

# Deploy Vaultwarden + PostgreSQL – Self-Hosted Password Manager

Vaultwarden with PostgreSQL and persistent storage on Railway.

**[Deploy Vaultwarden + PostgreSQL – Self-Hosted Password Manager on Railway](https://railway.com/template/vaultwarden-postgresql-self-hosted-passw)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/vaultwarden-postgresql-self-hosted-passw/manifest.json

- **Creator:** Aman
- **Category:** Authentication
- **Total deploys:** 1

## Template content

### Vaultwarden https://devicons.railway.app/vault

- **Source:** https://github.com/BigDaddyAman/vaultwarden-railway
- **Public domain:** Yes

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

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

## Documentation

# Deploy and Host Vaultwarden (Bitwarden-Compatible) on Railway

Vaultwarden is a lightweight, self-hosted password manager server compatible with Bitwarden clients. It allows you to securely store and synchronize passwords, passkeys, secure notes, and other sensitive information across supported devices. By hosting Vaultwarden on Railway, you can run your own password management service with PostgreSQL and persistent storage without managing your own physical server.

## About Hosting Vaultwarden

Hosting Vaultwarden requires an application server, a database, and persistent storage for its data and configuration. This Railway template simplifies deployment by providing a Vaultwarden service connected to a PostgreSQL database and a persistent Railway Volume.

The deployment uses the official Vaultwarden Docker image, with environment variables for application configuration, database connectivity, and public URL settings. Once deployed, you can access your instance through a Railway-generated domain or configure your own custom domain.

For security, configure HTTPS, keep your admin token private, and disable public registrations after creating your initial account. Regular backups of both PostgreSQL and the Vaultwarden data directory are strongly recommended.

## Common Use Cases

- **Personal Password Management:** Host your own password manager and synchronize credentials across your devices.
- **Family Password Sharing:** Provide a private password management service for family members.
- **Small Team Password Management:** Run a self-hosted password management service for a small team or organization.

## Dependencies for Vaultwarden Hosting

- **PostgreSQL:** Stores Vaultwarden database information.
- **Railway Volume:** Provides persistent storage for Vaultwarden files and configuration, mounted at `/data`.
- **Vaultwarden Docker Image:** Runs the Vaultwarden application server.

### Implementation Details

This template provisions the following infrastructure:

- **Vaultwarden:** Application service using `vaultwarden/server:latest`.
- **PostgreSQL:** Database service connected through Railway's private networking.
- **Persistent Storage:** Railway Volume mounted at `/data`.

**Important configuration:**

- `DATABASE_URL` connects Vaultwarden to the Railway PostgreSQL service.
- `DOMAIN` uses your Railway public domain by default.
- `ADMIN_TOKEN` is optional. Use an Argon2 PHC hash if you enable the admin panel.
- `SIGNUPS_ALLOWED` can be temporarily set to `true` for initial account registration. Set it to `false` after creating your account.
- `DATA_FOLDER` must remain `/data` to match the Railway Volume mount.

**Backups:** Railway persistent storage is not a backup solution. Back up both the PostgreSQL database and the `/data` directory regularly.

**Note:** Vaultwarden is an unofficial, community-developed Bitwarden-compatible server. It is not affiliated with or officially supported by Bitwarden, Inc.

## Why Deploy Vaultwarden 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 Vaultwarden 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/vaultwarden-postgresql-self-hosted-passw
