Playing chess randomly involves players taking turns placing any non-pawn piece on a square of their choice on their back rank to determine the starting position of their back rank pieces. As usual bishops must be on opposite colors and kings must be between rooks. For each turn any square on the back rank can be chosen by a player to place a piece on. The possible starting positions when playing chess randomly are the same as when playing chess optionally. As an example, white could start by placing a queen on H1, and then black could place a rook on F8. Then white could place a knight on C1, and black could place a rook on D8 and so on until each back rank square of both players had a piece on it. White chooses first since choosing first is a slight disadvantage. Two minutes are allowed for each player to choose a placement of a piece. This time limit can of course be different.
An example of a first row starting position when playing chess randomly is BRNKRBNQ for white and QBNRKRBN for black. In this example short castling for white would be on the A side of the board since that is the side the white king is closest to and long castling for white would be on the H side of the board since that is the side the white king is furthest away from. For black short castling would be on the H side of the board since that is the side the black king is closest to and long castling would be on the A side of the board since that is the side black king is furthest away from.