Bayesian optimization is known to be difficult to scale to high dimensions,because the acquisition step requires solving a non-convex optimization problemin the same search space. In order to scale the method and keep its benefits,we propose an algorithm (LineBO) that restricts the problem to a sequence ofiteratively chosen one-dimensional sub-problems. We show that our algorithmconverges globally and obtains a fast local rate when the function is stronglyconvex. Further, if the objective has an invariant subspace, our methodautomatically adapts to the effective dimension without changing the algorithm.Our method scales well to high dimensions and makes use of a global Gaussianprocess model. When combined with the SafeOpt algorithm to solve thesub-problems, we obtain the first safe Bayesian optimization algorithm withtheoretical guarantees applicable in high-dimensional settings. We evaluate ourmethod on multiple synthetic benchmarks, where we obtain competitiveperformance. Further, we deploy our algorithm to optimize the beam intensity ofthe Swiss Free Electron Laser with up to 40 parameters while satisfying safeoperation constraints.