From 5073ad8340868266a50d672934b15949f773c614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?elm=C3=B8?= Date: Sun, 13 Aug 2023 21:29:00 +0200 Subject: [PATCH] docs: SELinux COPR info --- src/docs/markdown/running.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/docs/markdown/running.md b/src/docs/markdown/running.md index bc5549a..60aa972 100644 --- a/src/docs/markdown/running.md +++ b/src/docs/markdown/running.md @@ -7,16 +7,19 @@ title: Keep Caddy Running While Caddy can be run directly with its [command line interface](/docs/command-line), there are numerous advantages to using a service manager to keep it running, such as ensuring it starts automatically when the system reboots and to capture stdout/stderr logs. -- [Linux Service](#linux-service) - - [Unit Files](#unit-files) - - [Manual Installation](#manual-installation) - - [Using the Service](#using-the-service) - - [Overrides](#overrides) - - [SELinux System Considerations](#selinux-system-considerations) -- [Windows Service](#windows-service) -- [Docker Compose](#docker-compose) - - [Setup](#setup) - - [Usage](#usage) +- [Keep Caddy Running](#keep-caddy-running) + - [Linux Service](#linux-service) + - [Unit Files](#unit-files) + - [Manual Installation](#manual-installation) + - [Using the Service](#using-the-service) + - [Overrides](#overrides) + - [SELinux System Considerations](#selinux-system-considerations) + - [Windows service](#windows-service) + - [sc.exe](#scexe) + - [WinSW](#winsw) + - [Docker Compose](#docker-compose) + - [Setup](#setup) + - [Usage](#usage) ## Linux Service @@ -155,7 +158,12 @@ Then, save the file and exit the text editor, and restart the service for it to ### SELinux System Considerations -On SELinux enabled systems, systemd unit files and their executables will not be run unless labelled with `systemd_unit_file_t` and `bin_t` respectively. +On SELinux enabled systems you have two options: +1. Compile Caddy and label the files yourself +2. Install Caddy using the [COPR repo](https://copr.fedorainfracloud.org/coprs/g/caddy/caddy/), your systemd file and caddy binary will be created and labelled correctly. NB: if you want to recompile Caddy with modules, you will have to label the executable as described bellow. + + +Systemd unit files and their executables will not be run unless labelled with `systemd_unit_file_t` and `bin_t` respectively. The `systemd_unit_file_t` is automatically applied to files created in `/etc/systemd/...`, so be sure to create your `caddy.service` file there.