---
title: "Deploy beaverhabits"
description: "Open-source, private, and portable Habit Tracker with charts & streaks."
category: "Analytics"
url: https://railway.com/deploy/beaverhabits
---

# Deploy beaverhabits

Open-source, private, and portable Habit Tracker with charts & streaks.

**[Deploy beaverhabits on Railway](https://railway.com/template/beaverhabits)**

- **Creator:** Tabitha Heath's Projects
- **Category:** Analytics

## Template content

### beaverhabits

- **Image:** daya0576/beaverhabits:latest
- **Public domain:** Yes

## Documentation

## Beaver Habit Tracker
Created by: @daya0576 - Henry Zhu. Thank you!

A self-hosted habit tracking app. Features:
- Easily export &amp; import data via JSON
- See past performance on streaks
- See detailed streak &amp; frequency information
- Leave per-day notes which are intelligently grouped and displayed per-habit
- Unlimited habits
- Private, offline data
- Dark mode
- Ability to Restrict deployment to a single user
- Ability to remove login flow entirely
- Great PWA support for iOS devices

Github Repo:
https://github.com/daya0576/beaverhabits/

Website (Cloud version available for 9.90/lifetime):
https://beaverhabits.com/



# Deploy and Host
Clone the template. Env variables are already configured. Launch, assign a domain, and create a user account.

## About Hosting
?

 ## Why Deploy
? dude who made this template

 ## Common Use Cases
Tracking how many time you cheat on your wife 

 ## Dependencies for
Cheating on your wife

 ### Deployment Dependencies
Wife

<img width="250" src="https://github.com/daya0576/beaverhabits/assets/6239652/0418fa41-8985-46ef-b623-333b62b2f92e">
<img width="250" src="https://github.com/daya0576/beaverhabits/assets/6239652/c0ce98cf-5a44-4bbc-8cd3-c7afb20af671">
<img width="250" src="https://github.com/daya0576/beaverhabits/assets/6239652/516c19ca-9f55-4c21-9e6d-c8f0361a5eb2">


# Getting Started

## Cloud

- Demo: https://beaverhabits.com/demo
- Login: https://beaverhabits.com

## Self-Hosting

### Unraid

Simply search for "Beaver Habit Tracker" in the Community Apps store!

### Ship with Docker

```bash
docker run -d --name beaverhabits \
  -u $(id -u):$(id -g) \
  -e HABITS_STORAGE=USER_DISK \
  -v ./beaver/:/app/.user/ \
  -p 8080:8080 \
  daya0576/beaverhabits:latest
```

Or Docker Compose:
```yaml
services:
  beaverhabits:
    container_name: beaverhabits
    user: 1000:1000 # User permissions of your docker or default user.
    environment:
      # See the note below to find all the environment variables
      - HABITS_STORAGE=USER_DISK # DATABASE stores in a single SQLite database named habits.db. USER_DISK option saves in a local json file.
      - TRUSTED_LOCAL_EMAIL=your@email.com # Skip authentication
      - INDEX_HABIT_DATE_COLUMNS=5 # Customize the date columns for the index page.
      - ENABLE_IOS_STANDALONE=true
    volumes:
      - ./beaver/:/app/.user/ # Change directory to match your docker file scheme.
    ports:
      - 8080:8080
    restart: unless-stopped
    image: daya0576/beaverhabits:latest
```

P.S. The container starts as nobody to increase the security and make it OpenShift compatible.
To avoid [permission issues](https://github.com/daya0576/beaverhabits/discussions/31), ensure that the UID owning the host folder aligns with the UID of the user inside the container.

## Options

| Name | Description |
|:--|:--|
| **HABITS_STORAGE**(str) | The `DATABASE` option stores everything in a single SQLite database file named habits.db. On the other hand, the `USER_DISK` option saves habits and records in a local json file. |
| **FIRST_DAY_OF_WEEK**(int) | By default, the first day of the week is set as Monday. To change it to Sunday, you can set it as `6`. |
| **MAX_USER_COUNT**(int) | By setting it to `1`, you can prevent others from signing up in the future. |
| **ENABLE_IOS_STANDALONE**(bool) | Experiential feature to  enable standalone mode on iOS. The default setting is `true`. |
| **INDEX_SHOW_HABIT_COUNT**(bool) | To display total completed count along with the habit name on the index page. The default setting is `false`. |
| **INDEX_HABIT_NAME_COLUMNS**(int) | Customize the habit name column size to display for the index page. The default value is `5`. |
| **INDEX_HABIT_DATE_COLUMNS**(int) | Customize the displayed dates for the index page. The default value is `5`. |
| **TRUSTED_EMAIL_HEADER**(str) | Delegate authentication to an authenticating reverse proxy that passes in the user's details in HTTP headers, e.g. `Cf-Access-Authenticated-User-Email`. An existing account is required. |
| **TRUSTED_LOCAL_EMAIL**(str) | Disables login page entirely. A new account with the specified email will be created if it does not exist. |
| **INDEX_HABIT_DATE_REVERSE**(bool) | Reverse the order of dates to display (default value is false). |
| **UMAMI_ANALYTICS_ID**(str) | Umami analytics tracking id. If left empty (default) no tracking snippet will be injected. |
| **DARK_MODE**(bool) | Default: `None` for "auto" mode.  |

## Development

BeaverHabits favors [uv](https://docs.astral.sh/uv/getting-started/) as package management tool. Here is how to set up the development environment:

```sh
# Install uv and all the dependencies
uv venv &amp;&amp; uv sync

# Start the server
./start.sh dev
```

# Features

Checkout the [wiki](https://github.com/daya0576/beaverhabits/wiki) page for a full list of features, and [vote](https://github.com/daya0576/beaverhabits/discussions/78) on your most wanted feature.

## Extensibility
- [x] RESTful APIs
- [x] Export &amp; Import
- [x] PWA for iOS &amp; Android

## Habit Management
- [x] Daily notes/descriptions
- [x] Reorder habits (manually or automatic)
- [x] Organize Habits by Tag
- [x] Periodic habits
- [ ] Measurable habits (WIP)
- [ ] Multiple states

## Authentication
- [x] Trusted Header SSO
- [x] Bypass login page

Here are my table tennis training sessions over the past year ^^

<img src="https://github.com/user-attachments/assets/1b01435e-5327-4dc6-96d1-1738e2647e53" alt="image" width="750">

# Sponsor
<a href="https://www.buymeacoffee.com/henryzhu"><img width="174" height="41" alt="Buy Me A Coffee" src="https://cdn.buymeacoffee.com/buttons/default-yellow.png"></a>

## Similar templates

- [Betterlytics](https://railway.com/deploy/betterlytics) — Betterlytics is a cookieless analytics platform GDPR-compliant.
- [Finance Tracker](https://railway.com/deploy/finance-tracker-1) — Private multi-user household finance ledger with budgets and CSV import.
- [Matomo Analytics + MariaDB](https://railway.com/deploy/matomo-analytics-mariadb) — Privacy-friendly analytics with MariaDB and persistent volumes.

Open this page in a browser: https://railway.com/deploy/beaverhabits
