mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	Re-Add: ActualBudget (#4228)
* Re-Add ActualBudget * path fix * Update install/actualbudget-install.sh Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * Update install/actualbudget-install.sh Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> * Update frontend/public/json/actualbudget.json Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * Update actualbudget.sh * add config path * Update actualbudget.sh --------- Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
This commit is contained in:
		
							
								
								
									
										67
									
								
								ct/actualbudget.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								ct/actualbudget.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,67 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: MickLesk (CanbiZ)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://actualbudget.org/
 | 
			
		||||
 | 
			
		||||
APP="Actual Budget"
 | 
			
		||||
var_tags="finance"
 | 
			
		||||
var_cpu="2"
 | 
			
		||||
var_ram="2048"
 | 
			
		||||
var_disk="4"
 | 
			
		||||
var_os="debian"
 | 
			
		||||
var_version="12"
 | 
			
		||||
var_unprivileged="1"
 | 
			
		||||
 | 
			
		||||
header_info "$APP"
 | 
			
		||||
variables
 | 
			
		||||
color
 | 
			
		||||
catch_errors
 | 
			
		||||
 | 
			
		||||
function update_script() {
 | 
			
		||||
  header_info
 | 
			
		||||
  check_container_storage
 | 
			
		||||
  check_container_resources
 | 
			
		||||
 | 
			
		||||
  if [[ ! -d /opt/actualbudget ]]; then
 | 
			
		||||
    msg_error "No ${APP} Installation Found!"
 | 
			
		||||
    exit
 | 
			
		||||
  fi
 | 
			
		||||
  NODE_VERSION="22"
 | 
			
		||||
  install_node_and_modules
 | 
			
		||||
  RELEASE=$(curl -fsSL https://api.github.com/repos/actualbudget/actual/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
  if [[ -f /opt/actualbudget-data/config.json ]]; then
 | 
			
		||||
    if [[ ! -f /opt/actualbudget_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/actualbudget_version.txt)" ]]; then
 | 
			
		||||
      msg_info "Stopping ${APP}"
 | 
			
		||||
      systemctl stop actualbudget
 | 
			
		||||
      msg_ok "${APP} Stopped"
 | 
			
		||||
 | 
			
		||||
      msg_info "Updating ${APP} to ${RELEASE}"
 | 
			
		||||
      $STD npm update -g @actual-app/sync-server
 | 
			
		||||
      echo "${RELEASE}" >/opt/actualbudget_version.txt
 | 
			
		||||
      msg_ok "Updated ${APP} to ${RELEASE}"
 | 
			
		||||
 | 
			
		||||
      msg_info "Starting ${APP}"
 | 
			
		||||
      systemctl start actualbudget
 | 
			
		||||
      msg_ok "Restarted ${APP}"
 | 
			
		||||
    else
 | 
			
		||||
      msg_info "${APP} is already up to date"
 | 
			
		||||
    fi
 | 
			
		||||
  else
 | 
			
		||||
    msg_info "Old Installation Found, you need to migrate your data and recreate to a new container"
 | 
			
		||||
    msg_info "Please follow the instructions on the ${APP} website to migrate your data"
 | 
			
		||||
    msg_info "https://actualbudget.org/docs/backup-restore/backup"
 | 
			
		||||
    exit 1
 | 
			
		||||
  fi
 | 
			
		||||
  exit
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start
 | 
			
		||||
build_container
 | 
			
		||||
description
 | 
			
		||||
 | 
			
		||||
msg_ok "Completed Successfully!\n"
 | 
			
		||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
			
		||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:5006${CL}"
 | 
			
		||||
							
								
								
									
										35
									
								
								frontend/public/json/actualbudget.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								frontend/public/json/actualbudget.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "Actual Budget",
 | 
			
		||||
    "slug": "actualbudget",
 | 
			
		||||
    "categories": [
 | 
			
		||||
        23
 | 
			
		||||
    ],
 | 
			
		||||
    "date_created": "2025-05-06",
 | 
			
		||||
    "type": "ct",
 | 
			
		||||
    "updateable": true,
 | 
			
		||||
    "privileged": false,
 | 
			
		||||
    "interface_port": 5006,
 | 
			
		||||
    "documentation": "https://github.com/community-scripts/ProxmoxVE/discussions/807",
 | 
			
		||||
    "website": "https://actualbudget.org/",
 | 
			
		||||
    "config_path": "/opt/actualbudget-data/config.json",
 | 
			
		||||
    "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/actual-budget.svg",
 | 
			
		||||
    "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.",
 | 
			
		||||
    "install_methods": [
 | 
			
		||||
        {
 | 
			
		||||
            "type": "default",
 | 
			
		||||
            "script": "ct/actualbudget.sh",
 | 
			
		||||
            "resources": {
 | 
			
		||||
                "cpu": 2,
 | 
			
		||||
                "ram": 2048,
 | 
			
		||||
                "hdd": 4,
 | 
			
		||||
                "os": "debian",
 | 
			
		||||
                "version": "12"
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "default_credentials": {
 | 
			
		||||
        "username": null,
 | 
			
		||||
        "password": null
 | 
			
		||||
    },
 | 
			
		||||
    "notes": []
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										91
									
								
								install/actualbudget-install.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								install/actualbudget-install.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,91 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Copyright (c) 2021-2025 community-scripts ORG
 | 
			
		||||
# Author: MickLesk (CanbiZ)
 | 
			
		||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
 | 
			
		||||
# Source: https://actualbudget.org/
 | 
			
		||||
 | 
			
		||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
 | 
			
		||||
color
 | 
			
		||||
verb_ip6
 | 
			
		||||
catch_errors
 | 
			
		||||
setting_up_container
 | 
			
		||||
network_check
 | 
			
		||||
update_os
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Actual Budget"
 | 
			
		||||
cd /opt
 | 
			
		||||
RELEASE=$(curl -fsSL https://api.github.com/repos/actualbudget/actual/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
 | 
			
		||||
NODE_VERSION="22"
 | 
			
		||||
install_node_and_modules
 | 
			
		||||
mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config}
 | 
			
		||||
chown -R root:root /opt/actualbudget-data
 | 
			
		||||
chmod -R 755 /opt/actualbudget-data
 | 
			
		||||
 | 
			
		||||
cat <<EOF >/opt/actualbudget-data/config.json
 | 
			
		||||
{
 | 
			
		||||
  "port": 5006,
 | 
			
		||||
  "hostname": "::",
 | 
			
		||||
  "serverFiles": "/opt/actualbudget-data/server-files",
 | 
			
		||||
  "userFiles": "/opt/actualbudget-data/user-files",
 | 
			
		||||
  "trustedProxies": [
 | 
			
		||||
    "10.0.0.0/8",
 | 
			
		||||
    "172.16.0.0/12",
 | 
			
		||||
    "192.168.0.0/16",
 | 
			
		||||
    "127.0.0.0/8",
 | 
			
		||||
    "::1/128",
 | 
			
		||||
    "fc00::/7"
 | 
			
		||||
  ],
 | 
			
		||||
  "https": {
 | 
			
		||||
    "key": "/opt/actualbudget/selfhost.key",
 | 
			
		||||
    "cert": "/opt/actualbudget/selfhost.crt"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
mkdir -p /opt/actualbudget
 | 
			
		||||
cd /opt/actualbudget
 | 
			
		||||
$STD npm install --location=global @actual-app/sync-server
 | 
			
		||||
$STD openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout selfhost.key -out selfhost.crt <<EOF
 | 
			
		||||
US
 | 
			
		||||
California
 | 
			
		||||
San Francisco
 | 
			
		||||
My Organization
 | 
			
		||||
My Unit
 | 
			
		||||
localhost
 | 
			
		||||
myemail@example.com
 | 
			
		||||
EOF
 | 
			
		||||
echo "${RELEASE}" >"/opt/actualbudget_version.txt"
 | 
			
		||||
msg_ok "Installed Actual Budget"
 | 
			
		||||
 | 
			
		||||
msg_info "Creating Service"
 | 
			
		||||
cat <<EOF >/etc/systemd/system/actualbudget.service
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Actual Budget Service
 | 
			
		||||
After=network.target
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=simple
 | 
			
		||||
User=root
 | 
			
		||||
Group=root
 | 
			
		||||
WorkingDirectory=/opt/actualbudget
 | 
			
		||||
Environment=ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB=20
 | 
			
		||||
Environment=ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB=50
 | 
			
		||||
Environment=ACTUAL_UPLOAD_FILE_SYNC_SIZE_LIMIT_MB=20
 | 
			
		||||
ExecStart=/usr/bin/actual-server --config /opt/actualbudget-data/config.json
 | 
			
		||||
Restart=always
 | 
			
		||||
RestartSec=10
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=multi-user.target
 | 
			
		||||
EOF
 | 
			
		||||
systemctl enable -q --now actualbudget
 | 
			
		||||
msg_ok "Created Service"
 | 
			
		||||
 | 
			
		||||
motd_ssh
 | 
			
		||||
customize
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
$STD apt-get -y autoremove
 | 
			
		||||
$STD apt-get -y autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
		Reference in New Issue
	
	Block a user