See https://duet3d.dozuki.com/Wiki/Centering_the_bed_or_setting_the_bed_origin for how to set the location of the bed origin.
The way you set the Z=0 position depends on how you are homing Z. If you are homing Z using a Z probe, you need to set the trigger height of the Z probe in the G31 command in config.g. if you are homing Z using an endstop switch, see https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareCartesianPrinter#Section_Homing_Z.