Khaled Ezzat

Mobile Developer

Software Engineer

Project Manager

Blog Post

🛡️ How I Self-Hosted Vaultwarden with Coolify: A DevOps Journey

## 🛡️ How I Self-Hosted Vaultwarden with Coolify: A DevOps Journey

**Meta Description:**
Discover how to self-host Vaultwarden using Coolify in this step-by-step guide. Learn from my personal experience to set up a secure, self-hosted password manager.

## 🧭 Why I Chose Vaultwarden + Coolify

Managing passwords securely is crucial, and I wanted a self-hosted solution that didn’t compromise on features. Vaultwarden, a lightweight Bitwarden alternative written in Rust, fit the bill perfectly. To simplify deployment and management, I turned to Coolify, an open-source PaaS that streamlines self-hosting applications.

## 🛠️ Prerequisites

Before diving in, ensure you have:

– A server (VPS or local) with at least 2 CPUs and 2GB RAM.
– A domain name for HTTPS setup.
– Docker and Docker Compose installed.
– Basic knowledge of terminal commands.

## 🚀 Step-by-Step Installation Guide

### 1. **Install Coolify**

SSH into your server and run:

“`bash
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | sudo bash
“`

This script installs Coolify and its dependencies. Once done, access the Coolify dashboard at `http://your-server-ip:8000` and create your admin account.

### 2. **Set Up Vaultwarden in Coolify**

– **Add a New Application:**
– In the Coolify dashboard, click on “Add New Application.”
– Choose “Docker Compose” as the deployment method.

– **Configure the Repository:**
– If you have a Git repository with your Vaultwarden setup, link it. Otherwise, you can create a new one or use a public template.

– **Define Environment Variables:**
– Set necessary environment variables such as `DOMAIN`, `ADMIN_TOKEN`, etc.

– **Deploy the Application:**
– Click on “Deploy” and let Coolify handle the rest.

### 3. **Configure Domain and SSL**

– **DNS Settings:**
– Point your domain’s A record to your server’s IP address.

– **Enable HTTPS:**
– In Coolify, navigate to your application’s settings and enable SSL. Coolify will automatically obtain and configure Let’s Encrypt certificates.

## 🔐 Security and Optimization Tips

– **Use Strong Admin Tokens:**
– Ensure that your `ADMIN_TOKEN` is a strong, unique string.

– **Regular Backups:**
– Set up automated backups within Coolify to prevent data loss.

– **Firewall Configuration:**
– Only open necessary ports (e.g., 80 and 443) to the public.

– **Monitor Logs:**
– Regularly check application logs for any suspicious activity.

## 💭 Personal Reflections

Setting up Vaultwarden with Coolify was a rewarding experience. The combination offers a balance between control and convenience, allowing me to manage my passwords securely without relying on third-party services. Coolify’s intuitive interface made the deployment process straightforward, even for complex applications.

> 🧠 Ready to start your self-hosted setup?
>
> I personally use [this server provider](https://www.kqzyfj.com/click-101302612-15022370) to host my stack — fast, affordable, and reliable for self-hosting projects.
> 👉 If you’d like to support this blog, feel free to sign up through [this affiliate link](https://www.kqzyfj.com/click-101302612-15022370) — it helps me keep the lights on!

## 📚 Resources

– [Coolify Documentation](https://coolify.io/docs/get-started/introduction)
– [Vaultwarden GitHub Repository](https://github.com/dani-garcia/vaultwarden)
– [Coolify Installation Guide](https://coolify.io/docs/get-started/installation)

Tags: