It does not matter which order you connect them. Just make sure pin - pin mapping is correct. For example, you can connect the GND from relay to GND in db9 connector, pin 1 to vcc and the rest pin 2-8 to all the rest of the relay pins. On the other end of the db 9 connector, attach pin 1 to 5v, GND to GND and 2-8 to different GPIO. Then use those GPIO pins to declare outlets in reef-pi ui and it should be ok.
Does that make sense? if still not clear i can elaborate more. I am assuming its a 5v relay, It will be nice if you can share a photo of the relay pins. I am also assuming you have two db9 connectors , one on the powerbar and another on the controller and connecting then via a db9 cable.
Yes it's a 5v relay. Yes I do have another db9 it is on the controller. I took a picture of the relay pins. And yes I do understand ground to ground, pin 1 to vcc, and the rest to all the other pins.