Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

std2main/bitwardenrs_heroku

Repository files navigation

Run bitwarden_rs on heroku

Deploy

Based on official bitwarden_rs docker image, added customized scripts to setup in heroku enviroment.

Goal

  • Deploy a reliable bitwarden for free as easy as possible.
    • Deploying: Almost no command line.
    • Maintainance: Almost zero.
    • As more functions as budget support
      1. Essentials and backups.
      2. TODO: Realtime syncing cross multiple devices.
      3. TODO: Attachments.
      4. TODO: Icons.

Why Heroku

  • Bitwarden_rs is a lightweight service that able to run on heroku's free dyno ( < 512MB ram).
  • Free quota (average 18 horus/day) lasts for one month when notification requests are blocked.
  • Verified user have extensible free addons to make life easy, including database, logging, backup, etc.

Features

Addons

Limitation

TODO

  • Auto Update
    • Github Action + Heroku, create a branch 'auto-update' to be used by heroku, this branch will periodically commit then triggers app rebuid in heroku to catch any updates of bitwarden_rs
  • Unverified heroku user solution
    • Self owned DATABASE.
    • Persistent local storage tricks.

FAQ

  • Admin panel
    • Set ENABLE_ADMIN=true in heroku enviroment.
    • Use GEN_ADMIN_TOKEN as ADMIN_TOKEN. This is auto generated secret when app initialized.
  • Configuration
    • All enviroment of heroku will be treated as enviroment of bitwarden_rs.
  • Forcely loggout after a while
    • Run heroku_set_rsa.sh to enable persistent rsa key.
  • App costs 24 dynos/day, aka it didn't sleep when idle.
    • Mostly caused by requests of '/notifications' and '/icons', see more
    • Notifications are triggered every 4 minutes by chrome extension or desktop app.
    • Icons are triggered if icon server url is not set to others.
    • My method is to block them by Cloudflare firewall.