How to Install OroCRM 7.0 Community Edition on Ubuntu 26.04
Install OroCRM 7.0 Community Edition on Ubuntu 26.04 with PHP-FPM 8.5, PostgreSQL, Nginx and Supervisor, including cron, message consumers and WebSockets.
This guide installs OroCRM 7.0 Community Edition on Ubuntu 26.04 LTS with PHP-FPM 8.5, PostgreSQL, Nginx and Supervisor. At the end you have a working CRM at your own domain, with the cron job, message-queue consumers and WebSocket server that Oro needs running in the background.
OroCRM is still developed by Oro Inc. as an open-source application on top of OroPlatform, but its requirements have moved a long way from what older tutorials describe. CentOS 7 reached end of life on 30 June 2024, and Oro 7.0 requires PHP 8.5, PostgreSQL 17.6 or newer and Node.js 24; MySQL is no longer part of the documented stack. Oro's own environment guide for 7.0 targets Ubuntu 26.04, so that is the platform used here.
Requirements
- Ubuntu 26.04 LTS with a
sudouser (deployin the examples). Oro's minimum for a single server is 2 CPU cores and 2 GB of RAM on SSD storage; installation is far more comfortable with 4 GB. - A domain such as
crm.example.compointing at the server. - From Oro's system requirements for 7.0: PHP 8.5 or newer with the
ctype,curl,fileinfo,gd,intl,mbstring,sodium,openssl,pgsql,simplexml,tokenizer,xml,zip,imap,soap,bcmathandldapextensions; PostgreSQL 17.6 or newer; Node.js 24.11 or newer (below 25); pnpm 12.9.1 or newer (below 13); Nginx or Apache; Supervisor.
Step 1: Install PHP, PostgreSQL, Nginx and Supervisor
sudo apt update
sudo apt -y install php8.5-fpm php8.5-cli php8.5-xml php8.5-soap php8.5-gd php8.5-zip php8.5-intl php8.5-mbstring php8.5-curl php8.5-bcmath php8.5-ldap php8.5-pgsql
sudo apt -y install postgresql nginx supervisor git unzip acl curlCheck that the versions meet the requirements before going further:
php -v
psql --versionApply the PHP settings Oro recommends to PHP-FPM, raise the memory limit for the command line, and restart PHP-FPM:
echo -e "memory_limit = 2048M \nmax_input_time = 600 \nmax_execution_time = 600 \nrealpath_cache_size=4096K \nrealpath_cache_ttl=600 \nopcache.enable=1 \nopcache.enable_cli=0 \nopcache.memory_consumption=512 \nopcache.interned_strings_buffer=32 \nopcache.max_accelerated_files=32531 \nopcache.save_comments=1" | sudo tee -a /etc/php/8.5/fpm/php.ini
echo -e "memory_limit = 2048M" | sudo tee -a /etc/php/8.5/cli/php.ini
sudo systemctl restart php8.5-fpmAlso set date.timezone in both php.ini files (for example date.timezone = UTC); Oro requires it.
Step 2: Install Node.js, pnpm and Composer
Oro builds its front-end assets during installation. Install Node.js 24 from the NodeSource repository and pnpm from npm:
curl -sL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt -y install nodejs
sudo npm install -g pnpm@latest-12
node -v && pnpm -vInstall Composer 2:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/bin/composerStep 3: Create the database
sudo -u postgres createuser --pwprompt oro_db_user
sudo -u postgres createdb --owner=oro_db_user oro_dbNote the password you enter; it goes into the application's connection string in the next step.
Step 4: Download OroCRM
Create the application directory, owned by your own user, and fetch the Community Edition with Composer. Replace 7.0.0 with the newest 7.0 tag listed in the oroinc/crm-application repository:
sudo mkdir -p /var/www/orocrm
sudo chown deploy:deploy /var/www/orocrm
composer create-project oro/crm-application /var/www/orocrm 7.0.0 -n
cd /var/www/orocrmThis downloads several hundred packages and takes a while. If GitHub rate-limits the downloads, add a personal token with composer config -g github-oauth.github.com <token> and run composer install --prefer-dist --no-dev inside the directory.
Oro reads its infrastructure settings from environment variables. Local overrides belong in .env-app.local, which is not committed. Create that file in /var/www/orocrm with your database connection (use the version printed by psql --version for serverVersion):
ORO_DB_DSN=postgres://oro_db_user:YourDbPassword@127.0.0.1:5432/oro_db?sslmode=disable&charset=utf8&serverVersion=18.0Step 5: Run the installer
Run the installer as your own user from the application directory. Set your own administrator name, e-mail and password:
cd /var/www/orocrm
php bin/console oro:install --env=prod --timeout=2000 -n \
--application-url=http://crm.example.com \
--organization-name="Example Ltd" \
--user-name=admin --user-email=admin@example.com \
--user-firstname=Ada --user-lastname=Admin \
--user-password='ChangeThisPassword' \
--sample-data=nThe installer creates the schema, loads fixtures and builds the assets; expect ten minutes or more. Use --sample-data=y only on a test system.
Give both your user and the web server user write access to the runtime directories with ACLs:
sudo setfacl -dR -m u:www-data:rwX -m u:$(whoami):rwX var/{sessions,cache,data,logs}
sudo setfacl -R -m u:www-data:rwX -m u:$(whoami):rwX var/{sessions,cache,data,logs}
sudo setfacl -dR -m u:www-data:rwX -m u:$(whoami):rwX public/{media,js}
sudo setfacl -R -m u:www-data:rwX -m u:$(whoami):rwX public/{media,js}Step 6: Configure Nginx
Create /etc/nginx/sites-available/orocrm. The document root is the public directory, and only Oro's front controllers are passed to PHP-FPM:
server {
listen 80;
server_name crm.example.com;
root /var/www/orocrm/public;
index index.php;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/(index|index_dev|config|install)\.php(/|$) {
fastcgi_pass unix:/run/php/php8.5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
fastcgi_buffers 64 64k;
fastcgi_buffer_size 128k;
}
location ~* ^[^(\.php)]+\.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js)$ {
access_log off;
expires 1h;
add_header Cache-Control public;
}
error_log /var/log/nginx/crm.example.com_error.log;
access_log /var/log/nginx/crm.example.com_access.log;
}sudo ln -s /etc/nginx/sites-available/orocrm /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginxStep 7: Cron, message consumers and WebSocket server
Oro schedules its own jobs through one cron entry that must run every minute. Add it to the web server user's crontab with sudo crontab -u www-data -e:
*/1 * * * * php /var/www/orocrm/bin/console oro:cron --env=prod > /dev/nullThe message-queue consumers and the WebSocket server are long-running processes, kept alive by Supervisor. On Ubuntu, create /etc/supervisor/conf.d/orocrm.conf:
[program:oro_web_socket]
command=php ./bin/console gos:websocket:server --env=prod
numprocs=1
autostart=true
autorestart=true
directory=/var/www/orocrm
user=www-data
redirect_stderr=true
[program:oro_message_consumer]
command=php ./bin/console oro:message-queue:consume --env=prod
process_name=%(program_name)s_%(process_num)02d
numprocs=5
autostart=true
autorestart=true
directory=/var/www/orocrm
user=www-data
redirect_stderr=truesudo systemctl restart supervisor
sudo supervisorctl statusAll six processes should show RUNNING. On a 2 GB server, lower numprocs for the consumer to 1 or 2.
Step 8: Sign in and switch to HTTPS
Open http://crm.example.com/ and sign in with the administrator account from Step 5. With the default settings the browser connects to the WebSocket server directly on port 8080, so that port must be reachable while you run plain HTTP.
For production, obtain a certificate (for example with Certbot's Nginx plugin), set fastcgi_param HTTPS on; in the PHP location and proxy the path /ws to the WebSocket server on 127.0.0.1:8080 with the WebSocket upgrade headers, then put the HTTPS-mode WebSocket variables Oro documents into .env-app.local:
ORO_WEBSOCKET_SERVER_DSN=//0.0.0.0:8080
ORO_WEBSOCKET_FRONTEND_DSN=//*:443/ws
ORO_WEBSOCKET_BACKEND_DSN=tcp://127.0.0.1:8080Change the application URL under System > Configuration to the https:// address, clear the cache and restart the background processes:
cd /var/www/orocrm
php bin/console cache:clear --env=prod
sudo supervisorctl restart allOro's installation guide and system requirements are the reference for every option used here.
Frequently asked questions
Can OroCRM 7.0 use MySQL or MariaDB?
The 7.0 system requirements list only PostgreSQL (17.6 or newer for the Community Edition). Plan a new installation on PostgreSQL.
Do I need Redis, Elasticsearch or RabbitMQ?
Not for the Community Edition. It keeps the message queue and the search index in PostgreSQL. Redis is an optional cache; Elasticsearch and RabbitMQ are requirements of the Enterprise Edition.
Jobs stay pending and e-mails are not sent. What is wrong?
Almost always the consumers or the cron entry. Check sudo supervisorctl status, confirm the crontab line exists for www-data, and read var/logs/prod.log in the application directory.
Why does the installer run out of memory?
The command-line PHP memory_limit is separate from the PHP-FPM one. Oro's guide sets 2048M for the CLI; make sure the server has that much free memory or add swap before running oro:install.