Coder Social home page Coder Social logo

conradoqg / caddy-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hacdias/caddy-v1-service

0.0 2.0 0.0 21 KB

:black_large_square: Run Caddy as a service

Home Page: https://caddyserver.com/docs/hook.service

License: Apache License 2.0

Go 100.00%

caddy-service's Introduction

service - a caddy plugin

Build community

This plugin uses github.com/kardianos/service to create services on Caddy. To work, it implements two flags on Caddy executable:

  • -name, which corresponds to the name of the service (default: Caddy).
  • -service, which can be either install, uninstall, start, stop or restart.

Right now, this plugin seems to work well on most systems that kardianos/service supports, which are Windows XP+, Linux/(systemd | Upstart | SysV), and OSX/Launchd.

This plugin wasn't widely tested. We count on the community to let us know if you find any eventual bugs and tell us what we can do to improve its functionality.

Install a Caddy service:

caddy -service install -agree -email [email protected] -conf /path/to/Caddyfile [-name optionalServiceName] [-option optionValue]

Notes:

  1. You must set the -conf flag to your Caddyfile. Though, usually Caddy works by using the caddyfile in the directory which the caddy executable resides in, which is not necessarily the working directory. However, the service does not load the Caddyfile from the executable directory, and so must be specified using the -conf flag.
  2. You must set the -agree flag, which says that you have read and agree to the Let's Encrypt Subscriber Agreement. Any type of automated startup requires this flag.
  3. You must set the -email flag to your email address if not specified for a site in the Caddyfile. This email address will be used for TLS certificate generation.
  4. Notice that if you install the service with a name that is not the default's, you will need to specify it everytime you use one of the other commands using the flag -name.
  5. You can install the service with default Caddy flag values (e.g. -conf MyCaddyfile)

Uninstall a Caddy service:

caddy -service uninstall [-name optionalName]

Start a Caddy service:

caddy -service start [-name optionalName]

Stop a Caddy service:

caddy -service stop [-name optionalName]

Restart a Caddy service:

caddy -service restart [-name optionalName]

caddy-service's People

Contributors

conradoqg avatar fabiofcferreira avatar hacdias avatar hummerpj avatar lucaslorentz avatar timothywlewis avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.