You apply to the police for permission to hold a public event. During the spring and summer, most applications happen and the risk of you being denied is higher. Apply for permission well ahead of time! In addition, you should contact the landowner and reassure them that you will be cleaning up afterwards and they do not need to worry.
When you have a location, find a good path and mark it with signs. Avoid crossing many roads as it requires more volunteers and possible police clearance.
Several races are for fun or charity. They are usually non-profitable as you run for charity and timekeeping is not important. However, if you choose to have timekeeping on your race, you must apply for a permit from the police due to personal integrity laws such as GDPR.