A self-hosted habit tracking app without "Goals"
- HabitDeck: Turn your Stream Deck into an interactive habit tracker
- Apple Shortcut: A shortcut for sharing the App on iPhone
- Home Assistant Switch: A switch for home assistant to mark a habit as done
- ...
- Demo: https://beaverhabits.com/demo
- Login: https://beaverhabits.com
Simply search for "Beaver Habit Tracker" in the Community Apps store!
docker run -d --name beaverhabits \
-u $(id -u):$(id -g) \
-e HABITS_STORAGE=USER_DISK \
-v /path/to/host/directory:/app/.user/ \
-p 8080:8080 \
daya0576/beaverhabits:latest
Or Docker Compose:
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.
volumes:
- /path/to/beaver/habits:/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, ensure that the UID owning the host folder aligns with the UID of the user inside the container.
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 false |
INDEX_SHOW_HABIT_COUNT(bool) | To display the total completed count badge on the main page. The default setting is false |
BeaverHabits favors uv as package management tool. Here is how to set up the development environment:
# Install uv and all the dependencies
uv venv && uv sync
# Start the server
./start.sh dev
- Pages
- Index page
- Habit list page
- Order habits
- Habit detail page
- Calendar
- Streaks
- Storage:
- Session-based disk storage
- User-based disk storage
- User-based db storage
- CICD:
- Custom domain
- Self-hosting option
- Unit tests & deployment pipeline
- Others:
- Export
- Import
- User management
- User timezone
- RESTful API
Here are my table tennis training sessions in the past year :)
To import from an existing setup, e.g. uhabit, please check this wiki for more details.
Please follow this wiki to add it as an icon on the home screen and make it launch in a separate window
Open page /gui/order
to change the order of habits.
Beaver Habit Tracker API How‐to Guide
- Quantitative metrics
- Native mobile app -- can't wait to try Swift or Tauri :p
- Habit calendar template, e.g. vacations
- Category or Folders
- ...