Deployment guide

JSPWiki 2.12

Overview

Apache JSPWiki is a mature, open source, general-purpose wiki engine built on standard Java servlet technology. Authors create and cross-link pages with a compact wiki markup and attach files. Built-in page versioning tracks every change and lets you restore any revision.

This SecureAnyCloud image deploys the official Apache JSPWiki 2.12.4 WAR as the ROOT web application on Apache Tomcat 9 under OpenJDK 17, on Ubuntu 24.04 on Azure. JSPWiki 2.12.x targets the javax.servlet API (Java EE 8), so Tomcat 9, not Tomcat 10/11, is the correct servlet container.

Wiki pages and attachments are stored on the persistent OS disk under /var/lib/jspwiki, using the versioned VersioningFileProvider so that full page history is retained. At first boot, jspwiki-firstboot.service creates a per-VM administrator account. No shared or default password is ever baked into the image.

The default access policy is deliberately secured: public read, administrator write. Anyone may view pages, but only the administrator may create, edit, upload to, rename or delete them. A public-facing wiki is therefore not an open target for spam the moment it launches. This guide shows how to open editing up to logged-in users or to the whole public if you want a collaborative wiki.

What you get:

  • Apache JSPWiki 2.12.4 (official Apache WAR) deployed as the ROOT web application
  • Apache Tomcat 9 (latest 9.0.x at build time) running as the tomcat system user
  • OpenJDK 17 (headless JRE)
  • tomcat.service systemd unit that starts automatically on boot
  • jspwiki-firstboot.service systemd oneshot that creates a per-VM administrator account at first boot. The password is hashed with JSPWiki's own CryptoUtil, written to the XML user database, and recorded in /stage/scripts/jspwiki-credentials.log (mode 0600, root-only). No shared or default password is baked into the image.
  • Versioned filesystem page store (VersioningFileProvider) and attachments under /var/lib/jspwiki on the persistent OS disk, so full page history is retained
  • Secured default access policy: public read, administrator write (built-in Admin group)
  • A seeded starter page set, so a fresh VM renders a real wiki rather than a blank first-run screen
  • HTTP connector on TCP 8080, with the first-run setup servlet (Install.jsp) and the stock Tomcat webapps (docs/examples/manager) removed for hardening
  • Ubuntu 24.04 LTS base with the latest security patches applied at build time
  • Azure Linux Agent for cloud integration and SSH key injection
  • 24/7 SecureAnyCloud support with guaranteed 24 hour response SLA

Prerequisites

You need:

  • An active Azure subscription, an SSH public key, and a VNet with a subnet in the target region
  • A subscription to the Apache JSPWiki listing on the Azure Marketplace

Recommended virtual machine size: Standard_B2s (2 vCPU, 4 GB RAM) is comfortable for most team wikis.

For large, heavily trafficked wikis, use Standard_D2s_v5 (2 vCPU, 8 GB RAM) or larger. Also raise the Tomcat heap in /etc/systemd/system/tomcat.service (CATALINA_OPTS -Xmx).

1

Deploy from the Azure Portal

Search the Azure Marketplace for JSPWiki, select the SecureAnyCloud publisher and click Create.

Add network security group (NSG) rules that allow TCP 22 (admin) and TCP 8080 (HTTP) from your client networks.

For a production, internet-facing wiki, put a TLS-terminating reverse proxy in front of Tomcat rather than exposing plain HTTP on port 8080. SecureAnyCloud ships nginx-ssl-certbot-ubuntu-24-04 as a one-step option.

2

Deploy from the Azure CLI

RG="jspwiki-prod"; LOCATION="eastus"; VM_NAME="jspwiki-01" IMAGE_URN="sac1647283583153:jspwiki-ubuntu-24-04:default:latest" SSH_KEY="$(cat ~/.ssh/id_rsa.pub)" az group create --name "$RG" --location "$LOCATION" az network vnet create -g "$RG" --name jspwiki-vnet --address-prefix 10.100.0.0/16 --subnet-name jspwiki-subnet --subnet-prefix 10.100.1.0/24 az network nsg create -g "$RG" --name jspwiki-nsg az network nsg rule create -g "$RG" --nsg-name jspwiki-nsg --name allow-ssh --priority 100 \
  --source-address-prefixes "<your-mgmt-cidr>" --destination-port-ranges 22 --access Allow --protocol Tcp az network nsg rule create -g "$RG" --nsg-name jspwiki-nsg --name allow-http --priority 110 \
  --source-address-prefixes "<your-client-cidr>" --destination-port-ranges 8080 --access Allow --protocol Tcp
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:jspwiki-ubuntu-24-04:default:latest
az vm create -g "$RG" --name "$VM_NAME" --image "$IMAGE_URN" \
  --size Standard_B2s --storage-sku StandardSSD_LRS \
  --admin-username azureuser --ssh-key-values "$SSH_KEY" \
  --vnet-name jspwiki-vnet --subnet jspwiki-subnet --nsg jspwiki-nsg --public-ip-sku Standard
3

Connect via SSH

ssh azureuser@<vm-ip>

Both tomcat.service and jspwiki-firstboot.service start automatically on first boot.

4

Verify the Service

sudo systemctl status tomcat.service --no-pager sudo test -f /var/lib/sac/data/jspwiki-firstboot.done && echo FIRSTBOOT_DONE
sudo ss -tln | grep ':8080' curl -s -o /dev/null -w 'front page HTTP %{http_code}\n' 'http://localhost:8080/Wiki.jsp?page=Main'
5

Retrieve the Administrator Password

The per-VM administrator credential is generated on first boot and stored in a root-only file. Read it with sudo:

sudo cat /stage/scripts/jspwiki-credentials.log

The file contains output like this:

JSPWIKI_URL=http://<vm-ip>:8080/ JSPWIKI_ADMIN_USER=admin JSPWIKI_ADMIN_PASSWORD=<JSPWIKI_ADMIN_PASSWORD>
6

Confirm Administrator Login Works

Run this check to confirm that the per-VM admin account authenticates against the running wiki. JSPWiki protects its forms with an anti-CSRF token (X-XSRF-TOKEN), so the script reads the token from the login page and posts it back:

ADMPW='<JSPWIKI_ADMIN_PASSWORD>'
JAR=$(mktemp)
TOKEN=$(curl -s -c "$JAR" -b "$JAR" http://localhost:8080/Login.jsp \
  | grep -oE 'name="X-XSRF-TOKEN"[^>]*value="[^"]*"' | head -1 | sed -E 's/.*value="([^"]*)".*/\1/')
curl -s -o /dev/null -c "$JAR" -b "$JAR" \
  --data-urlencode "j_username=admin" --data-urlencode "j_password=$ADMPW" \
  --data-urlencode "X-XSRF-TOKEN=$TOKEN" --data 'submitlogin=Login&redirect=Main' \
  http://localhost:8080/Login.jsp
BODY=$(curl -s -b "$JAR" 'http://localhost:8080/Wiki.jsp?page=Main') case "$BODY" in *[Ll]ogout*) echo "ADMIN_LOGIN_OK" ;; *) echo "login check failed" ;; esac rm -f "$JAR"
7

Sign in through the browser

From a workstation that the NSG allows, open http://<vm-ip>:8080/. Click the user icon, then Log in. Sign in with admin and the password from Step 5:

8

Browse the Wiki

The front page renders immediately. It comes with a seeded starter page set, left-hand navigation and a Recent Changes list, so you have a working wiki from your first sign-in:

9

Create and edit pages

Signed in as the administrator, click Edit on any page. The editor shows the wiki markup on the left and a live preview on the right:

To create a page, enter a WikiName (for example TeamNotes) in the search box and follow the "create it" prompt. Alternatively, link to the page from an existing page with [TeamNotes] and click the resulting create link.

10

Review Page History

Every save is versioned. Open the Info menu to see the Page Info view. It lists every version with its author, date and size, and lets you diff or restore any earlier revision:

11

Where Your Data Lives

ls /var/lib/jspwiki
ls /var/lib/jspwiki/pages java -version

Component Path

Tomcat home /opt/tomcat

JSPWiki web application /opt/tomcat/webapps/ROOT

Custom configuration /opt/tomcat/webapps/ROOT/WEB-INF/classes/jspwiki-custom.properties

Access policy /opt/tomcat/webapps/ROOT/WEB-INF/jspwiki.policy

Wiki pages (versioned) /var/lib/jspwiki/pages

Attachments /var/lib/jspwiki/attachments

User + group database /var/lib/jspwiki/etc

Credentials file /stage/scripts/jspwiki-credentials.log (mode 0600)

Firstboot sentinel /var/lib/sac/data/jspwiki-firstboot.done

Systemd units /etc/systemd/system/tomcat.service, /etc/systemd/system/jspwiki-firstboot.service

12

Opening the Wiki Up (Access Policy)

The wiki ships public read, administrator write. To change who can edit, edit the access policy file /opt/tomcat/webapps/ROOT/WEB-INF/jspwiki.policy and restart Tomcat:

  • Let all logged-in users edit: add these two lines to the Authenticated block: permission org.apache.wiki.auth.permissions.PagePermission "*:*", "modify,rename"; and permission org.apache.wiki.auth.permissions.WikiPermission "*", "createPages";
  • Let anyone edit (a fully open public wiki): add the same two lines to the Anonymous block.
  • Require login even to view: remove the PagePermission "*:*", "view" grants.

After any change, run sudo systemctl restart tomcat. To add more administrators, log in as admin, create the user accounts and add them to the Admin group from the group management page.

13

Managing the Service

sudo systemctl status tomcat.service --no-pager sudo systemctl restart tomcat.service
sudo tail -f /opt/tomcat/logs/catalina.out
14

Security Recommendations

  • Keep the secured default. Stay with public read, administrator write unless you specifically need open editing.
  • Restrict the NSG. Make port 8080 reachable only from your client networks, and never expose plain HTTP to the public internet.
  • Encrypt web traffic. Front JSPWiki with a TLS reverse proxy (nginx, Apache or SecureAnyCloud's nginx-ssl-certbot-ubuntu-24-04).
  • Rotate the administrator password. Do it from the user's profile page after first sign-in, or by re-minting it via the user database.
  • Back up /var/lib/jspwiki. It holds all pages (with history), attachments and the user and group database.
  • Patch the OS regularly with sudo apt-get update && sudo apt-get upgrade.
15

Support and Licensing

Apache JSPWiki is licensed under the Apache License 2.0. There is no per-CPU or per-deployment fee.

SecureAnyCloud provides commercial support for this image separately from the upstream project.

  • Email: sales@secureanycloud.com
  • Website: secureanycloud.com
  • Support hours: 24/7 with guaranteed 24 hour response SLA

Deploy on Azure

Launch Apache JSPWiki on Ubuntu 24.04 with 24/7 support from SecureAnyCloud.

View on Marketplace

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure

Launch Apache JSPWiki 2.12 on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure