Overview
This guide installs Open Journal Systems (OJS) 3.5 on a fresh Ubuntu 22.04 LTS server using Apache, PHP 8.x, and MariaDB (or MySQL). It also covers domain configuration and free SSL via Let’s Encrypt. If you’re migrating from an earlier version, consult the official upgrade docs first.
Prerequisites
- A domain pointed to your server’s IPv4/IPv6 (e.g.,
yourdomain.com). - Ubuntu 22.04 LTS with sudo access.
- Open firewall ports 80 (HTTP) and 443 (HTTPS).
System requirements: Linux, PHP 8.0+ with required extensions, Apache 2.4+, and MySQL 5.7.22+ or MariaDB 10.4+ (or PostgreSQL 9.5+). We’ll install the commonly used PHP modules below.
1) Update OS & Install Packages
Update the server and install Apache, MariaDB, PHP 8.x, and required extensions:
sudo apt update && sudo apt upgrade -y
sudo apt install -y apache2 mariadb-server \
libapache2-mod-php php php-mbstring php-xml php-intl php-mysql php-gd php-curl php-zip \
unzip wget tar
# enable useful Apache modules
sudo a2enmod rewrite ssl headers
sudo systemctl restart apache2
2) Create the Database
Open the MariaDB shell and create a dedicated database/user:
sudo mysql -u root
CREATE DATABASE ojsdb DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'ojsuser'@'localhost' IDENTIFIED BY 'REPLACE_WITH_STRONG_PASSWORD';
GRANT ALL PRIVILEGES ON ojsdb.* TO 'ojsuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Keep the credentials handy for the web-based installer.
3) Download OJS 3.5
Fetch and extract the official OJS 3.5 release tarball:
cd /var/www
sudo wget https://pkp.sfu.ca/ojs/download/ojs-3.5.0-1.tar.gz
sudo tar -xvzf ojs-3.5.0-1.tar.gz
sudo mv ojs-3.5.0-1 ojs
Create a non-web-accessible files directory for submissions
sudo mkdir /var/www/ojs-files
sudo chown -R www-data:www-data /var/www/ojs /var/www/ojs-files
4) Configure Apache Virtual Host
Create a site configuration for your domain:
sudo nano /etc/apache2/sites-available/ojs.conf
Paste the following and adjust ServerName and paths if needed:
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/ojs
<Directory /var/www/ojs>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/ojs_error.log
CustomLog ${APACHE_LOG_DIR}/ojs_access.log combined
</VirtualHost>
sudo a2ensite ojs.conf
sudo systemctl reload apache2
5) PHP Considerations
Ubuntu 22.04 ships with PHP 8.x. If you tweak php.ini (upload limits, memory, etc.), restart Apache:
sudo systemctl restart apache2
6) Run the Web Installer
Navigate to your domain over HTTP (we’ll add HTTPS next): http://yourdomain.com. The OJS installer screen should load. Complete the form:
- Admin account: email, username, secure password.
- Database: MySQL/MariaDB; name
ojsdb, userojsuser, password (from step 2). - Files directory:
/var/www/ojs-files(outside web root, per guide’s security note) - Review the rest of the settings and click Install.
On success, log in as the admin. As in the 3.4 flow, click Add Journal and use the Settings Wizard to configure title, initials, languages, indexing, etc.
7) Add HTTPS with Let’s Encrypt (Certbot)
Install Certbot and the Apache plugin:
sudo apt install -y certbot python3-certbot-apache
Request the certificate and auto-configure Apache (choose redirect to force HTTPS):
sudo certbot --apache -d yourdomain.com
Verify the renewal timer is active and test renewal:
sudo systemctl status certbot.timer
sudo certbot renew --dry-run
8) File Ownership & Permissions
Lock down file permissions while keeping OJS writable where needed:
sudo chown -R www-data:www-data /var/www/ojs /var/www/ojs-files
sudo find /var/www/ojs -type d -exec chmod 755 {{}} \;
sudo find /var/www/ojs -type f -exec chmod 644 {{}} \;
Keep /var/www/ojs-files out of the web root
9) Post-Install Checklist
- Cron / Scheduled Tasks: configure scheduled tasks (if you enable them) via system cron.
- Outgoing Mail: set up SMTP in OJS settings (or configure a relay at the OS level).
- SEO & Indexing: complete journal metadata and indexing settings in the wizard.
- Backups: back up both database and files directory regularly.
- Updates: apply OJS patches and OS updates promptly.
10) Security Hardening Tips
- Use strong, unique passwords for admin and database users.
- Limit SSH access and consider a firewall (UFW) and Fail2ban.
- Keep
ojs-filesnon-web-accessible; never serve it directly. - Disable directory indexes if not needed; ensure
AllowOverride Allis set so OJS’s.htaccessrules work. - Review Apache logs (
/var/log/apache2/*) and OJS logs regularly.
Troubleshooting
- Blank page / 500 error: check Apache error log (
/var/log/apache2/ojs_error.log) and ensure PHP extensions are installed and enabled. - Database connection fails: confirm DB credentials and that
ojsuserhas privileges. Ensurepdo_mysqlis available (php -m). - Uploads fail: verify that
/var/www/ojs-filesis writable bywww-dataand adjust PHP upload limits inphp.ini. - HTTP still served: re-run Certbot, select the redirect option, and make sure the
ojs-le-ssl.confvhost exists and is enabled.
Quick Command Recap
# OS & stack
sudo apt update && sudo apt upgrade -y
sudo apt install -y apache2 mariadb-server libapache2-mod-php php php-mbstring php-xml php-intl php-mysql php-gd php-curl php-zip unzip wget tar
sudo a2enmod rewrite ssl headers
sudo systemctl restart apache2
# DB
sudo mysql -u root
# (then run the CREATE DATABASE/USER/GRANT block above)
# OJS download
cd /var/www
sudo wget https://pkp.sfu.ca/ojs/download/ojs-3.5.0-1.tar.gz
sudo tar -xvzf ojs-3.5.0-1.tar.gz
sudo mv ojs-3.5.0-1 ojs
sudo mkdir /var/www/ojs-files
sudo chown -R www-data:www-data /var/www/ojs /var/www/ojs-files
# Apache vhost
sudo nano /etc/apache2/sites-available/ojs.conf
sudo a2ensite ojs.conf
sudo systemctl reload apache2
# HTTPS
sudo apt install -y certbot python3-certbot-apache
sudo certbot --apache -d yourdomain.com
sudo certbot renew --dry-run
Download link: OJS 3.5.0-1 (tar.gz)