From a5096a5b622d6e89ab044d32fa25b8c7e96fc0e6 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Thu, 29 Jan 2026 09:41:55 +0100 Subject: [PATCH] test anytype --- ct/anytype.sh | 66 +++++++++++++++++++++++++++++++ frontend/public/json/anytype.json | 48 ++++++++++++++++++++++ install/anytype-install.sh | 59 +++++++++++++++++++++++++++ 3 files changed, 173 insertions(+) create mode 100644 ct/anytype.sh create mode 100644 frontend/public/json/anytype.json create mode 100644 install/anytype-install.sh diff --git a/ct/anytype.sh b/ct/anytype.sh new file mode 100644 index 000000000..b2af170e8 --- /dev/null +++ b/ct/anytype.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://anytype.io + +APP="Anytype" +var_tags="${var_tags:-notes;productivity;sync}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-10}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f /opt/anytype/any-sync-bundle ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "anytype" "grishy/any-sync-bundle"; then + msg_info "Stopping Service" + systemctl stop anytype + msg_ok "Stopped Service" + + msg_info "Backing up Data" + cp -r /opt/anytype/data /opt/anytype_data_backup + msg_ok "Backed up Data" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "anytype" "grishy/any-sync-bundle" "prebuild" "latest" "/opt/anytype" "any-sync-bundle_*_linux_amd64.tar.gz" + chmod +x /opt/anytype/any-sync-bundle + + msg_info "Restoring Data" + cp -r /opt/anytype_data_backup/. /opt/anytype/data + rm -rf /opt/anytype_data_backup + msg_ok "Restored Data" + + msg_info "Starting Service" + systemctl start anytype + msg_ok "Started Service" + msg_ok "Updated successfully!" + 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}http://${IP}:33010${CL}" +echo -e "${INFO}${YW} Client config file:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}/opt/anytype/data/client-config.yml${CL}" diff --git a/frontend/public/json/anytype.json b/frontend/public/json/anytype.json new file mode 100644 index 000000000..88c1abe61 --- /dev/null +++ b/frontend/public/json/anytype.json @@ -0,0 +1,48 @@ +{ + "name": "Anytype", + "slug": "anytype", + "categories": [ + 12 + ], + "date_created": "2026-01-29", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 33010, + "documentation": "https://doc.anytype.io/", + "website": "https://anytype.io/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/anytype.webp", + "config_path": "/opt/anytype/.env", + "description": "Anytype is a local-first, privacy-focused alternative to Notion. This script deploys the any-sync-bundle which provides a self-hosted sync server for Anytype clients with embedded MongoDB and Redis.", + "install_methods": [ + { + "type": "default", + "script": "ct/anytype.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 10, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "After installation, import /opt/anytype/data/client-config.yml into your Anytype apps.", + "type": "info" + }, + { + "text": "This uses the community any-sync-bundle by grishy, not the official Anytype deployment.", + "type": "warning" + }, + { + "text": "Firewall: Open TCP 33010 (DRPC) and UDP 33020 (QUIC) for external access.", + "type": "info" + } + ] +} diff --git a/install/anytype-install.sh b/install/anytype-install.sh new file mode 100644 index 000000000..458e70d3b --- /dev/null +++ b/install/anytype-install.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://anytype.io + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt install -y ca-certificates +msg_ok "Installed Dependencies" + +fetch_and_deploy_gh_release "anytype" "grishy/any-sync-bundle" "prebuild" "latest" "/opt/anytype" "any-sync-bundle_*_linux_amd64.tar.gz" +chmod +x /opt/anytype/any-sync-bundle + +msg_info "Configuring Anytype" +mkdir -p /opt/anytype/data + +cat </opt/anytype/.env +ANY_SYNC_BUNDLE_CONFIG=/opt/anytype/data/bundle-config.yml +ANY_SYNC_BUNDLE_CLIENT_CONFIG=/opt/anytype/data/client-config.yml +ANY_SYNC_BUNDLE_INIT_STORAGE=/opt/anytype/data/storage/ +ANY_SYNC_BUNDLE_INIT_EXTERNAL_ADDRS=${LOCAL_IP} +ANY_SYNC_BUNDLE_LOG_LEVEL=info +EOF +msg_ok "Configured Anytype" + +msg_info "Creating Service" +cat </etc/systemd/system/anytype.service +[Unit] +Description=Anytype Sync Server (any-sync-bundle) +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/anytype +EnvironmentFile=/opt/anytype/.env +ExecStart=/opt/anytype/any-sync-bundle start-all-in-one +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now anytype +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc