Skip to main content

Deployment Overview

Sakai LMS can be deployed using multiple approaches depending on your infrastructure needs. This guide covers the primary deployment methods.

Deployment Methods

Sakai supports two main deployment approaches:
  1. Docker Deployment - Containerized deployment for modern infrastructure
  2. Traditional Tomcat Deployment - Classic Java application server deployment

System Requirements

Minimum Requirements

  • Java: Java 17 (Java 11 for Sakai 22 and 23)
  • Application Server: Apache Tomcat 9
  • Database: MySQL 8.x, MariaDB 10.x, Oracle 12c+, or HSQLDB (development only)
  • Memory: Minimum 2GB RAM for Tomcat
  • Disk Space: 10GB+ for application and content storage
Do not use Tomcat installed via package managers (apt-get, yum). Download and extract Tomcat directly from Apache.

Docker Deployment

Docker deployment provides a containerized, reproducible environment for Sakai.

Building from Source

1

Install Docker

On Linux, use Docker’s installation script:
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
2

Build Sakai Image

Navigate to the docker directory and build from source:
cd docker

docker build --build-arg GIT_CACHEBUST=$(date +%s) \
  --build-arg release=master -t sakai \
  -f ./Dockerfile.source .
For a specific branch or tag:
docker build --build-arg GIT_CACHEBUST=$(date +%s) \
  --build-arg repository=https://github.com/sakaiproject/sakai.git \
  --build-arg release=25.1 -t sakai:25.1 \
  -f ./Dockerfile.source .
3

Start Database Container

Sakai requires a database. Start MariaDB using Docker:
docker run -p 127.0.0.1:53306:3306 -d --name="sakai-mariadb" \
  -e "MARIADB_ROOT_PASSWORD=sakairoot" \
  -v "./mysql/scripts:/docker-entrypoint-initdb.d" \
  -d mariadb:10 --lower-case-table-names=1
This command:
  • Maps port 3306 to local port 53306
  • Sets root password
  • Loads initialization scripts from mysql/scripts/
  • Enables case-insensitive table names
4

Start Sakai Container

Run Sakai and link to the database:
docker run --rm -p 8080:8080 --name sakai-tomcat \
  --link sakai-mariadb sakai
5

Access Sakai

Open your browser and navigate to:
http://localhost:8080/portal
Default credentials:
  • Username: admin
  • Password: admin

Traditional Tomcat Deployment

For production environments, a traditional Tomcat deployment offers more control.

Prerequisites

1

Install Java

Ensure Java 17 is installed:
java -version
Expected output should show Java 17.x.
2

Download Tomcat

Download Tomcat 9 from Apache Tomcat:
wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.x/bin/apache-tomcat-9.0.x.tar.gz
tar -xzf apache-tomcat-9.0.x.tar.gz
mv apache-tomcat-9.0.x /opt/tomcat9
3

Configure Tomcat Environment

Create setenv.sh in /opt/tomcat9/bin/ with memory and JVM settings:
export UMASK='0022'

CATALINA_OPTS="-server \
               -Djava.awt.headless=true \
               -XX:+UseCompressedOops \
               -XX:+AlwaysPreTouch \
               -XX:+DisableExplicitGC \
               -Djava.net.preferIPv4Stack=true"

# Memory size
CATALINA_OPTS="$CATALINA_OPTS -Xms2g -Xmx2g"

# Generational New size
CATALINA_OPTS="$CATALINA_OPTS -XX:NewSize=500m -XX:MaxNewSize=500m"

# Garbage Collector
CATALINA_OPTS="$CATALINA_OPTS -XX:+UseG1GC"

# Java Modules (required for Java 17)
JAVA_OPTS="$JAVA_OPTS \
    --add-opens=java.base/java.lang=ALL-UNNAMED \
    --add-opens=java.base/java.util=ALL-UNNAMED \
    --add-opens=java.base/java.time=ALL-UNNAMED"
Make it executable:
chmod +x /opt/tomcat9/bin/setenv.sh
4

Build Sakai from Source

Clone and build Sakai:
git clone https://github.com/sakaiproject/sakai.git
cd sakai
mvn clean install
5

Deploy to Tomcat

Deploy the built artifacts:
mvn clean install sakai:deploy -Dmaven.tomcat.home=/opt/tomcat9
6

Start Tomcat

Start the Tomcat server:
cd /opt/tomcat9/bin
./startup.sh && tail -f ../logs/catalina.out
Watch the logs for successful startup. Initial startup typically takes 30-60 seconds.

Post-Deployment Configuration

After deployment, configure Sakai through property files:
  • Database connection settings
  • Server URLs and DNS names
  • Email configuration
  • Security settings
See Configuration Guide for detailed property configuration.

Deployment Checklist

  • Java 17 installed and configured
  • Tomcat 9 downloaded (not from package manager)
  • Database server running and accessible
  • Sakai database and user created
  • sakai.properties configured with database credentials
  • setenv.sh configured with appropriate memory settings
  • Firewall rules allow access to port 8080 (or configured port)
  • SSL/TLS certificate configured for production

Production Considerations

For production deployments:
  • Always use HTTPS with valid SSL certificates
  • Configure a reverse proxy (nginx, Apache) in front of Tomcat
  • Set up regular database backups
  • Configure external content storage for scalability
  • Monitor memory usage and adjust heap sizes accordingly

Next Steps

Configuration

Configure Sakai properties and settings

Database Setup

Set up and configure your database

Security

Secure your Sakai installation

User Management

Manage users and permissions

Resources

Build docs developers (and LLMs) love