Sakai
Overview
Sakai is a mature open source learning management system built for higher education. It provides course and project sites, the Lessons page builder, Assignments with rubrics and peer review, Tests & Quizzes, a full Gradebook, Resources with versioned file storage, Forums, Announcements, Calendar, Sign-up, Polls, Wiki, Chat, Site Statistics and LTI 1.3 tool integration. The Apereo Foundation stewards Sakai, and universities across North America and the Spanish-speaking world run it in production.
The SecureAnyCloud image delivers the official Sakai 25.2 release, fully installed on Ubuntu 24.04 and served over HTTPS. Every per-VM secret is generated on first boot, so a working LMS is serving within minutes of launch. 24/7 SecureAnyCloud support is included.
Sakai is free software published under the Educational Community License version 2.0, an Apache 2.0 derivative. Sakai is a trademark of the Apereo Foundation. SecureAnyCloud is not affiliated with, endorsed by, or sponsored by the Apereo Foundation. This image packages the upstream open source release with SecureAnyCloud's provisioning, hardening and support.
What you get:
- Sakai 25.2, deployed into Apache Tomcat 9.0.122 at
/opt/tomcat, running on OpenJDK 17 - nginx 1.24 terminating HTTPS in front of Tomcat, reachable at
https://<vm-ip>/portal. Port 80 only redirects to HTTPS and serves no content of its own. - A local MySQL 8.4 LTS database, bound to
127.0.0.1only - Sakai's Quartz scheduler, which runs the scheduled jobs in-process rather than through a web-triggered endpoint
- A per-VM administrator password, database password, Sakai server identifier and HTTPS certificate, all generated on first boot and written to a root-only file. No default, shared or published credential ships in the image.
- A Sakai database schema that is built during the image build, so there is no installation wizard exposed on your VM and nothing to configure before you sign in
- Sakai's sample-user provider and demo dataset, which are removed from the image entirely, so the published demo accounts cannot exist
- Tomcat hardening: the
manager,host-manager,examplesanddocsweb applications are removed, the AJP connector is deleted, and the Tomcat shutdown port is disabled - 24/7 SecureAnyCloud support
Prerequisites
You need an active Azure subscription, an SSH key pair, and a VNet plus subnet in the target region.
Standard_B2ms (2 vCPU / 8 GiB RAM) is the recommended minimum size, and the image is tuned for it. Sakai deploys roughly one hundred web applications into a single JVM, so it is demanding of both heap and metaspace. The image runs Tomcat with a 3 GB maximum heap and 768 MB of metaspace alongside MySQL and the operating system.
A 4 GiB Standard_B2s is not supported. It cannot hold that footprint, and the JVM fails. For a real cohort, scale up to Standard_B4ms or larger. More vCPUs materially shorten Sakai's start-up and improve concurrency under load.
NSG inbound rules: allow 22/tcp from your management network and 443/tcp (HTTPS) from wherever your learners and staff browse. 80/tcp is optional and only redirects to HTTPS.
Deploy from the Azure Marketplace
- Sign in to the Azure Portal, choose Create a resource, and search the Marketplace for Sakai by SecureAnyCloud.
- Select Create.
- On the Basics tab, pick your subscription, resource group, region and size (Standard_B2ms or larger).
- Under Administrator account, choose SSH public key and paste your key.
- Under Inbound port rules, allow SSH (22) and HTTPS (443).
- Choose Review + create, then Create.
Deploy from the Azure CLI
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:sakai-ubuntu-24-04:default:latest
az vm create \
--resource-group <your-rg> \
--name sakai \
--image sac1647283583153:sakai-ubuntu-24-04:default:latest \
--size Standard_B2ms \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_rsa.pub \
--public-ip-sku Standard \
--os-disk-delete-option Delete \
--nic-delete-option DeleteThen open the ports that you need:
az vm open-port --resource-group <your-rg> --name sakai --port 443 --priority 1010
az vm open-port --resource-group <your-rg> --name sakai --port 80 --priority 1020Wait for first boot, then retrieve your credentials
First boot generates this VM's own secrets and then starts Sakai. Sakai deploys roughly one hundred web applications into a single JVM, so this takes a while. On a Standard_B2ms, expect about fifteen to twenty minutes before the sign-in page answers (measured: 18 minutes on a freshly launched VM). Later reboots are quicker.
Until first boot has finished, nginx deliberately refuses to start. The VM is therefore unreachable rather than serving a half-configured LMS. This is by design, not a fault.
To read the credentials file, connect over SSH from your own machine:
ssh azureuser@<vm-public-ip>Then, on the VM, run:
sudo cat /root/sakai-credentials.txtThe output looks similar to this:
# sac :: Sakai appliance credentials
# Generated on this VM's first boot. This file is readable only by root. # Change the administrator password after your first sign-in. sakai.admin.user=admin sakai.admin.pass=<a unique 24-character password> sakai.db.name=sakai sakai.db.user=sakai sakai.db.pass=<a unique 32-character password> sakai.server.id=sac-<unique>The file is mode 600 and owned by root, so only a user who can sudo can read it. The admin account in this file is Sakai's own administrator account, not the Linux root user.
If the page is not answering yet, check progress with:
systemctl is-active sakai-firstboot.service sakai.service nginx.service
sudo journalctl -u sakai.service --no-pager -n 20Sign in
Browse to https://<vm-public-ip>/portal. Your browser warns about the self-signed certificate that first boot generated. This is expected until you install your own certificate (Step 8). Accept the warning, then sign in with the username admin and the password from /root/sakai-credentials.txt.
Change the administrator password immediately after your first sign-in. Choose Administration Workspace from the sites menu, then Users, search for admin, and set a new password. Then create a named account for each administrator instead of sharing the admin account.
Create your first course site
From Administration Workspace, choose Sites, then New Site. Pick course site or project site and give it a title and description. Choose the tools you want (Lessons, Assignments, Tests & Quizzes, Gradebook, Resources and Forums are the usual starting set), add participants with their roles, and publish the site.
You create and manage course and project sites from Worksite Setup. Once a site exists, it appears in the sites menu at the top of the portal, with the tools you selected down the left-hand side.
The scheduled job runner
Sakai runs its scheduled jobs through an in-process Quartz scheduler rather than a public web endpoint, so nothing needs to be exposed for jobs to run. The scheduler deliberately starts five minutes after Tomcat, so it may not be registered immediately after boot.
Review and schedule jobs from Administration Workspace, then Job Scheduler. To confirm from the shell that the scheduler is alive, run:
sudo mysql --protocol=socket -u root sakai \
-e "SELECT TRIGGER_NAME, TRIGGER_STATE, PREV_FIRE_TIME, NEXT_FIRE_TIME FROM QRTZ_TRIGGERS;"A trigger in WAITING state with a future NEXT_FIRE_TIME is an armed job. After a job has run, its PREV_FIRE_TIME moves off -1. This shows that the scheduler actually executed a job, not merely that it was configured.
QRTZ_SCHEDULER_STATE stays empty on this image. That table is Quartz's clustering check-in, and this is a single-node deployment.
Point a domain name at the VM
Sakai builds absolute links from the serverUrl it is configured with, so tell Sakai your hostname once you have one. The image rewrites serverUrl from the VM's own address on every boot. This makes an Azure public IP that changes across a stop and start work transparently. Set a real hostname explicitly so that the rewrite does not overwrite it.
Create an A record that points your hostname at the VM's public IP, then edit /opt/tomcat/sakai/sakai.properties:
sudo sed -i 's|^serverUrl=.*|serverUrl=https://lms.example.edu|' /opt/tomcat/sakai/sakai.properties
sudo sed -i 's|^serverName=.*|serverName=lms.example.edu|' /opt/tomcat/sakai/sakai.properties
sudo systemctl disable sakai-baseurl.service
sudo systemctl restart sakai.serviceDisabling sakai-baseurl.service stops the per-boot rewrite from replacing your hostname with the VM's IP address again.
Install a trusted HTTPS certificate
The image generates a self-signed certificate on first boot so that HTTPS works out of the box. Once you have a hostname, replace it with a real certificate:
sudo apt-get update
sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d lms.example.eduCertbot edits the nginx server block in /etc/nginx/sites-available/sakai.conf and installs a renewal timer. Keep the existing proxy_cookie_domain line in that file. The line strips the cookie Domain attribute, which allows sign-in to work when you reach Sakai by IP address rather than by name.
Outbound email
Sakai sends notifications and needs an SMTP relay to do so. Set the relay in /opt/tomcat/sakai/sakai.properties:
smtp@org.sakaiproject.email.api.EmailService=smtp.example.edu smtp.port@org.sakaiproject.email.api.EmailService=587 setup.request=noreply@example.eduThen restart Sakai:
sudo systemctl restart sakai.serviceTo send a test message, open Administration Workspace, then Email Test.
Backups
Everything that matters lives in two places: the MySQL database and the uploaded content under /var/lib/sakai/files. Back up both:
sudo mysqldump --protocol=socket -u root --single-transaction --routines --triggers \
sakai | gzip > /var/backups/sakai-$(date +%F).sql.gz
sudo tar czf /var/backups/sakai-files-$(date +%F).tar.gz -C /var/lib/sakai filesCopy both off the VM, to Azure Blob Storage or your own backup target, and test a restore before you rely on it. A VM snapshot alone is not a substitute for a database dump taken with --single-transaction.
Upgrades
For a Sakai 25 maintenance release (25.3, 25.4 and so on), replace the deployed application and let Sakai upgrade its own schema:
# Always take a backup first (Step 10).
sudo systemctl stop sakai.service cd /tmp curl -fsSLO https://source.sakaiproject.org/release/25.3/artifacts/sakai-bin-25.3.tar.gz
# Verify the download against the .MD5 published alongside it before extracting.
sudo rm -rf /opt/tomcat/components /opt/tomcat/webapps
sudo tar -xzf sakai-bin-25.3.tar.gz -C /opt/tomcat
sudo find /opt/tomcat/components -name 'components-demo.xml' -delete sudo find /opt/tomcat/components -name 'sakai-sample-provider-*.jar' -delete sudo chown -R sakai:sakai /opt/tomcat
sudo systemctl start sakai.serviceauto.ddl=true is set in sakai.properties, so Sakai applies its own schema changes on the next start. Watch /opt/tomcat/logs/catalina.out until the portal answers again.
Delete the demo provider files again after every upgrade, because the upstream archive ships them each time.
unattended-upgrades, which is enabled in the image, handles operating system patches.
Troubleshooting
The page does not load. Sakai takes about fifteen to twenty minutes on its very first boot, because it deploys about 100 web applications and its scheduler starts on a five-minute delay. Check systemctl status sakai.service and sudo tail -f /opt/tomcat/logs/catalina.out. Confirm that your NSG allows 443/tcp.
nginx will not start. This is the fail-closed design working. nginx refuses to start until /var/lib/sac/data/sakai-firstboot.done exists, and first boot writes that file only after the per-VM administrator password is in place. Check systemctl status sakai-firstboot.service.
Sign-in fails with the password from the credentials file. Confirm that you are using the username admin and that you copied the whole password, which contains symbols. If you changed serverUrl, make sure it matches the address you are browsing to.
Out of memory, or the JVM will not start. You are almost certainly on a VM smaller than Standard_B2ms. Resize to Standard_B2ms or larger. The heap settings in /opt/tomcat/bin/setenv.sh assume at least 8 GiB of RAM.
Scheduled jobs are not running. The scheduler starts five minutes after Tomcat by design. Confirm this with the QRTZ_SCHEDULER_STATE query in Step 6 and check that LAST_CHECKIN_TIME advances.
Checking what is listening. The image exposes only SSH, HTTP (redirect) and HTTPS off the VM. Tomcat, MySQL and Sakai's cache endpoints are bound to the loopback interface:
sudo ss -lntpSupport
SecureAnyCloud provides 24/7 support for this image by email at sales@secureanycloud.com and via live chat. Questions about Sakai feature behaviour are answered on a best-effort basis and, where appropriate, directed to the Sakai community documentation maintained by the Apereo Foundation.
Deploy on Azure
Launch Sakai 25 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