The use of scanned proton beams in external beam radiation therapy has seen a rapid development over the past decade. This technique places new demands on treatment planning, as compared to conventional photon-based radiation therapy. In this article, several proton specific functions as implemented in the treatment planning system RayStation are presented. We will cover algorithms for energy layer and spot selection, basic optimization including the handling of spot weight limits, optimization of the linear energy transfer (LET) distribution, robust optimization including the special case of 4D optimization, proton arc planning, and automatic planning using deep learning. We will further present the Monte Carlo (MC) proton dose engine in RayStation to some detail, from the material interpretation of the CT data, through the beam model parameterization, to the actual MC transport mechanism. Useful tools for plan evaluation, including robustness evaluation, and the versatile scripting interface are also described. The overall aim of the paper is to give an overview of some of the key proton planning functions in RayStation, with example usages, and at the same time provide the details about the underlying algorithms that previously have not been fully publicly available. (c) 2023 The Authors. Published by Elsevier Inc. on behalf of American Association of Medical Dosimetrists. This is an open access article under the CC BY-NC-ND license ( http://creativecommons.org/licenses/by-nc-nd/4.0/ )