Skip to content

Commit afbac8e

Browse files
MickLeskmichelroegl-brunnertremor021
authored
Re-Add: ActualBudget (#4228)
* Re-Add ActualBudget * path fix * Update install/actualbudget-install.sh Co-authored-by: Michel Roegl-Brunner <[email protected]> * Update install/actualbudget-install.sh Co-authored-by: Slaviša Arežina <[email protected]> * Update frontend/public/json/actualbudget.json Co-authored-by: Michel Roegl-Brunner <[email protected]> * Update actualbudget.sh * add config path * Update actualbudget.sh --------- Co-authored-by: Michel Roegl-Brunner <[email protected]> Co-authored-by: Slaviša Arežina <[email protected]>
1 parent 17c3163 commit afbac8e

File tree

3 files changed

+193
-0
lines changed

3 files changed

+193
-0
lines changed

ct/actualbudget.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://actualbudget.org/
7+
8+
APP="Actual Budget"
9+
var_tags="finance"
10+
var_cpu="2"
11+
var_ram="2048"
12+
var_disk="4"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [[ ! -d /opt/actualbudget ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
NODE_VERSION="22"
32+
install_node_and_modules
33+
RELEASE=$(curl -fsSL https://api.github.com/repos/actualbudget/actual/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
34+
if [[ -f /opt/actualbudget-data/config.json ]]; then
35+
if [[ ! -f /opt/actualbudget_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/actualbudget_version.txt)" ]]; then
36+
msg_info "Stopping ${APP}"
37+
systemctl stop actualbudget
38+
msg_ok "${APP} Stopped"
39+
40+
msg_info "Updating ${APP} to ${RELEASE}"
41+
$STD npm update -g @actual-app/sync-server
42+
echo "${RELEASE}" >/opt/actualbudget_version.txt
43+
msg_ok "Updated ${APP} to ${RELEASE}"
44+
45+
msg_info "Starting ${APP}"
46+
systemctl start actualbudget
47+
msg_ok "Restarted ${APP}"
48+
else
49+
msg_info "${APP} is already up to date"
50+
fi
51+
else
52+
msg_info "Old Installation Found, you need to migrate your data and recreate to a new container"
53+
msg_info "Please follow the instructions on the ${APP} website to migrate your data"
54+
msg_info "https://actualbudget.org/docs/backup-restore/backup"
55+
exit 1
56+
fi
57+
exit
58+
}
59+
60+
start
61+
build_container
62+
description
63+
64+
msg_ok "Completed Successfully!\n"
65+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
66+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
67+
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:5006${CL}"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "Actual Budget",
3+
"slug": "actualbudget",
4+
"categories": [
5+
23
6+
],
7+
"date_created": "2025-05-06",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 5006,
12+
"documentation": "https://github.com/community-scripts/ProxmoxVE/discussions/807",
13+
"website": "https://actualbudget.org/",
14+
"config_path": "/opt/actualbudget-data/config.json",
15+
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/actual-budget.svg",
16+
"description": "Actual Budget is a super fast and privacy-focused app for managing your finances. At its heart is the well proven and much loved Envelope Budgeting methodology.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/actualbudget.sh",
21+
"resources": {
22+
"cpu": 2,
23+
"ram": 2048,
24+
"hdd": 4,
25+
"os": "debian",
26+
"version": "12"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": []
35+
}

install/actualbudget-install.sh

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://actualbudget.org/
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Actual Budget"
17+
cd /opt
18+
RELEASE=$(curl -fsSL https://api.github.com/repos/actualbudget/actual/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
19+
NODE_VERSION="22"
20+
install_node_and_modules
21+
mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config}
22+
chown -R root:root /opt/actualbudget-data
23+
chmod -R 755 /opt/actualbudget-data
24+
25+
cat <<EOF >/opt/actualbudget-data/config.json
26+
{
27+
"port": 5006,
28+
"hostname": "::",
29+
"serverFiles": "/opt/actualbudget-data/server-files",
30+
"userFiles": "/opt/actualbudget-data/user-files",
31+
"trustedProxies": [
32+
"10.0.0.0/8",
33+
"172.16.0.0/12",
34+
"192.168.0.0/16",
35+
"127.0.0.0/8",
36+
"::1/128",
37+
"fc00::/7"
38+
],
39+
"https": {
40+
"key": "/opt/actualbudget/selfhost.key",
41+
"cert": "/opt/actualbudget/selfhost.crt"
42+
}
43+
}
44+
EOF
45+
46+
mkdir -p /opt/actualbudget
47+
cd /opt/actualbudget
48+
$STD npm install --location=global @actual-app/sync-server
49+
$STD openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout selfhost.key -out selfhost.crt <<EOF
50+
US
51+
California
52+
San Francisco
53+
My Organization
54+
My Unit
55+
localhost
56+
57+
EOF
58+
echo "${RELEASE}" >"/opt/actualbudget_version.txt"
59+
msg_ok "Installed Actual Budget"
60+
61+
msg_info "Creating Service"
62+
cat <<EOF >/etc/systemd/system/actualbudget.service
63+
[Unit]
64+
Description=Actual Budget Service
65+
After=network.target
66+
67+
[Service]
68+
Type=simple
69+
User=root
70+
Group=root
71+
WorkingDirectory=/opt/actualbudget
72+
Environment=ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB=20
73+
Environment=ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB=50
74+
Environment=ACTUAL_UPLOAD_FILE_SYNC_SIZE_LIMIT_MB=20
75+
ExecStart=/usr/bin/actual-server --config /opt/actualbudget-data/config.json
76+
Restart=always
77+
RestartSec=10
78+
79+
[Install]
80+
WantedBy=multi-user.target
81+
EOF
82+
systemctl enable -q --now actualbudget
83+
msg_ok "Created Service"
84+
85+
motd_ssh
86+
customize
87+
88+
msg_info "Cleaning up"
89+
$STD apt-get -y autoremove
90+
$STD apt-get -y autoclean
91+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)