Page:
Service:ezBookkeeping
Pages
修改成台北時區
將PCIe直通給PVE的虛擬機
延展系統硬碟
憑證 x509 問題
進入 busybox 問題
53 埠被占用
Claude:ccstatusline
Database:PostgreSQL
Database:SQLServer
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block
Service:ASP.NET
Service:Coder
Service:Docker
Service:ElasticSearch
Service:Emby
Service:Gitea
Service:GiteaRunner
Service:Gitlab
Service:MeTube
Service:OpenClaw
Service:OpenCode
Service:PicoClaw
Service:Redis
Service:Traefik
Service:VS Code
Service:Vaultwarden
Service:ezBookkeeping
Service:k3d
Service:netplan
Tool:C# SDK
Tool:Node JS
Tool:Oh My Posh
Clone
4
Service:ezBookkeeping
Jeffery edited this page 2026-06-11 10:03:47 +08:00
Table of Contents
簡介
ezBookkeeping 是一套自架的個人記帳服務。本文記錄在 Ubuntu 上以二進位檔搭配 systemd 部署,並使用 PostgreSQL 作為資料庫的步驟。
下載 ezBookkeeping
從官方下載指定版本的壓縮檔並解壓縮,以下提供兩個版本,擇一執行即可。
wget https://github.com/mayswind/ezbookkeeping/releases/download/v1.4.0/ezbookkeeping-v1.4.0-linux-amd64.tar.gz && tar zxvf ezbookkeeping-v1.4.0-linux-amd64.tar.gz
wget https://github.com/mayswind/ezbookkeeping/releases/download/v1.5.1/ezbookkeeping-v1.5.1-linux-amd64.tar.gz && tar zxvf ezbookkeeping-v1.5.1-linux-amd64.tar.gz
建立 ezBookkeeping 服務
以 systemd 管理服務,可開機自動啟動、崩潰時自動重啟。先建立服務設定檔。
nano /etc/systemd/system/ezbookkeeping.service
服務檔內容如下:
[Unit]
Description=ezBookkeeping
[Service]
Environment=HOME=/root
Type=simple
WorkingDirectory=/root
ExecStart=/root/ezbookkeeping server run
Restart=always
User=root
[Install]
WantedBy=multi-user.target
啟動服務
重新載入 systemd 設定、設為開機自動啟動、啟動服務並檢視狀態。
systemctl daemon-reload && systemctl enable ezbookkeeping.service && systemctl start ezbookkeeping.service && systemctl status ezbookkeeping.service
設定資料庫
以 postgres 系統帳號進入 PostgreSQL 互動介面。
sudo -u postgres psql
新建專屬使用者與資料庫。
CREATE USER ezbookkeeping WITH PASSWORD 'ezbookkeeping';
CREATE DATABASE ezbookkeeping;
設定資料庫權限(Postgres 15 以後,schema 權限需另外授予,否則應用程式無法建立資料表)。
-- 1. Give ownership of the database to the app user
ALTER DATABASE ezbookkeeping OWNER TO ezbookkeeping;
-- 2. Give ownership of the public schema to the app user
ALTER SCHEMA public OWNER TO ezbookkeeping;
-- 3. Ensure the user has create permissions (Crucial for Postgres 15+)
GRANT USAGE, CREATE ON SCHEMA public TO ezbookkeeping;