We present the optomechanical design of the Potsdam Arrayed Waveguide Spectrograph (PAWS), which is the first on-sky demonstrator of an integrated photonic spectrograph specifically designed and optimized for astronomy. The instrument is based on an arrayed waveguide grating (AWG) that was designed by and custom fabricated for the innovation center innoFSPEC Potsdam. The commissioning of the instrument is planned at the Calar Alto 2:2m Telescope in southern Spain. The core of the instrument is the AWG-chip as the primary dispersive element. The AWG device is coupled to the telescope module via a single-mode fibre (SMF). The spectral image on the output facet of the AWG is a superposition of multiple spectral orders due to the cyclic dispersive behavior of the waveguide array. The output of the AWG is fed into a free-space optical system housed inside a cryostat via an infinity-corrected microscope objective. The overlapping spectral orders are separated by a second dispersion stage using a ruled grating as a cross-dispersive element, and the resulting echellogram is projected onto a Teledyne 2k x 2k H2RG near-infrared array. The requirement of sub-micron accuracy of the fibre-chip alignment has led to an advanced photonic packaging method. In order to avoid on-site alignment procedures during the on-sky testing, the AWG mount, fibre-support, and microscope objective were integrated into a single monolithic module. Optical and thermal simulations and the design of the cryostat were realized by Andes Scientific. The read-out electronics and the compatible operating software for the detector was provided by the Max Planck Institute for Astronomy (MPIA). Data analysis is performed using the open-source data reduction software P3D, which provides functionality for the removal of the instrument signature, extraction of the spectra, correction for the blaze function, wavelength calibration, and processed data file export.