How to Install DreamFactory on AlmaLinux 9 or Rocky Linux 9
Install the open-source DreamFactory API platform on AlmaLinux 9 or Rocky Linux 9 with the official installer, then sign in and create your first API.
DreamFactory generates a documented REST API on top of a database or another data source and adds API keys, roles and rate limits around it. This guide installs the open-source edition on AlmaLinux 9 or Rocky Linux 9 with the project's own installer, which sets up Nginx, PHP, a MariaDB system database and the application in /opt/dreamfactory. At the end you can sign in to the admin interface and connect your first database.
CentOS 7 reached end of life on 30 June 2024. The manual procedure from that era (Apache, a hand-added MariaDB repository, PHP 7 and Composer steps typed one by one) is replaced by a single installer that the DreamFactory repository states runs on RHEL, CentOS, Oracle Linux, AlmaLinux and Rocky Linux 8, 9 and 10, Debian 12 and 13, Fedora 39 and later, and Ubuntu 22 and 24.
Requirements
- A freshly installed AlmaLinux 9 or Rocky Linux 9 server. The installer expects DreamFactory to be the only web application on the machine; on a server that already runs Nginx, Apache or MySQL it skips those steps and leaves the configuration to you.
- A user with
sudorights. The examples usedeploy. - At least 8 GB of free space on the root filesystem. The installer checks this and stops if there is less.
- Port 80 free and reachable.
Step 1: Update the system and enable EPEL
sudo dnf -y update
sudo dnf -y install wget
The DreamFactory installation guide tells RHEL-family users to enable the EPEL repository before running the installer:
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
Reboot if the update installed a new kernel.
Step 2: Download the installer
The installer is a self-extracting script kept in the installers directory of the DreamFactory repository:
cd ~
wget https://github.com/dreamfactorysoftware/dreamfactory/raw/master/installers/dfsetup.run
chmod +x dfsetup.run
Step 3: Run the installer
sudo ./dfsetup.run
The first menu offers three modes:
| Choice | What it does |
|---|---|
0 Recommended install | Nginx, MariaDB as the system database, PHP with the base extensions and connectors |
1 Custom install | Lets you pick options by number: Apache instead of Nginx (4), MariaDB (5), a specific DreamFactory version (6), debug logging (8), plus Oracle, IBM DB2, Cassandra and Trino drivers that need vendor files you supply |
9 Upgrade | Upgrades an existing DreamFactory installation |
Press Enter to accept the recommended install. The installer prints a summary (operating system, PHP target, web server, system database) and waits for another Enter before it changes anything. If you want a full log, choose the custom mode and enter 0,5,8; the log is written to /tmp/dreamfactory_installer.log and you can follow it from a second terminal:
tail -f /tmp/dreamfactory_installer.log
During the run you are asked for the following. Have the answers ready and write them down:
- Which user installs DreamFactory. The script must be started with
sudo, but it advises against running the Composer steps as root. Choose the option to provide a user name and enterdeploy. - A MariaDB root password. MariaDB is installed for you; pick a strong password.
- The system database. A database name (for example
dreamfactory), a database user (for exampledfadmin) and a password for that user. This database holds DreamFactory's own configuration: services, roles, users and API keys. - Commercial Composer files. If the installer asks whether to use them, answer
nfor the open-source edition. When it finds no licence files it continues with the open-source Composer files on its own. - The first administrator. Name, e-mail address and password for the account you will use in the web interface.
Installation takes several minutes. It ends with the message that DreamFactory has been installed in /opt/dreamfactory.
If a stage fails, fix the cause and start sudo ./dfsetup.run again. The installer records which phases are complete and offers to resume from the first incomplete one.
Step 4: Open the firewall and sign in
Allow HTTP through firewalld:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reload
Open http://203.0.113.10/ in a browser, replacing the address with your server's. You are taken to the login page of the admin application; sign in with the administrator e-mail address and password from the previous step.
Check the services from the shell if the page does not load:
sudo systemctl status nginx
sudo systemctl status mariadb
curl -I http://127.0.0.1/
Step 5: Create your first API
In the admin interface, add a database service: choose the database type, give the service a short name (it becomes part of the URL), and enter host, port, database name and credentials. DreamFactory reads the schema and exposes tables under /api/v2/<service-name>/_table/, with interactive API documentation generated for the service.
Requests need an API key. Create a role that grants access to the service, create an app that uses that role, and send the app's key in the X-DreamFactory-API-Key header. Do not use the administrator account for application traffic.
If the database you connect to is on another host, that host must accept connections from this server. The installer already sets the SELinux booleans that let the web server open outbound network and database connections.
Configuration and maintenance
- Settings file. The application reads
/opt/dreamfactory/.env. To change the system database connection interactively, runphp artisan df:envfrom/opt/dreamfactoryas the installation user. - HTTPS. The installer configures plain HTTP on port 80. API keys and passwords travel in every request, so add a TLS certificate to the Nginx server block (or place a TLS-terminating proxy in front) before you send real traffic, and open the
httpsservice infirewalld. - Backups. Dump the system database with
mariadb-dumpand keep a copy of/opt/dreamfactory/.env. TheAPP_KEYin that file encrypts stored service credentials; a database restored without the matching key cannot decrypt them. - Upgrades. Back up first, download the current
dfsetup.runand choose9in the first menu.
Frequently asked questions
Can I run DreamFactory in Docker instead?
Yes. The project maintains a Compose setup in its df-docker repository: clone https://github.com/dreamfactorysoftware/df-docker.git, then run docker compose build and docker compose up -d in that directory. It starts DreamFactory with MySQL and Redis on port 80 and asks you to create the administrator on first visit. Its README explains how to pin APP_KEY so a rebuilt container can still read its data.
What is not included in the open-source edition?
The installer builds the open-source edition unless you supply commercial Composer files and a licence key. Drivers for Oracle, IBM DB2 and Trino additionally need vendor packages you download yourself, and the release notes mark several newer packages, among them the AI and agent components, as commercial only.
Can I use PostgreSQL or SQLite for the system database?
Yes. DreamFactory supports MySQL or MariaDB, PostgreSQL, SQLite and SQL Server for its system database. Use the custom install without option 5 and choose the type when asked. SQLite needs no preparation; for the others the database and a user with rights to create tables must exist before you start the installer.
Does the installer work on Ubuntu 26.04?
The installer checks the release and currently accepts only Ubuntu 22 and 24, so it exits on 26.04. Use one of the listed releases or the Docker setup there.