Phabricator on raspberry pi

how to setup Phabricator on a raspberry pi 3B+ with a RAID on usb sticks to store the data somewhere else than on the SD card

Similar projects worth following
Phabricator is a webtools thats group a wiki, a git, and something like trello or Asana plus a few other.
raspberry pi support is no officailly supported but it work.

i need a solution to host the numerous small scripts we use in the company were i work.

i found phabricator who did excactly what we needed.

It will take month before we get a VM sowhere to host a real phabricator so in the meanwhile i managed to host it on a pi

if you find yourself in the same case as me this may serve you as the others online tutorial didnt worked well for me.

  • 1 × raspberry pi 3B+
  • 1 × microSD card 4GB at least
  • 2 × USB stick (32 GB or more depending of how many project)
  • 1 × raspberry pi case so it look good
  • 1 × micro USB 5V 2A power supply

  • I found why i went wrong in the beginning

    Nathann07/28/2020 at 11:17 0 comments

    I had some trooble with the RAID in the first place. its due to the USB drawing too much current so to fix this either use a powered USB hub or use only two USB stick with the max_usb_current=1 in /boot/config.txt then it run fine

  • So far so good

    Nathann03/15/2020 at 11:53 0 comments

    the server is still running fine. i counted the number of request to 5 per seconds before crash. so you should be fine with up to three frequent user (we edit it all days long) and up to 10 user if you have htop displayed somewhere and people dont all click at the same time

  • Getting better

    Nathann03/07/2020 at 16:16 0 comments

    The raid have been stable for 4 days now i believe it was because the raid was still initialzing at first.

    i understood that the server freeze when too many request are processed at the same time. So if not everybody clink on the link at the same time and if only one update od the wiki is done at the same time it work fine. (i cant wait to receive a real server for this :')

  • getting barely usable

    Nathann03/05/2020 at 08:19 0 comments

    i finnally managed to have instruction that work out of the box.

    i need to find why mysql go crazy with the CPU and freeze the whole thing.

    i also need to mount the raid with uuid rather that /dev/sdX1 because they change and are not always detect by mdadm which cause crash

View all 4 project logs

  • 1
    burn the sd card and prepare ssh

    I used Raspbian Buster Lite from here

    i burned it on the microSD card using Rufus

    then plugg your freshly burned SD card in the raspberry pi

    power the pi using the micro USB.

    connect a screen and a USB keyboard (or setup ssh directly by adding a empty file called ssh in the boot partition of the sd card)

    1) enable ssh with raspi-config under interfacing option

    2) setup the keyboard layout using raspi-config

    3) change the password using again raspi-config

    4) set hostname with raspi-config

    5) setup a static ip adress by edditing /etc/dhcpd.conf

    6) login via ssh and create.ssh

    7) put your public key in .ssh/authorized_keys

    8) sudo apt update && sudo apt upgrade -y

    9) sudo reboot now

    now your pi is ready

  • 2
    setup RAID

    The objective is to have a safer way of storing the datas and a bigger storage than what the pi can offer with the SD card alone

    sudo apt-get install mdadm
    sudo dd if=/dev/zero of=/dev/sda bs=256M count=1
    sudo dd if=/dev/zero of=/dev/sdb bs=256M count=1

    (be careful. this wipe the content of your stick)

    sudo parted /dev/sda
            mklabel gpt
            mkpart primary 0% 100%
    sudo parted /dev/sdb
            mklabel gpt
            mkpart primary 0% 100%
    sudo mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/sda1 /dev/sdb1
    sudo -i                (it dont work with sudo for some reason)
    mdadm --detail --scan >> /etc/mdadm/mdadm.conf
    sudo mkfs.ext4 -v -m .1 -b 4096 -E stride=32,stripe-width=64 /dev/md0
    sudo mount /dev/md0 /mnt
    sudo chmod -R 777 /mnt
    sudo df -h

    if you loose a drive due to weak power supply, you can re-add it with : 

    mdadm /dev/md0 -a /dev/sdX0

    then edit the max_usb_current=1 in /boot/config.txt

    sudo nano /boot/config.txt 

    you should now see youre raid

    sudo blkid

    note hte id of your RAID

    sudo nano /etc/fstab

    add the followinf line (replace X with your id) : 

    sudo reboot now

    once rebooted you should now see your raid mount in /mnt

    sudo df -h
  • 3
    setup Log2Ram

    This step is optional but greatly recommand to extend the lifetime of your server.

    cd /home/pi
    sudo apt-get install git lsof mdadm -y git
    git clone
    cd log2ram
    chmod +x
    sudo ./
    sudo nano /etc/log2ram.conf

    set size  the buffer size from 40 to 128 megabyte

    sudo reboot now

View all 8 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates