1. Caddy version (caddy version
):
Latest from repo
$ caddy version
v2.1.1 h1:X9k1+ehZPYYrSqBvf/ocUgdLSRIuiNiMo7CvyGUQKeA=
2. How I run Caddy:
Trying to install from repo and getting some error at end of installation (see below for relevant info).
a. System environment:
Ubuntu 18.04
b. Command:
$ echo "deb [trusted=yes] https://apt.fury.io/caddy/ /" | sudo tee -a /etc/apt/sources.list.d/caddy-fury.list
$ sudo apt update
$ sudo apt install caddy
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
caddy
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 13.1 MB of archives.
After this operation, 36.9 MB of additional disk space will be used.
Get:1 https://apt.fury.io/caddy caddy 2.1.1 [13.1 MB]
Fetched 13.1 MB in 3s (4,900 kB/s)
Selecting previously unselected package caddy.
(Reading database ... 267898 files and directories currently installed.)
Preparing to unpack .../archives/caddy_2.1.1_amd64.deb ...
Unpacking caddy (2.1.1) ...
Setting up caddy (2.1.1) ...
Failed to preset unit: File caddy.service: Invalid argument
/usr/bin/deb-systemd-helper: error: systemctl preset failed on caddy.service: No such file or directory
Failed to get unit file state for caddy.service: Invalid argument
caddy.service is a disabled or a static unit, not starting it.
d. My complete Caddyfile or JSON config:
None at this time (just trying to install)
3. The problem I’m having:
4. Error messages and/or full log output:
Specifically it is this:
Failed to preset unit: File caddy.service: Invalid argument
/usr/bin/deb-systemd-helper: error: systemctl preset failed on caddy.service: No such file or directory
Failed to get unit file state for caddy.service: Invalid argument
caddy.service is a disabled or a static unit, not starting it.
5. What I already tried:
Looked at caddy.service
file, which appears to be HTML:
/etc/systemd/system$ cat caddy.service
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com">
<link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
<link crossorigin="anonymous" media="all" integrity="sha512-FG+rXqMOivrAjdEQE7tO4BwM1poGmg70hJFTlNSxjX87grtrZ6UnPR8NkzwUHlQEGviu9XuRYeO8zH9YwvZhdg==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-146fab5ea30e8afac08dd11013bb4ee0.css" />
<link crossorigin="anonymous" media="all" integrity="sha512-iXrV/b4ypc1nr10b3Giikqff+qAx5osQ0yJRxHRDd8mKFefdMtEZ0Sxs1QysJxuJBayOKThjsuMjynwBJQq0aw==" rel="stylesheet" href="https://github.githubassets.com/assets/site-897ad5fdbe32a5cd67af5d1bdc68a292.css" />
<link crossorigin="anonymous" media="all" integrity="sha512-23DJ0jGXuHq4HnEnOv5yjJ3aD9zHvk4UkkK4Vs7e52NlpTBA9/zI9GMjyZ7MrJmYgiHJ0ZHNKVSFxEC3Pud9UA==" rel="stylesheet" href="https://github.githubassets.com/assets/github-db70c9d23197b87ab81e71273afe728c.css" />
<meta name="viewport" content="width=device-width">
<title>dist/caddy.service at master · caddyserver/dist · GitHub</title>
<meta name="description" content="Resources for packaging and distributing Caddy. Contribute to caddyserver/dist development by creating an account on GitHub.">
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<meta property="fb:app_id" content="1401488693436528">
<meta name="twitter:image:src" content="https://avatars1.githubusercontent.com/u/12955528?s=400&v=4" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary" /><meta name="twitter:title" content="caddyserver/dist" /><meta name="twitter:description" content="Resources for packaging and distributing Caddy. Contribute to caddyserver/dist development by creating an account on GitHub." />
<meta property="og:image" content="https://avatars1.githubusercontent.com/u/12955528?s=400&v=4" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="caddyserver/dist" /><meta property="og:url" content="https://github.com/caddyserver/dist" /><meta property="og:description" content="Resources for packaging and distributing Caddy. Contribute to caddyserver/dist development by creating an account on GitHub." />
<link rel="assets" href="https://github.githubassets.com/">
<meta name="request-id" content="B88E:7E90:2B3910:3F23F6:5E847E1E" data-pjax-transient="true"/><meta name="html-safe-nonce" content="8c4733c97e496d1edc5914197d4e9c1065b4e17e" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6Imh0dHBzOi8vY2FkZHlzZXJ2ZXIuY29tL2RvY3MvaW5zdGFsbCIsInJlcXVlc3RfaWQiOiJCODhFOjdFOTA6MkIzOTEwOjNGMjNGNjo1RTg0N0UxRSIsInZpc2l0b3JfaWQiOiI4MjIxMjM4NzI2Njk3NDc0MDY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=" data-pjax-transient="true"/><meta name="visitor-hmac" content="961ab9d78b9e8f0c90f5c20bd6b31fd98c74d737674ce65d7bfb0c721a5963f9" data-pjax-transient="true"/>
...