This project provides a robust, production-ready environment for Sakai 23, with automated scripts for both native (Ubuntu/Debian) and containerized (Docker) deployments. It features integrated fixes for common startup issues and a simplified management interface.
graph TD
User((User)) -->|HTTP:8080| Portal[Sakai Portal / Tomcat]
subgraph "Sakai Application Layer"
Portal -->|Internal Bus| Kernel[Sakai Kernel]
Kernel -->|Config Load| Properties[sakai.properties]
end
subgraph "Data Layer"
Kernel -->|JDBC| MySQL[(MySQL 8 Database)]
end
subgraph "Management Layer"
Scripts[manage.sh CLI] -.->|Control| Portal
Scripts -.->|Inject Config| Properties
end
sakai-project/
├── manage.sh ← Unified CLI (run ./manage.sh for all commands)
├── Dockerfile ← Multi-stage build (Maven → Tomcat)
├── docker-compose.yml ← MySQL + Sakai services
│
├── config/ ← All configuration
│ ├── sakai.properties Production Sakai config (mounted into container)
│ ├── sakai.properties.template Template with env vars (used by Dockerfile)
│ ├── tomcat-server.xml Custom Tomcat server.xml (mounted into container)
│ └── entrypoint.sh Docker container entrypoint
│
├── scripts/ ← Bare-metal (non-Docker) scripts
│ ├── install_sakai.sh Full native Ubuntu installer
│ ├── start_sakai.sh Start Sakai via systemd
│ └── stop_sakai.sh Stop Sakai via systemd
│
├── nginx/ ← Nginx reverse proxy configs
│ ├── sites-available/ Config files per domain
│ └── sites-enabled/ Symlinks to active configs
│
├── ssl/ ← SSL certificates (gitignored)
├── docs/ ← Notes and troubleshooting guides
└── backups/ ← Database dumps (created by manage.sh backup)
-
Clone the repository.
-
Start the build:
./manage.sh build
[!TIP] On fresh Ubuntu systems, the script will automatically detect if Docker is missing and install it for you!
-
Monitor the logs:
./manage.sh logs
-
Access the portal: once the logs say "Server startup in [X] ms", go to http://localhost:8080/portal.
Run ./manage.sh with no arguments to see the full help menu.
| Command | Description |
|---|---|
./manage.sh build |
Build the Docker image from source and start services |
./manage.sh start |
Start existing containers |
./manage.sh stop |
Stop running containers |
./manage.sh restart |
Restart all services |
./manage.sh logs |
Follow Sakai application logs |
./manage.sh status |
Show container health and uptime |
./manage.sh clean |
Remove containers and volumes |
| Command | Description |
|---|---|
./manage.sh shell |
Open a bash shell inside the Sakai container |
./manage.sh db |
Open a MySQL shell inside the database container |
./manage.sh props |
Edit sakai.properties in your default editor |
| Command | Description |
|---|---|
./manage.sh backup |
Dump the MySQL database to backups/ |
./manage.sh restore <file> |
Restore a previously saved backup |
| Command | Description |
|---|---|
./manage.sh install |
Run the full native Ubuntu installer (Java, Tomcat, Maven, MySQL) |
Important
The install command is for bare-metal Ubuntu servers only — do not use it inside Docker.
All configuration lives in the config/ directory. Key variables can be customized in docker-compose.yml or config/sakai.properties:
| Variable | Default | Description |
|---|---|---|
SAKAI_DB_USER |
sakaiuser |
Database ownership user |
SAKAI_DB_PASS |
sakaipassword |
Database password |
SAKAI_DB_NAME |
sakaidatabase |
Internal database name |
SAKAI_DB_HOST |
db (Docker) / 127.0.0.1 (Native) |
Connection endpoint |
If you encounter a 404 error on /portal, it is typically caused by a failed database connection. This project includes built-in fixes:
- Missing Schema:
auto.ddl=trueautomatically builds the 340+ required tables on first run. - MySQL 8 Public Key Error:
&allowPublicKeyRetrieval=trueis included in all connection strings.
If the portal doesn't load after 10 minutes:
- Run
./manage.sh logsand search forSEVEREorBeanCreationException. - Run
./manage.sh statusto confirm containers are healthy. - Run
./manage.sh dbto test the database connection directly.
See docs/404-fix.md for more detail on root causes and manual fixes.
Sakai is licensed under the Educational Community License, Version 2.0. This project provides deployment tooling for the open-source Sakai LMS.