We present the application of a Timepix detector on the VZLUSAT-1 nanosatellite. Timepix is a compact pixel detector (256 x 256 square pixels, 55 x 55 mu m each) sensitive to hard X-ray radiation. It is suitable for detecting extraterrestrial X-rays due to its low noise characteristics, which enables measuring without special cooling. This project aims to verify the practicality of the detector in conjunction with 1-D Lobster-Eye optics to observe celestial sources between 5 and 20 keV. A modified USB interface (developed by IEAP at CTU in Prague) is used for low-level control of the Timepix. An additional 8-bit Atmel microcontroller is dedicated for commanding the detector and to process the data onboard the satellite. We present software methods for onboard post-processing of captured images, which are suitable for implementation under the constraints of the low-powered embedded hardware. Several measuring modes are prepared for different scenarios including single picture exposure, solar UV-light triggered exposure, and long-term all-sky monitoring. The work has been done within Medipix2 collaboration. The satellite is planned for launch in April 2017 as a part of the QB50 project with an end of life expectancy in 2019.