Managing FastAPI Projects with Poetry: A Step-by-Step Guide

Image
This guide will walk you through how to use Poetry to manage dependencies and structure your project in FastAPI . It includes detailed explanations of Poetry's core concepts and commands to help prevent issues that can arise during team collaboration and deployment. 1. What is Poetry? Poetry is a dependency management and packaging tool for Python. It goes beyond simply installing libraries by allowing you to clearly declare the dependencies your project needs and ensuring that all developers on the project have the same library versions. Clarity in Dependency Management : Explicitly manage your project's basic information and required libraries through the pyproject.toml file. Reproducible Builds : By locking all dependency versions in the poetry.lock file, it fundamentally prevents "it works on my machine" problems. Integrated Development Environment : It automatically creates and manages isolated virtual environments for each project and handles mo...

How to Set Up Vaultwarden (Bitwarden) on Synology NAS (Best Free Alternative to LastPass)

Have you ever felt overwhelmed managing passwords for all your websites? I used to use the same password across multiple sites, which wasn’t secure. To manage them better, I started using LastPass for years. However, in 2019, they changed their pricing policy — now it’s free only for one device for 30 days, and you have to pay to use it across multiple devices.

If you're looking for a powerful and free password manager, Vaultwarden is one of the best alternatives to LastPass.

What is Vaultwarden?

Vaultwarden (formerly known as Bitwarden_RS) is a lightweight, open-source implementation of the Bitwarden server API written in Rust. It is fully compatible with official Bitwarden clients and is ideal for low-resource environments.

Example: On a Synology DS916+, Vaultwarden uses 0% CPU and only 64MB of memory while running.

My Setup

  • NAS Model: Synology DS916+
  • DSM Version: DSM 7.1-42661 Update 1
  • Docker Image: vaultwarden/server

Installation Guide

Step 1. Install Docker on Synology NAS

Open the Package Center on your Synology NAS and install Docker. (Synology doesn’t offer an official Vaultwarden package, so Docker is required.)

Step 2. Download the Vaultwarden Docker Image

  • Launch Docker → Go to the Registry tab
  • Search for: vaultwarden/server
  • Avoid deprecated bitwarden images — only use the latest Vaultwarden image.

Step 3. Launch Vaultwarden Server

1. Go to the Image tab → select vaultwarden/server → click Launch


2. Select “Use the selected network: bridge”

3. Check “Enable auto-restart” so Vaultwarden restarts after NAS reboots

4. Port Settings

  • Set local port to 5151 (You can use other port number)
  • This maps Synology's port 5151 to the container port 80

5. Volume Settings

  • Create a folder named vaultwarden inside the Docker directory (/docker/vaultwarden)
  • Mount this folder as volume storage (/data)


Step 4. Set Up Reverse Proxy for HTTPS

Vaultwarden requires HTTPS for full functionality. If you try to access the web vault via HTTP, you’ll see a warning:

“This browser requires HTTPS to use the web vault...”

To fix this:

1. Go to Control Panel → Login Portal → Advanced → Reverse Proxy

2. Create a rule pointing your HTTPS subdomain (e.g., vaultwarden.yourddns.synology.me) to localhost:5151

  • (8) 5151 is the port number of the docker container

3. Use this secure domain to access Vaultwarden via browsers like Chrome or Edge


Step 5. Create Vaultwarden User Accounts

Once the reverse proxy is set up:

  • Visit your HTTPS domain (e.g., https://vaultwarden.yourddns.synology.me)
  • You’ll be able to access the login page and create user accounts
  • Required: Email address and master password

Step 6. Secure Your Server (Disable Signups)

After creating your accounts, disable new user registration to prevent unauthorized signups.

1. Docker → Container → vaultwarden-server1 → Stop button → Edit


2. Go to Environment tab and add the following values

  • DEBIAN_FRONTEND = noninteractive
    • This setting is commonly used in Docker containers or script-based installations to suppress interactive prompts during package installations or updates. It ensures that processes run without requiring manual input
  • SIGNUPS_ALLOWED = false
    • This hides the "Create Account" option on the login page to prevent others from creating accounts without permission.
  • DOMAIN = https://vaultwarden.yourddns.synology.me
    • This is used to generate links in user notification emails (e.g., password reset, email verification), directing users to your Vaultwarden login or web interface.

3. Save and restart the container


Conclusion

Vaultwarden is an excellent, lightweight, and free alternative to LastPass, especially for those who want more control and privacy. Running it on your Synology NAS using Docker is efficient and secure — even on lower-end hardware.



Comments

Popular posts from this blog

Resolving Key Exchange Failure When Connecting with SecureCRT to OpenSSH

SecureCRT] How to Back Up and Restore SecureCRT Settings on Windows