mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-30 18:22:49 -04:00 
			
		
		
		
	Add systemd service file for caddy Add some README with basic setup instructions Explain how to view the service configuration Add a note about permissions Add a comment about run user and group service->service unit A systemd service can consist of different units. A unit configuration file has the `.service` file ending which is a bit confusing, so please be considerate if I'm confusing `service` and `unit` in the README Fix typos/reword Add contact information
		
			
				
	
	
		
			22 lines
		
	
	
		
			585 B
		
	
	
	
		
			Desktop File
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			585 B
		
	
	
	
		
			Desktop File
		
	
	
	
	
	
| ; see `man systemd.unit` for configuration details
 | |
| ; the man section also explains *specifiers* `%x`
 | |
| 
 | |
| [Unit]
 | |
| Description=Caddy HTTP/2 web server %I
 | |
| Documentation=https://caddyserver.com/docs
 | |
| After=network.target
 | |
| 
 | |
| [Service]
 | |
| ; run user and group for caddy
 | |
| User=%i
 | |
| Group=http
 | |
| ExecStart=/usr/bin/caddy -agree=true -conf=/etc/caddy/Caddyfile
 | |
| Restart=on-failure
 | |
| ; create a private temp folder that is not shared with other processes
 | |
| PrivateTmp=true
 | |
| ; limit the number of file descriptors, see `man systemd.exec` for more limit settings
 | |
| LimitNOFILE=8192
 | |
| 
 | |
| [Install]
 | |
| WantedBy=multi-user.target
 |