Install Caddy on Arch Linux

Select distribution:
Traducciones al Español
Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.

Before You Begin

  1. Familiarize yourself with our Getting Started guide and complete the steps for setting your Linode’s hostname and timezone.

  2. This guide will use sudo wherever possible. Complete the sections of our Securing Your Server guide to create a standard user account, harden SSH access and remove unnecessary network services.

  3. You will need to register your site’s domain name and follow our DNS Manager Overview guide to point your domain to your Linode.

  4. Update your system with sudo pacman -Syu

  5. Install the development package group with sudo pacman -S base-devel

What is Caddy?

Caddy is an open source HTTP/2 capable web server with automatic HTTPS written in Go. It supports a variety of web site technologies, includes security defaults, and is very easy to use.

Install Caddy

You can install Caddy on Arch Linux by using a snapshot from the Arch User Repository (AUR).

  1. Download the snapshot from the AUR:

     curl -o caddy.tar.gz
  2. Unpack the snapshot:

     tar xf caddy.tar.gz
  3. Navigate to the caddy directory:

     cd caddy
  4. Build and install the package:

     makepkg -si

Test Caddy

  1. Start the Caddy web server:

     sudo systemctl start caddy
  2. Enable the Caddy service:

     sudo systemctl enable caddy
  3. Navigate to your Linode’s domain name or IP address in a web browser. You should see the Caddy default page displayed.

Configure Caddy

Caddy configuration files reside in /etc/caddy/ and website configuration files should be created in the /etc/caddy/caddy.conf.d/ directory.

  1. Create a sample configuration file for your website. Replace with your Linode’s domain name. If you have not set up a domain, but still want to get started with Caddy, replace with :80.

    File: /etc/caddy/caddy.conf.d/
    3 {
        root /usr/share/caddy/
    If you choose to serve your site from a directory other than /usr/share/caddy/, you must remove the Caddy test site files located in that directory. The /usr/share/caddy/ directory is prioritized over other locations, so any files stored in that directory will be served first, even if you have configured a different directory location.
  2. Reload Caddy:

     sudo systemctl reload caddy
  3. Navigate to your Linode’s domain name in a web browser. You should be able to see content served from the root directory configured above.

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

This page was originally published on

Create a Linode account to try this guide with a $100 credit.
This credit will be applied to any valid services used during your first 60 days.

Your Feedback Is Important

Let us know if this guide made it easy to get the answer you needed.

Join the conversation.
Read other comments or post your own below. Comments must be respectful, constructive, and relevant to the topic of the guide. Do not post external links or advertisements. Before posting, consider if your comment would be better addressed by contacting our Support team or asking on our Community Site.