How to setup Phabricator on AWS (Part 1 — Setting up requirements)

Peter Myung-Won Pak
5 min readJun 2, 2019

Summary

Phabricator is a neat open source tool that helps with the development proccess by providing products such as Arcanist (git wrapper), Maniphest (task management), Phriction (documentation), and more. Compared to other tools on the market, Phabricator cost next to nothing to use but requires you to set it up. However, if you would like to skip the setup process altogether, Phacility offers a service in which they will set it up and provide you support.

This walkthrough will show you how to setup and deploy an instance of Phabricator on your own. This part of the walkthrough will guide you through the steps in setting up the requirements needed to deploy an instance of Phabricator such as the domain, hosting, and mailing. If you have all these items set up or would like to skip to the next step you can do so here:

Part 2 — Launching Phabricator

Requirements

In order to setup Phabricator properly you will need the following items:

  1. A domain name (I’ll be using one from namecheap)
  2. An Amazon Web Services account (You can make one and set an instance up for free)
  3. A mailer (I’ll be using mailgun, they offer the first 10k of sent emails for free)

Setting up an AWS EC2 Instance

Choose the ‘Launch a virtual machine’ option on the AWS Management Console screen to get started

Next we will need to set up an AWS EC2 instance up, so log into the AWS Management Console and navigate to the option of setting up an EC2 Instance.

When prompted for the first step of choosing an Amazon Machine Image, choose the Ubuntu Server 18.04 LTS and follow the steps to review and launch. You should get a prompt to create a SSH key to access your instance, give this key a name and download it for later use.

Once the instance has been launched, navigate to the security groups field under the description tag and click on the link for launch-wizard. There you will need to add inbound rules for the server such as ssh, http, and https.

Navigate to the launch-wizard link underneath the description tab for your instance
Configure the security group to for ports 2222, 80, and 443

After editing those settings, go back to the instances page and click on the large connect button which will then give you instructions on how to connect to your EC2 instance.

Setting up a Mailer for Phabricator

In order for Phabricator to work correctly, an outbound mailer needs to be configured in order to email users about certain notifications. This can be done by using a mailing service from one of the ones listed here. For the purposes of this example, we will be using mailgun.

After you have created an account with mailgun, navigate to the domains tab add a new domain by clicking on the button that says ‘Add New Domain’. There you will be prompted to enter the domain name of where you will host Phabricator. Enter your domain name (i.e. phabricator.mydomain.com) and click on the button that says ‘Add Domain’.

Enter the domain name that you wish to use with Phabricator

Once you have added this domain, you will be prompted to a page with a list of values that you will have to enter into you DNS settings.

Use the values listed here to change your DNS settings, with some caveats

Changing your DNS Settings

With your mailer and AWS instance set up, now you need to change your DNS settings appropriately. For this navigate to your DNS provider, such as namecheap. There you will need to change your advanced DNS settings to contain the following for your AWS instance and mailer.

For your AWS instance, add a new record with the type of ‘A Record’ so that it reflects the public IP address of your EC2 instance. This will allow for your domain to host the Phabricator instance as a subdomain.

Find your public IP address under your EC2 instances dashboard
Create a new ‘A Record’ with ‘phabricator’ as the host and your instance’s public IP address as the value

Now once you have that connected, add the following records previously given to you when you set up your mailer. However, when typing in the hostnames for the settings, only use the subdomain. (i.e. do not include the ‘mydomain.com’ portion of ‘phabricator.mydomain.com’, ‘krs_domainkey.phabricator.mydomain.com’, or ‘email.phabricator.mydomain.com’). After doing so your DNS settings should resemble something like this.

Note: A Record for both www.phabricator and phabricator for redirects when we setup SSL in Apache
Your mail settings should look something like this

Once you have set those values, go back the the Mailgun website and click on the button that says ‘Verify DNS Settings’. If done correctly, you should be taken to a page like this.

You should now see an API key that you can use with this account, save this for later as it will be useful in a future step when setting up Phabricator email

With these items set up you can now move onto the next part of installing and launching Phabricator.

--

--