Deploy Vaultwarden + PostgreSQL – Self-Hosted Password Manager
Vaultwarden with PostgreSQL and persistent storage on Railway.
Vaultwarden
Just deployed
/data
Just deployed
/var/lib/postgresql/data
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_URLconnects Vaultwarden to the Railway PostgreSQL service.DOMAINuses your Railway public domain by default.ADMIN_TOKENis optional. Use an Argon2 PHC hash if you enable the admin panel.SIGNUPS_ALLOWEDcan be temporarily set totruefor initial account registration. Set it tofalseafter creating your account.DATA_FOLDERmust remain/datato 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.
Template Content
Vaultwarden
BigDaddyAman/vaultwarden-railway
