How to Manually Install Phabricator on Ubuntu 24.04 LTS
This guide explains how to manually install and configure Phabricator on an Ubuntu 24.04 LTS server.
The instructions are intended for beginners and show the commands that can be manually executed in the Ubuntu terminal.
1. Requirements
Before installing Phabricator, you should have:
- Ubuntu 24.04 LTS
- A server with at least 2 GB RAM
- SSH access
- A user account with sudo privileges
- A server IP address
- A domain name is recommended but not required
Example server:
102.202.44.175
2. Connect to the Ubuntu Server
From your local computer, connect to the Ubuntu server using SSH.
ssh username@SERVER_IP
Example:
ssh eeewnsfl@102.202.44.175
Replace eeewnsfl and 102.202.44.175 with your actual Ubuntu username and server IP address.
3. Update Ubuntu
The first step is to update the Ubuntu package lists and install available updates.
sudo apt update sudo apt upgrade -y
4. Install Required Packages
Install the basic packages required to download and build Phabricator.
sudo apt install -y \ git \ curl \ wget \ unzip \ vim \ nano \ ca-certificates \ software-properties-common
5. Install Apache
Apache will be used as the web server that allows users to access Phabricator through a browser.
sudo apt install -y apache2
Start Apache:
sudo systemctl enable --now apache2
Check the Apache service:
sudo systemctl status apache2
If Apache is working, you should see:
Active: active (running)
6. Install MySQL/MariaDB
Phabricator requires a MySQL-compatible database server. Ubuntu 24.04 can use MariaDB.
sudo apt install -y mariadb-server mariadb-client
Enable and start MariaDB:
sudo systemctl enable --now mariadb
Check MariaDB:
sudo systemctl status mariadb
7. Secure MariaDB
Run the MariaDB security configuration tool:
sudo mariadb-secure-installation
Follow the questions shown on the screen. For a new installation, you can normally:
- Set a database root password
- Remove anonymous users
- Disable remote root login
- Remove the test database
- Reload privilege tables
8. Configure MariaDB for Phabricator
Create a MariaDB configuration file for Phabricator:
sudo nano /etc/mysql/mariadb.conf.d/99-phabricator.cnf
Paste the following:
[mysqld] max_allowed_packet=128M sql_mode="" innodb_file_per_table=ON innodb_buffer_pool_size=1G
Save the file:
- Press CTRL + O
- Press ENTER
- Press CTRL + X
Restart MariaDB:
sudo systemctl restart mariadb
9. Install PHP
Install PHP and the extensions commonly required by Phabricator.
sudo apt install -y \ php \ php-cli \ php-mysql \ php-curl \ php-gd \ php-json \ php-mbstring \ php-xml \ php-zip \ php-intl \ php-bcmath
Check PHP:
php -v
10. Install Git and Download Phabricator
Create a directory for the Phabricator installation:
sudo mkdir -p /opt/phabricator
Move into the directory:
cd /opt/phabricator
Clone the Phabricator repository:
sudo git clone https://github.com/phacility/phabricator.git
Clone libphutil:
sudo git clone https://github.com/phacility/libphutil.git
Clone arcanist:
sudo git clone https://github.com/phacility/arcanist.git
The directory should now contain:
/opt/phabricator/phabricator /opt/phabricator/libphutil /opt/phabricator/arcanist
11. Create the Phabricator User
Create a dedicated Linux user for running Phabricator.
sudo useradd -r -m -d /opt/phabricator -s /bin/bash phabricator
Change ownership of the installation:
sudo chown -R phabricator:phabricator /opt/phabricator
12. Configure Phabricator
Switch to the Phabricator user:
sudo -u phabricator -H bash
Move into the Phabricator directory:
cd /opt/phabricator/phabricator
Check that the Phabricator command-line tool is available:
./bin/config
13. Configure the Phabricator Base URI
Set the URL that users will use to access Phabricator.
If you are using the server IP:
./bin/config set phabricator.base-uri http://102.202.44.175:8080/
If you have a domain, replace the IP address with your domain.
14. Configure the Database
Configure the MySQL/MariaDB connection.
./bin/config set mysql.host localhost ./bin/config set mysql.port 3306
Configure the database username:
./bin/config set mysql.user root
Phabricator may request the database password during setup. Enter the MariaDB password you created earlier.
15. Configure Apache
Create an Apache virtual host configuration:
sudo nano /etc/apache2/sites-available/phabricator.conf
Paste:
<VirtualHost *:8080>
ServerName 102.202.44.175
DocumentRoot /opt/phabricator/phabricator/webroot
<Directory /opt/phabricator/phabricator/webroot>
Require all granted
AllowOverride All
</Directory>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ /index.php?__path__=/$1 [B,L,QSA]
ErrorLog ${APACHE_LOG_DIR}/phabricator_error.log
CustomLog ${APACHE_LOG_DIR}/phabricator_access.log combined
</VirtualHost>
Save the file and exit Nano.
16. Enable Apache Port 8080
Ubuntu Apache normally listens on port 80. If Phabricator should use port 8080, edit the Apache ports configuration:
sudo nano /etc/apache2/ports.conf
Make sure the following line exists:
Listen 8080
Save and exit.
17. Enable the Phabricator Apache Site
Enable the required Apache modules:
sudo a2enmod rewrite
Enable the Phabricator site:
sudo a2ensite phabricator.conf
Test the Apache configuration:
sudo apache2ctl configtest
You should see:
Syntax OK
Restart Apache:
sudo systemctl restart apache2
18. Check That Apache Is Listening on Port 8080
Run:
sudo ss -ltnp | grep ':8080'
You should see Apache listening on port 8080.
19. Configure the Firewall
If UFW is enabled, allow SSH and HTTP/HTTPS traffic.
sudo ufw allow OpenSSH sudo ufw allow 8080/tcp sudo ufw --force enable
Check the firewall:
sudo ufw status
20. Test Phabricator
From the Ubuntu server, test the Phabricator web server:
curl -I http://127.0.0.1:8080
You can also test using the public server IP:
curl -I http://102.202.44.175:8080
A successful installation should return an HTTP response such as:
HTTP/1.1 200 OK
or a redirect such as:
HTTP/1.1 302 Found
21. Open Phabricator in Your Browser
Open a web browser on your computer and enter:
http://102.202.44.175:8080
Replace the IP address with your own server IP address if necessary.
22. Useful Phabricator Commands
Phabricator provides command-line utilities that can be used for troubleshooting and configuration.
Check configuration
cd /opt/phabricator/phabricator ./bin/config
Check Phabricator status
./bin/phd status
Check Apache status
sudo systemctl status apache2
Check MariaDB status
sudo systemctl status mariadb
View Apache error logs
sudo tail -f /var/log/apache2/phabricator_error.log
23. Troubleshooting
Port 8080 is already in use
If you receive:
Address already in use
check which application is using port 8080:
sudo ss -ltnp | grep ':8080'
You can also use:
sudo lsof -i :8080
Do not stop the application using the port until you understand what it is being used for.
Apache configuration error
Run:
sudo apache2ctl configtest
Correct any reported errors before restarting Apache.
Apache is not running
sudo systemctl status apache2 sudo journalctl -u apache2 --no-pager -n 100
MariaDB is not running
sudo systemctl status mariadb sudo journalctl -u mariadb --no-pager -n 100
24. Final Installation Checklist
After installation, verify the following:
- Ubuntu 24.04 is updated
- Apache is installed and running
- MariaDB is installed and running
- PHP is installed
- Phabricator is located under
/opt/phabricator - Apache is listening on the configured port
- The firewall allows the required port
- Phabricator responds to an HTTP request
Installation Complete
Example:
http://102.202.44.175:8080
For production environments, it is recommended to use a proper domain name and HTTPS rather than exposing Phabricator directly through an IP address.

