How to setup Phabricator on AWS (Part 1 — Setting up requirements)
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:
Setting up an AWS EC2 Instance
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.
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’.
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.
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.
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.
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.
With these items set up you can now move onto the next part of installing and launching Phabricator.