Skip to content
Open

xwiki #2519

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions ct/xwiki.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/usr/bin/env bash
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main"
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")

# Copyright (c) 2021-2026 community-scripts ORG
# Author: freakms
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
# Source: https://www.xwiki.org

APP="XWiki"
var_tags="${var_tags:-wiki}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-16}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
var_arm64="${var_arm64:-no}"

header_info "$APP"
variables
color
catch_errors

function update_script() {
header_info
check_container_storage
check_container_resources

if [[ ! -f /etc/xwiki/xwiki.cfg ]]; then
msg_error "No XWiki Installation Found!"
exit
fi

msg_info "Stopping XWiki"
systemctl stop tomcat10
msg_ok "Stopped XWiki"

create_backup /etc/xwiki

msg_info "Updating XWiki"
apt_update_safe
$STD apt install -y --only-upgrade -o Dpkg::Options::=--force-confold \
xwiki-common xwiki-pgsql-common xwiki-tomcat10-common xwiki-tomcat10-pgsql
msg_ok "Updated XWiki"

restore_backup

msg_info "Starting XWiki"
systemctl start tomcat10
msg_ok "Started XWiki"
msg_ok "Updated successfully!"
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}:8080/xwiki${CL}"
44 changes: 44 additions & 0 deletions install/xwiki-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash

# Copyright (c) 2021-2026 community-scripts ORG
# Author: freakms
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
# Source: https://www.xwiki.org

source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os

setup_postgresql

setup_deb822_repo \
"xwiki" \
"https://maven.xwiki.org/xwiki-keyring.gpg" \
"https://maven.xwiki.org" \
"stable/"

msg_info "Installing XWiki"
debconf-set-selections <<EOF
dbconfig-common dbconfig-common/dbconfig-install boolean true
dbconfig-common dbconfig-common/remember-admin-pass boolean false
EOF
export DEBIAN_FRONTEND=noninteractive
$STD apt install -y xwiki-tomcat10-pgsql
msg_ok "Installed XWiki"

msg_info "Configuring XWiki"
XWIKI_XMX=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo) * 60 / 100 / 1024))
sed -i 's/^\(JAVA_OPTS=.*\)$/#\1/' /etc/default/tomcat10
cat <<EOF >>/etc/default/tomcat10
JAVA_OPTS="-Djava.awt.headless=true -Xmx${XWIKI_XMX}m -XX:+UseG1GC"
EOF
systemctl restart tomcat10
msg_ok "Configured XWiki"

motd_ssh
customize
cleanup_lxc
52 changes: 52 additions & 0 deletions json/xwiki.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "XWiki",
"slug": "xwiki",
"categories": [12],
"date_created": "2026-11-10",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 8080,
"documentation": "https://www.xwiki.org/xwiki/bin/view/Documentation/",
"website": "https://www.xwiki.org/",
"repository": "https://github.com/xwiki/xwiki-platform",
"architectures": ["amd64"],
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/xwiki.webp",
"description": "XWiki is a free, open source wiki platform written in Java. It offers structured data, applications inside the wiki, a powerful extension system and fine-grained permissions, and is a common alternative to Confluence.",
"install_methods": [
{
"type": "default",
"script": "ct/xwiki.sh",
"config_path": "/etc/xwiki/xwiki.cfg",
"resources": {
"cpu": 2,
"ram": 4096,
"hdd": 16,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "On first start open http://<IP>:8080/xwiki/ and finish the Distribution Wizard: create the admin account and install the XWiki Standard flavor. This takes a few minutes.",
"type": "info"
},
{
"text": "The PostgreSQL database and its random password are created by the Debian package; the connection is stored in /etc/xwiki/hibernate.cfg.xml.",
"type": "info"
},
{
"text": "The Java heap is set to about 60 % of the container RAM in /etc/default/tomcat10. XWiki needs at least 2 GiB, 4 GiB is recommended.",
"type": "info"
},
{
"text": "Take a snapshot or backup before updating; major XWiki upgrades finish with the Distribution Wizard in the browser.",
"type": "warning"
}
]
}
Loading