Download Ubuntu from ubuntu.com and install it on your machine or virtual machine. You don't need to install any special packages during setup — VuFind® will install everything it needs.
Once installed, open a Terminal using Ctrl + Alt + T. All commands in this guide are run in the terminal.
Always update your system first. This prevents compatibility issues with outdated packages.
sudo apt-get update
sudo apt-get dist-upgrade
dist-upgrade variant is smarter than a plain upgrade — it can add or remove packages if needed to resolve dependencies.When prompted, press Y and Enter to confirm. Once done, reboot your system:
sudo shutdown -r now
shutdown powers down the system. The -r flag means reboot instead of just shutting off. now tells it to do it immediately rather than after a delay. This ensures all installed updates take effect.Run this command to download VuFind® v11.0.2 directly to your machine:
wget https://github.com/vufind-org/vufind/releases/download/v11.0.2/vufind_11.0.2.deb
wget is a command-line download tool built into Ubuntu. It connects to the given URL and saves the file to your current folder. You'll see a progress bar while it downloads. The file vufind_11.0.2.deb will appear in whatever directory you ran the command from.By default, VuFind® will automatically install the default PHP, Java JDK (usually JDK 11), and MySQL when you install the .deb. You can skip this step if you're happy with those defaults.
If you have preferences, install them first:
sudo apt-get install openjdk-17-jdk
apt-get install is Ubuntu's standard command for installing software. Running this before the VuFind® package ensures VuFind® picks up JDK 17 instead of the older default JDK 11.sudo apt-get install mariadb-server
Install the downloaded package:
sudo dpkg -i vufind_11.0.2.deb
dpkg is Ubuntu's low-level package installer. The -i flag means install. This unpacks the VuFind® .deb file and places all its files into the correct system directories — similar to running a setup wizard on Windows.sudo apt-get install -f
-f flag stands for fix-broken. When dpkg fails due to missing dependencies, this command automatically finds and installs all the missing pieces, then re-attempts the original installation. Think of it as an auto-repair tool.After installation completes, reload your environment variables so the shell knows where VuFind® is installed:
source /etc/profile
source reads a file and executes it in the current terminal session. /etc/profile is the global shell configuration file where VuFind® adds its environment variables (like VUFIND_HOME). Without this, your terminal wouldn't know where to find VuFind® commands until you log out and back in.Step 6a: Log into MySQL as root (no password needed yet):
sudo mysql -uroot
mysql is the command-line client for MySQL. The -uroot flag means login as the user named "root". Using sudo bypasses the password requirement since the root MySQL account on a fresh install uses OS-level authentication. You'll enter the MySQL prompt (it shows mysql>) where you can run database commands.Step 6b: Inside MySQL, run the appropriate command for your Ubuntu version to enable password-based login. Choose your version:
UPDATE mysql.user SET plugin='caching_sha2_password' WHERE User='root'; FLUSH PRIVILEGES;
auth_socket) which blocks web apps like VuFind® from connecting. Switching to caching_sha2_password enables standard password-based login.Then type exit to leave MySQL. Now run the security setup:
sudo /usr/bin/mysql_secure_installation
Y to each one.If a root password was not set during the above process, set one manually. Log back in with sudo mysql -uroot and run:
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password by 'your-password-here';
your-password-here with a strong password of your choice. Make sure to remember it — VuFind®'s web installer will ask for it in Step 8.Edit the MySQL config file to apply the authentication plugin permanently:
# Open the config file
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
# Scroll to the bottom and add this line:
authentication_policy=caching_sha2_password
nano is a beginner-friendly text editor that runs inside the terminal. It opens the specified config file for editing. Use the arrow keys to navigate. After making changes, press Ctrl+O to save and Ctrl+X to exit.caching_sha2_password method — the authentication type that PHP (and therefore VuFind®) supports on Ubuntu 24+.UPDATE mysql.user SET plugin='mysql_native_password' WHERE User='root'; FLUSH PRIVILEGES;
mysql_native_password — the classic password method supported by PHP on Ubuntu 20–23. This allows VuFind®'s web installer to connect to your database using a username and password.Then type exit and run security setup:
sudo /usr/bin/mysql_secure_installation
Edit MySQL config to lock in native password authentication. Add to bottom of mysqld.cnf:
authentication_policy=mysql_native_password
Step 6c: Restart MySQL so changes take effect:
sudo systemctl restart mysql
systemctl is Ubuntu's service manager. The restart command stops and then starts the MySQL service. This is required to apply any config file changes you made — MySQL reads its configuration only when it starts up.Navigate to the VuFind® directory and start the Solr search index:
cd /usr/local/vufind/
./solr.sh start
cd stands for Change Directory. This moves your terminal's working location into the VuFind® installation folder. All subsequent commands will run relative to this folder unless you change directories again../ means "run a script from the current directory". solr.sh is a shell script provided by VuFind® that manages the Apache Solr search engine. The start argument launches Solr as a background process — it powers all the search functionality on your VuFind® site.Open a web browser and visit:
http://localhost/vufind/Install/Home
You should see the Auto Configure screen. Some items will be marked "Failed" with a "Fix" link next to them. Click each Fix link one at a time and follow the on-screen instructions.
For Database Setup: You'll be asked for the MySQL root password you created in Step 6. Enter it to let VuFind® create its own database.
Once all items show "OK", click "Disable Auto Configuration" to lock down the installer.
VuFind® is now running, but it has no records yet. You'll need to import library data (MARC records or other formats) to make it useful.
Visit the Indexing page in VuFind® documentation for full instructions on importing records:
https://vufind.org/wiki/indexing
10a — Lock down configuration files
Once the web-based auto-configuration is complete, remove Apache's write access so attackers cannot modify your config through the web:
sudo chown -R root:root /usr/local/vufind/local/config
root. Apache (which runs as www-data) can now only read these files, not write to them. The -R flag applies this recursively to every file inside.10b — Create a dedicated VuFind® system account
Running VuFind® commands as root is risky. Create a dedicated system account so command-line utilities and cron jobs run with limited privileges:
sudo useradd -r -s /usr/sbin/nologin -U vufind
useradd creates a new Linux user. -r marks it as a system account (no home directory, low UID). -s /usr/sbin/nologin sets its shell to a no-login shell so nobody can log in as this user interactively. -U creates a matching group named vufind. This is the safest way to run server-side applications.Now transfer VuFind® file ownership to this account, keeping the Apache cache owned by www-data:
sudo chown -R vufind:vufind $VUFIND_HOME
sudo chown -R www-data:www-data $VUFIND_LOCAL_DIR/cache
sudo chown -R vufind:vufind $VUFIND_LOCAL_DIR/cache/cli
vufind user. This limits what the application can access on the broader filesystem.vufind user its own CLI cache area, used by command-line import and utility scripts separate from the web cache.10c — Lock down Solr (critical)
Solr's admin interface on port 8983 must never be publicly accessible. Block it with UFW and create a dedicated Solr user:
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw deny 8983/tcp
sudo ufw enable
y.Now create a dedicated Solr user and transfer Solr file ownership to it:
sudo useradd -r -s /usr/sbin/nologin -U solr
sudo chown -R solr:solr $VUFIND_HOME/solr
solr with no login shell. Running Solr as its own restricted user means that even if Solr is compromised, the attacker's access to your wider system is limited.solr user so Solr can read/write its own files when it runs under that account.Start Solr under the dedicated user account:
sudo su solr -s /usr/bin/bash -c "cd $VUFIND_HOME && ./solr.sh start"
su switches to a different user to run a command. The -s /usr/bin/bash specifies which shell to use (needed because we set nologin as the default). The -c flag passes the command to execute as that user. This launches Solr under the restricted solr account.10d — Enable SSL / HTTPS
If your VuFind® site accepts passwords or sensitive patron data, it must run over HTTPS. Install Certbot to get a free Let's Encrypt certificate:
sudo apt-get install certbot python3-certbot-apache
sudo certbot --apache
To force all HTTP traffic to redirect to HTTPS, add these lines above the other RewriteRules in your httpd-vufind.conf:
# Force SSL — add above other RewriteRules
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
10e — Lock down the Admin Panel
VuFind®'s admin module at /Admin/Home must not be left open to the public. Restrict access using VuFind®'s permission system. In your local permissions.ini:
# Restrict admin panel to specific IPs only
[access.AdminModule]
ipRange[] = 127.0.0.1
ipRange[] = 192.168.1.0/24
permission = access.AdminModule
ipRange entries, only requests coming from those IP addresses will be granted access. Replace the example IPs with your institution's actual IP range. Alternatively, set System/admin_enabled = false in config.ini to disable the admin panel entirely.10f — Secure User Credentials
VuFind® can apply additional hashing and encryption to protect stored user passwords. Enable these settings in config.ini under the [Authentication] section. You can also enable this through the auto-configuration pages before locking them down:
# Enable stronger hashing for stored passwords
[Authentication]
hash_passwords = true
# Enforce minimum password complexity
minimum_password_length = 8
password_pattern = (?=.*\d)(?=.*[a-z])(?=.*[A-Z]).+
10g — Enable Rate Limiting
VuFind® has a built-in rate limiter to throttle bots and prevent login brute-force attacks. Enable it in config.ini:
# Enable rate limiting
[RateLimiter]
enabled = true
10h — Configure a Content Security Policy (CSP)
A Content Security Policy header tells browsers which sources of scripts, styles, and assets to trust — blocking cross-site scripting (XSS) attacks. Configure it in your local contentsecuritypolicy.ini:
# Enable CSP (supported from VuFind® 7.0+)
[CSP]
enabled = true
report_only = true ; set to false to enforce, true to just log violations
true to run in "report only" mode — violations are logged but not blocked. Once you've confirmed nothing legitimate is being blocked, switch to false to enforce the policy. See the CSP documentation for full options.1. Install Apache:
sudo apt-get -y install apache2
sudo a2enmod rewrite
sudo /etc/init.d/apache2 force-reload
-y flag auto-answers "yes" to any confirmation prompts so the install runs without interruption.a2enmod stands for Apache 2 Enable Module. The rewrite module allows Apache to rewrite URLs — VuFind® uses this to create clean, readable URLs like /vufind/Search/Results instead of long query strings.rewrite module immediately. force-reload is more aggressive than a regular reload — it restarts child processes to apply module changes.2. Install MySQL:
sudo apt-get -y install mysql-server
-y flag skips the confirmation prompt.3. Install PHP and required modules:
sudo apt-get -y install libapache2-mod-php php-mbstring php-pear php php-dev php-gd php-intl php-json php-ldap php-mysql php-xml php-soap php-curl
4. Install Java JDK:
sudo apt-get -y install default-jdk
default-jdk picks whatever Java version Ubuntu recommends for your OS release (usually JDK 17 on Ubuntu 24).Download and extract:
cd /tmp
wget https://github.com/vufind-org/vufind/releases/download/v11.0.2/vufind-11.0.2.tar.gz
tar -xzvf vufind-11.0.2.tar.gz
sudo mv vufind-11.0.2 /usr/local/vufind
/tmp — a temporary folder Ubuntu clears on reboot. A good place to download files you'll install and then won't need to keep around..tar.gz compressed file) directly from GitHub into the current directory.tar is the archive tool. The flags mean: -x extract, -z decompress gzip, -v show progress verbosely, -f use the specified file. This unpacks all VuFind® files into a new folder called vufind-11.0.2.mv moves (renames) a file or folder. This relocates the extracted VuFind® folder into /usr/local/vufind — the standard installation path VuFind® expects to live at.Run the install script:
cd /usr/local/vufind
php install.php
Set file permissions:
sudo chown -R www-data:www-data /usr/local/vufind/local/cache
sudo chown -R www-data:www-data /usr/local/vufind/local/config
chown changes who owns a file or folder. www-data is the Linux user that Apache runs as. Giving Apache ownership of the cache and config directories lets VuFind® write cache files and save configuration changes during setup — without this, you'd get "permission denied" errors.Link VuFind® to Apache and reload:
sudo ln -s /usr/local/vufind/local/httpd-vufind.conf /etc/apache2/conf-enabled/vufind.conf
sudo /etc/init.d/apache2 reload
ln -s creates a symbolic link — a shortcut that points one file path to another. This tells Apache to load VuFind®'s web server config (httpd-vufind.conf) as if it were stored directly inside Apache's config folder. No need to copy files./vufind URL path available in the browser.Set environment variables:
sudo sh -c 'echo export JAVA_HOME=\"/usr/lib/jvm/default-java\" > /etc/profile.d/vufind.sh'
sudo sh -c 'echo export VUFIND_HOME=\"/usr/local/vufind\" >> /etc/profile.d/vufind.sh'
sudo sh -c 'echo export VUFIND_LOCAL_DIR=\"/usr/local/vufind/local\" >> /etc/profile.d/vufind.sh'
source /etc/profile.d/vufind.sh
sh -c runs a shell command as a string. echo export VAR="value" writes an environment variable definition, and >> appends it to the file. The three commands create a new file at /etc/profile.d/vufind.sh that sets JAVA_HOME, VUFIND_HOME, and VUFIND_LOCAL_DIR — paths that VuFind®'s scripts need to locate Java and its own files.