Apache JSPWiki 2.12 on Ubuntu 24.04 on Azure User Guide
Overview
This guide covers the deployment and configuration of Apache JSPWiki 2.12 on Ubuntu 24.04 on Azure using cloudimg Azure Marketplace images. 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, attach files, and rely on built-in page versioning so every change is tracked and any revision can be restored.
The image deploys the official Apache JSPWiki 2.12.4 WAR as the ROOT web application on Apache Tomcat 9 running under OpenJDK 17. 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 full page history is retained.
At first boot, jspwiki-firstboot.service mints a per-VM administrator account (the password is hashed with JSPWiki's own CryptoUtil), writes it to the XML user database, and records the credential to /stage/scripts/jspwiki-credentials.log (mode 0600, root only). 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 — so a public-facing wiki is not an open target for spam the moment it launches. This guide shows how to open editing up to logged-in users or the whole public if you want a collaborative wiki.
What is included:
-
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
tomcatsystem user -
OpenJDK 17 (headless JRE)
-
tomcat.servicesystemd unit auto-starting on boot -
jspwiki-firstboot.servicesystemd oneshot minting a per-VM administrator credential -
Versioned filesystem page store (
VersioningFileProvider) + attachments under/var/lib/jspwiki -
Secured default access policy: public read, administrator write (built-in
Admingroup) -
A seeded starter page set so a fresh VM renders a real wiki, not a blank first-run screen
-
HTTP connector on TCP 8080; the first-run setup servlet (
Install.jsp) and stock Tomcat webapps (docs/examples/manager) removed for hardening -
Ubuntu 24.04 LTS base with latest security patches applied at build time
-
Azure Linux Agent for seamless cloud integration and SSH key injection
-
24/7 cloudimg support with guaranteed 24 hour response SLA
Prerequisites
-
Active Azure subscription, SSH public key, VNet + subnet in target region
-
Subscription to the Apache JSPWiki listing on 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 and raise the Tomcat heap in /etc/systemd/system/tomcat.service (CATALINA_OPTS -Xmx).
Step 1: Deploy from the Azure Portal
Search JSPWiki in Marketplace, select the cloudimg publisher, click Create. NSG rules: TCP 22 (admin) and TCP 8080 (HTTP) from your client networks. For a production, internet-facing wiki, front Tomcat with a reverse proxy that terminates TLS (cloudimg ships nginx-ssl-certbot-ubuntu-24-04 as a one-step option) rather than exposing plain HTTP on 8080.
Step 2: Deploy from the Azure CLI
RG="jspwiki-prod"; LOCATION="eastus"; VM_NAME="jspwiki-01"
GALLERY_IMAGE_ID="/subscriptions/<sub-id>/resourceGroups/azure-cloudimg/providers/Microsoft.Compute/galleries/cloudimgGallery/images/jspwiki-ubuntu-24-04/versions/<version>"
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
az vm create -g "$RG" --name "$VM_NAME" --image "$GALLERY_IMAGE_ID" \
--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
Step 3: Connect via SSH
ssh azureuser@<vm-ip>
Both tomcat.service and jspwiki-firstboot.service run automatically on first boot.
Step 4: Verify the Service
sudo systemctl status tomcat.service --no-pager
sudo test -f /var/lib/cloudimg/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'

Step 5: Retrieve the Administrator Password
The per-VM administrator credential is generated on first boot and stored root-only:
sudo cat /stage/scripts/jspwiki-credentials.log
You will see:
JSPWIKI_URL=http://<vm-ip>:8080/
JSPWIKI_ADMIN_USER=admin
JSPWIKI_ADMIN_PASSWORD=<JSPWIKI_ADMIN_PASSWORD>

Step 6: Confirm Administrator Login Works
This confirms the per-VM admin account authenticates against the running wiki. JSPWiki protects its forms with an anti-CSRF token (X-XSRF-TOKEN) that must be read from the login page and posted 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"
Step 7: Sign In Through the Browser
From a workstation that the NSG allows, open http://<vm-ip>:8080/ and click the user icon, then Log in. Sign in with admin and the password from Step 5:

Step 8: Browse the Wiki
The front page renders immediately with a seeded starter page set, left-hand navigation, and a Recent Changes list — a real, working wiki from the first sign-in:

Step 9: Create and Edit Pages
Signed in as the administrator, click Edit on any page (or type a new page name into the search box and create it). The editor shows the wiki markup on the left with 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, or link to it from an existing page with [TeamNotes] and click the resulting create link.
Step 10: Review Page History
Every save is versioned. The Info menu opens the Page Info view, which lists every version with its author, date and size, and lets you diff or restore any earlier revision:

Step 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/cloudimg/jspwiki-firstboot.done |
| Systemd units | /etc/systemd/system/tomcat.service, /etc/systemd/system/jspwiki-firstboot.service |


Step 12: Opening the Wiki Up (Access Policy)
The wiki ships public read, administrator write. To change who can edit, edit the access policy and restart Tomcat. The policy file is /opt/tomcat/webapps/ROOT/WEB-INF/jspwiki.policy:
- Let all logged-in users edit — add these two lines to the
Authenticatedblock:permission org.apache.wiki.auth.permissions.PagePermission "*:*", "modify,rename";andpermission org.apache.wiki.auth.permissions.WikiPermission "*", "createPages"; - Let anyone edit (a fully open public wiki) — add the same two lines to the
Anonymousblock. - Require login even to view — remove the
PagePermission "*:*", "view"grants.
After any change: 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.
Step 13: Managing the Service
sudo systemctl status tomcat.service --no-pager
sudo systemctl restart tomcat.service
sudo tail -f /opt/tomcat/logs/catalina.out
Step 14: Security Recommendations
-
Keep the secured default (public read, administrator write) unless you specifically need open editing
-
Restrict the NSG so 8080 is only reachable from your client networks; never expose plain HTTP to the public internet
-
Front JSPWiki with a TLS reverse proxy (Nginx, Apache, or cloudimg's
nginx-ssl-certbot-ubuntu-24-04) -
Rotate the administrator password from the user's profile page after first sign-in, or by re-minting via the user database
-
Back up
/var/lib/jspwiki— it holds all pages (with history), attachments, and the user/group database -
Patch the OS regularly with
sudo apt-get update && sudo apt-get upgrade
Step 15: Support and Licensing
Apache JSPWiki is licensed under the Apache License 2.0. There is no per-CPU or per-deployment fee.
cloudimg provides commercial support for this image separately from the upstream project.
- Email: support@cloudimg.co.uk
- Website: www.cloudimg.co.uk
- 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 cloudimg.
View on Marketplace
Need Help?
Our support team is available 24/7.
support@cloudimg.co.uk