Most CiviCRM install guides still start by installing WordPress or Drupal, because for fifteen years CiviCRM could only run as a plugin inside a content management system. That assumption stopped holding in January 2025, when CiviCRM Standalone became a supported way to install CiviCRM on its own, and it changes what you should put on a fresh Ubuntu or Debian server. If the CRM is the only thing the box is for, a CMS underneath it is one more application to patch and one more login system to explain to your staff.
This guide installs CiviCRM Standalone on Apache, MariaDB and the distribution’s own PHP behind Let’s Encrypt HTTPS. It covers the web installer, the cv command-line installer and the cron job behind CiviCRM’s scheduled jobs. It also shows the PHP extension and version errors we hit on purpose by installing too little, and how each one is fixed. The behavior described here was checked against CiviCRM 6.20 in November 2026 on fresh Ubuntu 26.04, Ubuntu 24.04 and Debian 13 servers, and every error message below came from those runs.
Why Standalone is the better way to install CiviCRM now
For a server whose job is the CRM, Standalone is the simpler and safer path, and it’s the one we’d pick by default. The official Standalone install guide recommends the release tarball for most sites, and that tarball carries its own login system, its own index.php router and an .htaccess file, so Apache plus PHP plus a database is the whole stack. The old route, the one this page used to describe, installed WordPress first and then CiviCRM as a plugin, which doubled the number of applications that need updates, backups and security fixes.
That does not make the CMS integrations obsolete, because the real choice comes down to where your public forms and pages live. Pick by that, not by habit.
- Standalone: CiviCRM is the whole site and staff log in to it directly. This is what the rest of this guide installs, and it suits a back-office CRM, membership records and case management.
- WordPress, Drupal, Backdrop or Joomla: CiviCRM runs inside an existing website, so donation pages, event sign-ups and member profiles render in the site’s theme with one shared login. If you already run a site, the WordPress install on Ubuntu 26.04 or the Drupal setup with Nginx is the starting point, and CiviCRM goes in afterwards as a plugin or module.
- Drupal 7: still listed, but Drupal itself ended support for it, so we would not start a new CiviCRM site there.
A Standalone site can still collect donations and registrations from a separate public website through CiviCRM’s remote forms, so picking Standalone today doesn’t lock you out of a website later. What you give up is the CMS page builder, which most CRM-only deployments never needed.
What the server needs before you start
CiviCRM’s hosting notes call it a demanding application, and the installer alone creates 163 tables in an empty database. Our lab servers were 2 vCPU and 4 GB RAM cloud VMs, and that’s a sensible floor for a small office:
- Operating system: Ubuntu 26.04 LTS, Ubuntu 24.04 LTS or Debian 13 with sudo access. The commands below are identical on all three except where a section says otherwise.
- Sizing: 2 vCPU, 4 GB RAM and 20 GB disk for a lab or a few thousand contacts. Contact count, mailing volume and imports are what grow the database, so size up before the site holds tens of thousands of records.
- DNS name: an A record such as
crm.example.compointing at the server, with ports 80 and 443 reachable from the internet. Let’s Encrypt’s HTTP-01 check needs port 80, and any DNS provider works. - Its own hostname: CiviCRM Standalone must sit at the root of a domain or subdomain. Installing it under a path such as
https://example.com/crmisn’t supported.
Each distribution ships a different PHP and MariaDB, and all three combinations are inside CiviCRM’s supported range, so nobody needs a third-party PHP repository. The one soft spot is Ubuntu 24.04’s MariaDB 10.11, which is above the 10.2 minimum but below the 11.4 the requirements page now recommends; it installed and ran cleanly in our test. This is what the default packages installed on our servers:
| Item | Ubuntu 26.04 | Ubuntu 24.04 | Debian 13 |
|---|---|---|---|
| PHP | 8.5.4 | 8.3.6 | 8.4.27 |
| MariaDB | 11.8.6 | 10.11.14 | 11.8.6 |
| Apache | 2.4.66 | 2.4.58 | 2.4.69 |
| PCRE JIT under Apache | Blocked by systemd hardening, set pcre.jit = 0 | Works | Works |
apache2 -v as a normal user | Works | Works | Not in PATH, use sudo apache2ctl -v |
| UFW | Preinstalled, inactive | Preinstalled, inactive | Install it first |
The CiviCRM requirements page recommends PHP 8.3, 8.4 or 8.5 for current releases and marks PHP 8.1 as compatible but not recommended because it is past end of life. After install, CiviCRM’s own status check reported that PHP 8.5.4 “meets or exceeds the recommendation of 8.4”, so Ubuntu 26.04’s newer PHP is not a problem. Ubuntu 22.04’s PHP 8.1 is the case to avoid, and we did not test it.
Two values repeat through the rest of the guide, so set them once in the shell you’ll work in. Replace the domain with yours and pick a database password made of letters, digits and hyphens, because it later goes inside a connection URL where other characters need escaping:
export DOMAIN="crm.example.com"
export DB_PASS="Change-This-Db-Pass-2026"
If you log out or open a second terminal, run those two exports again before continuing. Every later command that mentions ${DOMAIN} or ${DB_PASS} reads them from the shell, so an empty variable produces a broken command instead of an obvious error message.
How to install Apache, MariaDB and the PHP extensions CiviCRM needs
Everything comes from the distribution repositories, and the one command below covers Ubuntu 26.04, Ubuntu 24.04 and Debian 13. Bring the package index and the installed packages up to date first.
sudo apt update && sudo apt -y upgrade
Then install the web server, the database, PHP with every extension the installer checks for, and certbot for the certificate later. The list is longer than a bare php install on purpose: php-xml, php-bcmath, php-curl, php-intl and php-zip are hard requirements, and php-mbstring clears a performance warning. The LAMP stack guide for Debian explains the Apache and MariaDB parts in more depth if you want them tuned beyond what CiviCRM needs.
sudo apt install -y apache2 mariadb-server php libapache2-mod-php php-mysql php-xml php-bcmath php-curl php-intl php-zip php-mbstring unzip certbot python3-certbot-apache
Confirm which PHP and MariaDB you actually got. The PHP minor version decides the configuration path in the next step, so it is worth seeing before you type it.
php -v
mariadb --version
On Ubuntu 26.04 the output shows PHP 8.5 and MariaDB 11.8. Ubuntu 24.04 reports PHP 8.3 with MariaDB 10.11, and Debian 13 reports PHP 8.4 with MariaDB 11.8.
PHP 8.5.4 (cli) (built: Oct 19 2026 14:35:18) (NTS)
Copyright (c) The PHP Group
Built by Ubuntu
Zend Engine v4.5.4, Copyright (c) Zend Technologies
with Zend OPcache v8.5.4, Copyright (c), by Zend Technologies
mariadb from 11.8.6-MariaDB, client 15.2 for debian-linux-gnu (x86_64) using EditLine wrapper
CiviCRM’s recommended PHP limits are higher than Debian’s defaults: 256 MB of memory, 240 seconds of execution time and 50 MB uploads for imports and attachments. Rather than editing the packaged php.ini, which an upgrade can overwrite, we put the settings in a small module file and enable it for both Apache and the command line with phpenmod. That matters because the requirements page warns that a CLI PHP set up differently from the web server’s has caused problems, and the cron job later runs through the CLI. Capture the PHP version first so the path works on every distribution:
PHP_VER=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')
sudo vim /etc/php/${PHP_VER}/mods-available/civicrm.ini
Add these lines. On Ubuntu 26.04 also add pcre.jit = 0 as the last line, for the reason explained in the errors section below.
; CiviCRM recommended minimums
memory_limit = 256M
max_execution_time = 240
max_input_time = 120
post_max_size = 50M
upload_max_filesize = 50M
Enable the module, then restart Apache, because mod_php only reads its configuration when the server starts.
sudo phpenmod civicrm
sudo systemctl restart apache2
Check that the new limits are live and that every extension CiviCRM looks for is loaded. Doing it here costs a few seconds, whereas finding a gap later means a blank page or a red installer table.
php -i | grep -E "^(memory_limit|post_max_size|upload_max_filesize)"
php -m | grep -E -i "^(bcmath|curl|intl|zip|mbstring|xml|simplexml|dom|pdo_mysql|mysqli|fileinfo)$"
You should see the three limits and eleven module names. A name missing from the second list is the extension the installer will complain about:
memory_limit => 256M => 256M
post_max_size => 50M => 50M
upload_max_filesize => 50M => 50M
bcmath
curl
dom
fileinfo
intl
mbstring
mysqli
pdo_mysql
SimpleXML
xml
zip
If you are building PHP from a different source, such as the newer releases covered in the PHP 8.5 guide for Ubuntu 26.04, the same extension names apply, only the package prefix changes.
What a missing PHP extension or version problem looks like
To see what readers actually hit, we first installed only php, libapache2-mod-php and php-mysql on the Ubuntu 26.04 server and opened the installer. CiviCRM fails in two different ways depending on which extension is missing, and only one of them is friendly, so it pays to know both before you go looking for a bug.
Blank page with HTTP 500: “Call to undefined function simplexml_load_string()”
Without php-xml, the browser shows an empty page and a 500 status, because CiviCRM reads its own version from an XML file before it can render anything, including the requirements check. The real error is only in Apache’s log:
sudo tail -5 /var/log/apache2/civicrm_error.log
The first line of the stack trace names the missing function. The client address is the browser that made the request, shown here as a documentation address.
[Wed Nov 11 09:03:52.721531 2026] [php:error] [pid 11342:tid 11342] [client 203.0.113.10:56746] PHP Fatal error: Uncaught Error: Call to undefined function simplexml_load_string() in /var/www/civicrm/core/CRM/Utils/System.php:1098\nStack trace:\n#0 /var/www/civicrm/core/CRM/Utils/System.php(1086): CRM_Utils_System::versionXml()\n#1 /var/www/civicrm/core/mixin/lib/pathload.index.php(16): CRM_Utils_System::version()\n#2 /var/www/civicrm/core/CRM/Core/ClassLoader.php(151): require_once('...')\n#3 /var/www/civicrm/civicrm.standalone.php(28): CRM_Core_ClassLoader->register()\n#4 /var/www/civicrm/index.php(33): require_once('...')\n#5 {main}\n thrown in /var/www/civicrm/core/CRM/Utils/System.php on line 1098
The fix is sudo apt install -y php-xml followed by sudo systemctl restart apache2. Restarting Apache is not optional here: mod_php loads extensions once at startup, so a page reload alone keeps failing.
“The PHP extension “bcmath” is not installed.”
Once XML parsing works, the installer runs its own checks and prints a table instead of crashing. On our minimal install it listed ext-bcmath, ext-curl, ext-intl and ext-zip as errors that block installation, and ext-mbstring as a warning. The installer lets you continue without mbstring, but the requirements page lists it among the required core extensions for internationalisation, so install it anyway.

- 1ext-bcmath
- 2ext-zip
- 3ext-mbstring
Each row maps to one package. The fix is the package install from the previous section plus an Apache restart, then the installer’s Refresh button. The database rows in the same table are not a fault at this stage. “Access denied for user ”@’localhost’ (using password: NO)” appears because the installer tests the connection before you have typed any credentials, so those rows clear once the Database fields are filled in.
“preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled” on Ubuntu 26.04
This warning appeared on every page load on Ubuntu 26.04 and never on Ubuntu 24.04 or Debian 13. The cause is the hardened systemd unit Ubuntu 26.04 ships for Apache: it sets MemoryDenyWriteExecute=yes, which forbids the executable memory that PHP’s PCRE JIT compiler asks for. CiviCRM keeps working because PHP falls back to the interpreter, but the error log fills up with one warning per request. You can see the setting with:
systemctl show apache2 -p MemoryDenyWriteExecute
It prints MemoryDenyWriteExecute=yes on Ubuntu 26.04. We would keep the hardening and switch the JIT off instead, by adding pcre.jit = 0 to the civicrm.ini file from the previous section and restarting Apache. In our lab the log had 18 of these warnings before the change and stayed at 18 after it, with pages still loading normally.
“bash: apache2: command not found” on Debian 13
Debian keeps /usr/sbin out of a normal user’s PATH, so apache2 -v fails there even though Apache is installed and running. Use sudo apache2ctl -v or sudo /usr/sbin/apache2 -v, which reported Apache 2.4.69 on our Debian 13 server.
How to create the CiviCRM database in MariaDB
CiviCRM needs one empty database with the utf8mb4 character set and a user that owns it. On Ubuntu and Debian the MariaDB root account authenticates through the Unix socket, so sudo mariadb logs you in without a password and there’s nothing to secure first. The MariaDB guide for Ubuntu covers remote access and tuning if the database will live on another host:
sudo mariadb -e "CREATE DATABASE civicrm CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'civicrm'@'localhost' IDENTIFIED BY '${DB_PASS}'; GRANT ALL PRIVILEGES ON civicrm.* TO 'civicrm'@'localhost'; FLUSH PRIVILEGES;"
Prove the new account can log in with that password before handing it to the installer. A typo here only shows up later as a vague connection error in the installer, so this check saves a round trip.
mariadb -u civicrm -p"${DB_PASS}" -e "SELECT CURRENT_USER(); SHOW DATABASES LIKE 'civicrm';"
The output names the user and the one database it can see. An access-denied error instead means the password in DB_PASS changed since you created the user, so recreate the user before going on. The installer would only report the same failure later, in vaguer words.
CURRENT_USER()
civicrm@localhost
Database (civicrm)
civicrm
We create a dedicated database rather than sharing one with a CMS. CiviCRM’s own docs suggest separate databases once a site grows, and with Standalone there is no CMS database to share anyway, so backups stay a single mariadb-dump civicrm job.
How to download CiviCRM Standalone and set permissions
The download server keeps a stable alias that always points at the current release, so this command never needs editing when a new version ships. The tarball was 35 MB in our run.
cd /tmp
wget https://download.civicrm.org/latest/civicrm-STABLE-standalone.tar.gz
tar xzf civicrm-STABLE-standalone.tar.gz
sudo mv civicrm-standalone /var/www/civicrm
The folder you just moved is the project root. Its layout explains the permissions that follow, because each top-level folder has a different owner and audience:
core/: CiviCRM’s code. The web server only reads it, so it stays owned by root.private/: the settings file with the database password, logs, caches and private uploads. Apache’s user writes here and must never serve it.public/: files CiviCRM writes that browsers do fetch, such as images in mailings and generated assets.ext/: extensions you add. Writable by the web server only if you want to install extensions from the browser.
Keep the code owned by root and give the www-data group write access to the three data folders only. The 2770 mode sets the setgid bit, so files CiviCRM creates later inherit the www-data group instead of breaking cron runs:
cd /var/www/civicrm
sudo chown -R root:root .
sudo chgrp -R www-data private public ext
sudo chmod 2770 private public ext
sudo chmod -R g+rwX private public ext
ls -la /var/www/civicrm
The listing should show drwxrws--- with group www-data on exactly those three folders. Everything else stays readable but not writable by Apache, so a compromised PHP request cannot rewrite CiviCRM’s own code.
total 40
drwxr-xr-x 6 root root 4096 Nov 5 03:52 .
drwxr-xr-x 4 root root 4096 Nov 11 09:03 ..
-rw-r--r-- 1 root root 4722 Nov 5 03:52 .htaccess
-rw-r--r-- 1 root root 1160 Nov 5 03:52 civicrm.standalone.php
drwxr-xr-x 24 root root 4096 Nov 5 03:52 core
drwxrws--- 2 root www-data 4096 Nov 5 03:52 ext
-rw-r--r-- 1 root root 1039 Nov 5 03:52 index.php
drwxrws--- 2 root www-data 4096 Nov 5 03:52 private
drwxrws--- 2 root www-data 4096 Nov 5 03:52 public
The .htaccess at the top is CiviCRM’s own, adapted from Drupal 7, and it does the URL rewriting. Apache only reads it if the virtual host allows overrides, which the next section sets up. Nginx ignores .htaccess entirely, so on Nginx you would start from the example server block in the CiviCRM Standalone repository instead.
How Apache serves CiviCRM, and why private/ needs its own deny rule
The release tarball puts private/ inside the document root, and the .htaccess shipped in the release we tested blocks .sql files, dotfiles and templates but not that folder. The Standalone project added a private/ rule to its .htaccess in October 2026, so newer tarballs may close the folder themselves, but we would keep the virtual host rule anyway because it still holds if .htaccess is ever replaced or overrides are turned off. Without an extra rule, CiviCRM’s log files under private/log/ can be downloaded by anyone who guesses a name, and logs can hold SQL fragments and email addresses. Scanners started probing our lab server within a minute of it getting a public IP, asking for /dump.sql, /backup.sql and /.bash_history, so this is not theoretical. Create the virtual host.
sudo vim /etc/apache2/sites-available/civicrm.conf
Paste this, replacing crm.example.com with your domain. The second Directory block is the deny rule, and it wins over the first because Apache applies the more specific directory last, so private/ stays closed while the rest of the root is served.
<VirtualHost *:80>
ServerName crm.example.com
DocumentRoot /var/www/civicrm
<Directory /var/www/civicrm>
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/civicrm/private>
Require all denied
</Directory>
ErrorLog ${APACHE_LOG_DIR}/civicrm_error.log
CustomLog ${APACHE_LOG_DIR}/civicrm_access.log combined
</VirtualHost>
Enable the site, disable the default page, and turn on the three modules CiviCRM’s .htaccess uses. A full restart rather than a reload is needed because new modules are being loaded:
sudo a2ensite civicrm
sudo a2dissite 000-default
sudo a2enmod rewrite headers expires
sudo apache2ctl configtest
sudo systemctl restart apache2
The config test ends with Syntax OK. The AH00558 line above it only says Apache has no global ServerName, which is harmless for a single-site server.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
If UFW is active, or you want it to be, allow SSH and the Apache profile before enabling it, so the SSH session you are working in survives. The OpenSSH profile only opens port 22, so if your sshd listens on another port, allow that port (for example sudo ufw allow 2222/tcp) before enabling UFW or you lock yourself out. Ubuntu ships UFW inactive. Debian 13 needs sudo apt install -y ufw first:
sudo ufw allow OpenSSH
sudo ufw allow "Apache Full"
sudo ufw --force enable
sudo ufw status
Both rules appear for IPv4 and IPv6. A CRM holds names, addresses and donation history, so the SSH rule is worth narrowing to your office IP later, and the UFW command reference shows how.
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
Apache Full ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Apache Full (v6) ALLOW Anywhere (v6)
A cloud server also needs ports 80 and 443 open in the provider’s firewall or security group, which UFW cannot see. Our lab ran on cloud VMs, and that provider rule was the one that decided whether certbot could reach the server at all.
How to secure CiviCRM with a Let’s Encrypt certificate
Get the certificate before running the installer, because CiviCRM writes its base URL into civicrm.settings.php during install and an http:// URL there means mixed-content problems later. The certbot Apache plugin proves you own the domain over port 80, writes an HTTPS virtual host and adds a redirect from HTTP. Put a mailbox you actually read in EMAIL before running this: certbot sends it when it registers the account, and Let’s Encrypt rejects placeholder domains such as example.com, so copying the line unchanged fails.
export EMAIL="[email protected]"
sudo certbot --apache -d "${DOMAIN}" --non-interactive --agree-tos --redirect -m "${EMAIL}"
Let’s Encrypt ended its expiry emails on June 4, 2025 and no longer stores the address with your account, so renewal monitoring is up to certbot’s timer, not your inbox. If you would rather not give one, replace -m "${EMAIL}" with --register-unsafely-without-email, which is the form our lab servers used after Let’s Encrypt rejected [email protected]. A successful run ends like this.
Requesting a certificate for crm.example.com
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/crm.example.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/crm.example.com/privkey.pem
This certificate expires on 2027-02-09.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
Deploying certificate
Successfully deployed certificate for crm.example.com to /etc/apache2/sites-available/civicrm-le-ssl.conf
Congratulations! You have successfully enabled HTTPS on https://crm.example.com
Certbot copies the whole virtual host, deny rule included, into civicrm-le-ssl.conf. Check that the deny rule really holds on HTTPS and that renewal works. The first command should print 403:
curl -s -o /dev/null -w "%{http_code}\n" "https://${DOMAIN}/private/civicrm.settings.php"
sudo certbot renew --dry-run
We got 403 for the settings file and for a log file under private/log/ on all three servers, and the renewal simulation passed. Certbot also installs a systemd timer that runs the real renewal twice a day.
Congratulations, all simulated renewals succeeded:
/etc/letsencrypt/live/crm.example.com/fullchain.pem (success)
If the simulation fails with a connection error, port 80 is closed somewhere between Let’s Encrypt and the server, and the real renewal will fail the same way about 30 days before expiry.
If the server has no public port 80
An internal CRM behind NAT cannot pass the HTTP-01 check, and certbot then fails with a timeout or connection error from the Let’s Encrypt validators. Use a DNS-01 challenge instead, which proves ownership with a TXT record and needs no inbound traffic. Certbot has a plugin per DNS provider:
| DNS provider | Debian/Ubuntu package |
|---|---|
| Cloudflare | python3-certbot-dns-cloudflare |
| Amazon Route 53 | python3-certbot-dns-route53 |
| DigitalOcean | python3-certbot-dns-digitalocean |
| Google Cloud DNS | python3-certbot-dns-google |
| Linode | python3-certbot-dns-linode |
| OVH | python3-certbot-dns-ovh |
| Your own BIND (RFC 2136) | python3-certbot-dns-rfc2136 |
Each plugin takes a --dns-<provider> flag plus the provider’s credentials (a credentials file for most, the standard AWS or Google Cloud credentials for Route 53 and Cloud DNS), as described in the certbot DNS plugin documentation. We used HTTP-01 for every server in this guide, so we have not shown a DNS-01 run here. When it fails, the usual cause is an API token without permission to edit the zone, not the challenge itself.
How to install the cv command-line tool
cv is CiviCRM’s command-line tool, playing the role WP-CLI plays for WordPress, and the Standalone tarball does not include it. You need it for the cron job whichever installer you use, and for the scripted install described after the web installer. It is a single PHP archive published by the CiviCRM project.
sudo wget -q https://download.civicrm.org/cv/cv.phar -O /usr/local/bin/cv
sudo chmod +x /usr/local/bin/cv
cv --version
It prints its own version, not CiviCRM’s, so do not expect the CiviCRM release number here. Once CiviCRM is installed, sudo -u www-data cv ev "return CRM_Utils_System::version();" run from /var/www/civicrm reports the release, which printed “6.20.0” on all three servers.
cv 0.3.72
Run cv as www-data from now on. CiviCRM’s sysadmin guide recommends running CLI tasks as the web server user, because files another user creates in private/ can leave the web server unable to write them.
How the CiviCRM web installer sets up the site
Open https://crm.example.com/civicrm in a browser. The installer checks requirements live against the form, so it shows red database errors until you fill in the Database block. Enter 127.0.0.1:3306 as the server, civicrm as both database and username, and the password you exported as DB_PASS, then click Refresh under the requirements table:

Once the requirements pass, the error table disappears and an Administrator Account block appears. These are the credentials your staff will use to log in to CiviCRM, and they have nothing to do with the MariaDB user. The installer suggests a random password beside the field, which is a reasonable starting point if you store it in a password manager straight away:

Below it, the Components grid decides which modules start enabled. CiviContribute, CiviEvent, CiviMail, CiviMember and CiviReport are on by default, and CiviCase, CiviPledge and CiviCampaign are off. Each one adds its own menus and screens, so enable only what you’ll use; any of them can be switched on later. Leave the sample data box clear on a real site, then scroll to the bottom and click Install CiviCRM:

The Environment block above the button confirms where the settings file will go, /var/www/civicrm/private/civicrm.settings.php, which is the folder the deny rule protects. The install took 76 seconds on our 2 vCPU Ubuntu 26.04 server, with the button reading “Installing CiviCRM…” the whole time, so do not click it twice. It finishes on this page.

The note about KCFinder is worth reading: images uploaded through the rich-text editors land in public/ and are readable by anyone with the URL, so keep confidential files as contact attachments, which go to private/.
How to install CiviCRM from the command line instead
The web installer is a front end to the same setup library cv core:install uses, so on a server you build with scripts or Ansible the CLI does the identical job without a browser. We used it on the Ubuntu 24.04 and Debian 13 servers. Run it from the project root as www-data, and choose your own admin password.
cd /var/www/civicrm
sudo -u www-data cv core:install --url="https://${DOMAIN}" --db="mysql://civicrm:${DB_PASS}@127.0.0.1:3306/civicrm" -m extras.adminUser=admin -m extras.adminPass='Choose-A-Strong-Admin-Pass' -m [email protected]
It prints four lines and returns. Ours took 44 seconds on Ubuntu 24.04 and 39 seconds on Debian 13, about half the web installer’s time, mostly because there is no browser waiting on the request.
Found code for civicrm-core in /var/www/civicrm/core
Found code for civicrm-setup in /var/www/civicrm/core/setup
Creating file /var/www/civicrm/private/civicrm.settings.php
Creating civicrm_* database tables in civicrm
The official Standalone example still passes --cms-base-url; current cv accepts it but prints “Option –cms-base-url is a deprecated alias for –url (-l)”, so use --url. Confirm the install with an API call that lists the contacts the installer creates.
sudo -u www-data cv api4 Contact.get +s id,display_name,contact_type -T
A fresh site has exactly two contacts, the default organization and the record linked to the admin login, so any other number means the install picked up an old database.
+----+----------------------+--------------+
| id | display_name | contact_type |
+----+----------------------+--------------+
| 2 | Standalone Admin | Individual |
| 1 | Default Organization | Organization |
+----+----------------------+--------------+
From here the CLI-installed and web-installed sites behave the same, and both log in at the same /civicrm/login URL.
What the System Status page tells you after install
Log in at https://crm.example.com/civicrm/login with the administrator account. Fill in the Username and Password fields and click Log In. Standalone keeps its own user table, so this is the account from the installer, not a system or database user.

- 1Username
- 2Password
- 3Log In
You land on CiviCRM Home with the news and resources dashlets, and a System Status popup in the corner. That popup is the installer’s to-do list, and on a fresh install it is never green.

Open Administer, then System Status, or go straight to /civicrm/a/#/status. Our Ubuntu 26.04 install, where we loaded timezone data only after the install, listed five active items. Organization Setup and Configure Default Mailbox are site settings you fill in from the links shown. The two that point at the server are Set-up Cron (“No cron runs have been recorded”) and MySQL Timezone Problem:

The timezone warning means MariaDB cannot convert between named timezones, because Debian and Ubuntu install MariaDB with empty timezone tables. The fix is one command, and it loads the tables from the system’s zoneinfo database:
sudo mariadb-tzinfo-to-sql /usr/share/zoneinfo | sudo mariadb mysql
A quick conversion test shows the difference. Before loading, MariaDB returned NULL for this query, and afterwards it returns the Nairobi time three hours ahead of UTC:
sudo mariadb -e "SELECT CONVERT_TZ('2026-11-11 12:00:00','UTC','Africa/Nairobi') AS nairobi"
The converted value confirms the tables are in place, and the warning clears on the next status check.
nairobi
2026-11-11 15:00:00
The template compile check item is a performance hint for production, set by defining CIVICRM_TEMPLATE_COMPILE_CHECK in civicrm.settings.php, and it’s safe to leave until the site is in daily use. The cron item is the one that matters most, and it gets its own section next.
How CiviCRM scheduled jobs run from cron
CiviCRM never runs its scheduled jobs on its own: something outside it has to call the job runner every few minutes, and on a Linux server that is cron calling cv cron as the web server user. Each call checks every enabled job against its frequency, runs the ones that are due and logs the result. Without it, scheduled mailings never send, membership statuses never update and reminders never go out, and nothing in the UI tells staff why. Run it by hand once to make sure it works as www-data:
sudo -u www-data /usr/local/bin/cv cron --cwd=/var/www/civicrm
Success is silent with exit code 0, so no output is good news here. Then schedule it every 5 minutes, the interval CiviCRM’s sysadmin guide uses in its example, in a file under /etc/cron.d, which names the user on the line so nothing runs as root. --quiet keeps cron from mailing you the output of every successful run:
echo "*/5 * * * * www-data /usr/local/bin/cv cron --cwd=/var/www/civicrm --quiet" | sudo tee /etc/cron.d/civicrm
After five minutes, confirm cron actually started it. The cron daemon logs every command it launches, so the journal is the first place to look.
journalctl -t CRON --since today --no-pager | grep "cv cron"
Each run is one line, owned by www-data. This is the latest one from our Ubuntu 26.04 server:
Nov 11 09:55:01 node-a CRON[19141]: (www-data) CMD (/usr/local/bin/cv cron --cwd=/var/www/civicrm --quiet)
Cron starting the command does not prove CiviCRM ran anything, so check from CiviCRM’s side too. The job log records every run, including the empty ones where nothing was due:
cd /var/www/civicrm
sudo -u www-data cv api4 JobLog.get +s run_time,name,description +o "id DESC" +l 4 -T
Because the first run after install already executed the daily and weekly jobs, a later cron run usually finds nothing due and logs only a start and a finish line. That is a healthy result, and it is what our Ubuntu 26.04 server logged at 09:55:
+----+---------------------+------+-------------------------------------+
| id | run_time | name | description |
+----+---------------------+------+-------------------------------------+
| 10 | 2026-11-11 09:55:02 | | Finishing scheduled jobs execution. |
| 9 | 2026-11-11 09:55:01 | | Starting scheduled jobs execution |
| 8 | 2026-11-11 09:45:02 | | Finishing scheduled jobs execution. |
| 7 | 2026-11-11 09:45:02 | | Starting scheduled jobs execution |
+----+---------------------+------+-------------------------------------+
Only two of the 22 jobs are enabled on a new site, which surprises people who expected newsletters to send on their own. The same view in the browser is Administer, System Settings, Scheduled Jobs, where the Last Run column shows when each job last ran (a daily job moves once a day, not on every cron call) and View Log shows the history above, including the per-job success lines from the first run:

- 1Last Run
- 2View Log
Enable the jobs that match the components you use. For CiviMail that means Send Scheduled Mailings, Fetch Bounces and Process Inbound Emails. Memberships need Update Membership Statuses, and events need Update Participant Statuses and Send Scheduled Reminders. “Always” jobs run on every cron call, so the 5-minute interval is also the worst-case delay for a scheduled mailing. The terminal view of the same check, from the Ubuntu 26.04 server, shows the cron line and the two log entries of its latest run.

Back on the System Status page, Set-up Cron turns into “Cron Running OK” with the time of the last run, and the timezone warning is gone. What remains are the site settings you fill in yourself.

With the status page clean, the CRM is ready for real records. Contacts, then New Individual, opens the contact form; we added one test contact with an email and phone number, and the saved record shows the tabs every other component hangs off, from Contributions to Relationships:

Relationships are the part the product is named for: link that contact to an organization as an employee, or to another person as a household member, and every donation, event and membership on either record shows up in context.
Common misconceptions about installing CiviCRM
Several habits from older CiviCRM guides, including the earlier version of this page, no longer match how the software behaves. These are the ones our runs contradicted:
- “You need WordPress or Drupal first.” Not since Standalone became supported in January 2025, so you can skip a whole application. A CMS is only worth it when CiviCRM’s public pages must live inside an existing website.
- “Install mcrypt from PECL.” Older guides built the mcrypt extension by hand. CiviCRM’s extension list no longer includes it, and none of our three installs needed it.
- “Editing the CLI php.ini is enough.” Apache’s mod_php reads its own
php.ini, so limits set only for the CLI never reach the web installer. Enabling one module file withphpenmodsets both. - “Cron can run as root.” CiviCRM’s sysadmin guide says to run scheduled jobs as the web server user, because runs under different users can leave files in
private/the web server can’t write. Our cron line nameswww-datafor that reason. - “A blank page means a broken download.” In our runs it meant a missing
php-xml. Read the Apache error log before re-downloading anything.
The pattern behind most of these is that CiviCRM is now a self-contained PHP application with its own router, login and job runner. That means the questions that matter are the ordinary ones for any PHP app on Debian or Ubuntu: which extensions are loaded under Apache, who owns the writable folders, and what calls the job runner. Get those three right and the install is predictable on all three distributions.