diff --git a/ct/nextexplorer.sh b/ct/nextexplorer.sh new file mode 100644 index 000000000..015d17aaa --- /dev/null +++ b/ct/nextexplorer.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/vikramsoni2/nextExplorer + +APP="nextExplorer" +var_tags="${var_tags:-files;documents}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-3072}" +var_disk="${var_disk:-8}" +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 [[ ! -d /opt/nextExplorer ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "nextExplorer" "vikramsoni2/nextExplorer"; then + msg_info "Stopping nextExplorer" + $STD systemctl stop nextexplorer + msg_ok "Stopped nextExplorer" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nextExplorer" "vikramsoni2/nextExplorer" "tarball" "latest" "/opt/nextExplorer" + + msg_info "Updating nextExplorer" + APP_DIR="/opt/nextExplorer/app" + mkdir -p "$APP_DIR" + cd /opt/nextExplorer/backend + export NODE_ENV=production + $STD npm ci + cd /opt/nextExplorer/frontend + unset NODE_ENV + export NODE_ENV=development + $STD npm ci + $STD npm run build -- --sourcemap false + unset NODE_ENV + cd /opt/nextExplorer/ + mv backend/{node_modules,src,package.json} "$APP_DIR" + mv frontend/dist/ "$APP_DIR"/public + msg_ok "Updated nextExplorer" + + msg_info "Starting nextExplorer" + $STD systemctl start nextexplorer + msg_ok "Started nextExplorer" + 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}${CL}" diff --git a/frontend/public/json/nextexplorer.json b/frontend/public/json/nextexplorer.json new file mode 100644 index 000000000..caa88b336 --- /dev/null +++ b/frontend/public/json/nextexplorer.json @@ -0,0 +1,37 @@ +{ + "name": "nextExplorer", + "slug": "nextexplorer", + "categories": [ + 11, + 12 + ], + "date_created": "2025-12-11", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://explorer.nxz.ai", + "website": "https://github.com/vikramsoni2/nextExplorer", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/nextexplorer.webp", + "config_path": "/etc/nextExplorer/.env", + "description": "", + "install_methods": [ + { + "type": "default", + "script": "ct/nextexplorer.sh", + "resources": { + "cpu": 2, + "ram": 3072, + "hdd": 8, + "os": "Debian", + "version": "13" + } + } + ], + "notes": [ + { + "text": "Bind mount your volume(s) in the `/mnt` directory", + "type": "info" + } + ] +} diff --git a/install/nextexplorer_install.sh b/install/nextexplorer_install.sh new file mode 100644 index 000000000..dc8d16e72 --- /dev/null +++ b/install/nextexplorer_install.sh @@ -0,0 +1,139 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/vikramsoni2/nextExplorer + +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 \ + ripgrep \ + imagemagick \ + ffmpeg +msg_ok "Installed Dependencies" + +NODE_VERSION="24" setup_nodejs + +fetch_and_deploy_gh_release "nextExplorer" "vikramsoni2/nextExplorer" "tarball" "latest" "/opt/nextExplorer" + +msg_info "Building nextExplorer" +APP_DIR="/opt/nextExplorer/app" +LOCAL_IP="$(hostname -I | awk '{print $1}')" +mkdir -p "$APP_DIR" +mkdir -p /etc/nextExplorer +cd /opt/nextExplorer/backend +export NODE_ENV=production +$STD npm ci +unset NODE_ENV + +cd /opt/nextExplorer/frontend +export NODE_ENV=development +$STD npm ci +$STD npm run build -- --sourcemap false +unset NODE_ENV + +cd /opt/nextExplorer +mv backend/{node_modules,src,package.json} "$APP_DIR" +mv frontend/dist/ "$APP_DIR"/public +msg_ok "Built nextExplorer" + +msg_info "Configuring nextExplorer" +SECRET=$(openssl rand -hex 32) +cat </etc/nextExplorer/.env +NODE_ENV=production +PORT=3000 + +VOLUME_ROOT=/mnt +CONFIG_DIR=/etc/nextExplorer +CACHE_DIR=/etc/nextExplorer/cache +# USER_ROOT= + +PUBLIC_URL=${LOCAL_IP}:3000 +# TRUST_PROXY= +# CORS_ORIGINS= + +LOG_LEVEL=info +DEBUG=false +ENABLE_HTTP_LOGGING=false + +AUTH_ENABLED=true +AUTH_MODE=both +SESSION_SECRET="${SECRET}" +# AUTH_MAX_FAILED= +# AUTH_LOCK_MINUTES= + +# OIDC_ENABLED= +# OIDC_ISSUER= +# OIDC_AUTHORIZATION_URL= +# OIDC_TOKEN_URL= +# OIDC_USERINFO_URL= +# OIDC_CLIENT_ID= +# OIDC_CLIENT_SECRET= +# OIDC_CALLBACK_URL= +# OIDC_SCOPES= + +# SEARCH_DEEP= +# SEARCH_RIPGREP= +# SEARCH_MAX_FILESIZE= + +# ONLYOFFICE_URL= +# ONLYOFFICE_SECRET= +# ONLYOFFICE_LANG= +# ONLYOFFICE_FORCE_SAVE= +# ONLYOFFICE_FILE_EXTENSIONS= + +SHOW_VOLUME_USAGE=true +# USER_DIR_ENABLED= +# SKIP_HOME= + +# EDITOR_EXTENSIONS= + +# FFMPEG_PATH= +# FFPROBE_PATH= + +FAVORITES_DEFAULT_ICON=outline.StarIcon + +SHARES_ENABLED=true +# SHARES_TOKEN_LENGTH=10 +# SHARES_MAX_PER_USER=100 +# SHARES_DEFAULT_EXPIRY_DAYS=30 +# SHARES_GUEST_SESSION_HOURS=24 +# SHARES_ALLOW_PASSWORD=true +# SHARES_ALLOW_ANONYMOUS=true +EOF +chmod 600 /etc/nextExplorer/.env +msg_ok "Configured nextExplorer" + +msg_info "Creating nextExplorer Service" +cat </etc/systemd/system/nextExplorer.service +[Unit] +Description=nextExplorer Service +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/nextExplorer/app +EnvironmentFile=/etc/nextExplorer/.env +ExecStart=/usr/bin/node ./src/app.js +Restart=always +RestartSec=5 +StandardOutput=journal +StandardError=journal + +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable -q --now nextExplorer +msg_ok "Created nextExplorer Service" + +motd_ssh +customize +cleanup_lxc