Config for Caddy Webserver #4393

Closed
opened 2025-12-29 18:35:33 +01:00 by adam · 3 comments
Owner

Originally created by @ThisIsTenou on GitHub (Dec 22, 2020).

Change Type

[X] Addition
[ ] Correction
[ ] Deprecation
[ ] Cleanup (formatting, typos, etc.)

Area

[X] Installation instructions
[ ] Configuration parameters
[ ] Functionality/features
[ ] REST API
[ ] Administration/development
[ ] Other

Proposed Changes

Adding a default config for the Caddy Webserver as well, in addition to Apache & NGINX.

I've successfully tested this one:

192.168.15.24 {
  route /static* {
    uri strip_prefix /static
    root * /opt/netbox/netbox/static
    file_server
  }
  @notStatic not path /static*
  reverse_proxy @notStatic 127.0.0.1:8001
  encode gzip zstd
  tls /etc/ssl/certs/netbox.crt /etc/ssl/private/netbox.key
  log {
    level error
  }
}

You'd obviously need to change the IP address in the first line to your own IP or domain, but besides that, it's just as plug-and-play as the others.

Originally created by @ThisIsTenou on GitHub (Dec 22, 2020). ### Change Type [X] Addition [ ] Correction [ ] Deprecation [ ] Cleanup (formatting, typos, etc.) ### Area [X] Installation instructions [ ] Configuration parameters [ ] Functionality/features [ ] REST API [ ] Administration/development [ ] Other <!-- Describe the proposed change(s). --> ### Proposed Changes Adding a default config for the [Caddy Webserver](https://caddyserver.com) as well, in addition to Apache & NGINX. I've successfully tested this one: ``` 192.168.15.24 { route /static* { uri strip_prefix /static root * /opt/netbox/netbox/static file_server } @notStatic not path /static* reverse_proxy @notStatic 127.0.0.1:8001 encode gzip zstd tls /etc/ssl/certs/netbox.crt /etc/ssl/private/netbox.key log { level error } } ``` You'd obviously need to change the IP address in the first line to your own IP or domain, but besides that, it's just as plug-and-play as the others.
adam closed this issue 2025-12-29 18:35:33 +01:00
Author
Owner

@jeremystretch commented on GitHub (Dec 22, 2020):

The documentation is intentionally limited to supporting only nginx and Apache, as these are the two most commonly deployed HTTP servers, and extending the documentation would increase the burden of maintaining it. However, if you'd like to publish documentation and a reference configuration for Caddy on your own, I'd be happy to add a link in the wiki.

@jeremystretch commented on GitHub (Dec 22, 2020): The documentation is intentionally limited to supporting only nginx and Apache, as these are the two most commonly deployed HTTP servers, and extending the documentation would increase the burden of maintaining it. However, if you'd like to publish documentation and a reference configuration for Caddy on your own, I'd be happy to add a link in the wiki.
Author
Owner

@ThisIsTenou commented on GitHub (Dec 23, 2020):

Hey there, as you suggested, I've written a small step-by-step guide on how to install and configure Caddy instead of Apache/NGINX. Feel free to link to it, I'll try to keep it updated whenever new releases are coming out.

https://shrt.tenou.de/KLFRte

@ThisIsTenou commented on GitHub (Dec 23, 2020): Hey there, as you suggested, I've written a small step-by-step guide on how to install and configure Caddy instead of Apache/NGINX. Feel free to link to it, I'll try to keep it updated whenever new releases are coming out. https://shrt.tenou.de/KLFRte
Author
Owner

@jeremystretch commented on GitHub (Dec 23, 2020):

Thanks! I've added it to the wiki.

@jeremystretch commented on GitHub (Dec 23, 2020): Thanks! I've added it to [the wiki](https://github.com/netbox-community/netbox/wiki/Community-Contributions).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4393