Files
vffuunnyy baa9749e03 Update caddy.md (#100)
Fix http01-challenge for certs
2025-07-13 18:26:03 +03:00

2.0 KiB

sidebar_position, title, description
sidebar_position title description
1 Caddy Lightweight reverse proxy with automatic SSL certificates and zero configuration

import PointDomainToIp from '/docs/partials/_point_domain_to_ip.md'; import OpenLoginPage from '/docs/partials/_open_login_page.md';

Overview

In this guide we will be using Caddy as a reverse proxy to access the Remnawave panel. We will point a domain name to our server and configure Caddy. Caddy will handle issuance of the SSL certificates by itself.

Caddy configuration

Simple configuration

Create a file called Caddyfile in the /opt/remnawave/caddy directory.

mkdir -p /opt/remnawave/caddy && cd /opt/remnawave/caddy && nano Caddyfile

Paste the following configuration.

:::warning

Please, replace REPLACE_WITH_YOUR_DOMAIN with your domain name.

Review the configuration below, look for red highlighted lines.

:::

// highlight-next-line-red
https://REPLACE_WITH_YOUR_DOMAIN {
        reverse_proxy * http://remnawave:3000
}
:443 {
    tls internal
    respond 204
}

Create docker-compose.yml

Create a docker-compose.yml file in the /opt/remnawave/caddy directory.

cd /opt/remnawave/caddy && nano docker-compose.yml

Paste the following configuration.

services:
    caddy:
        image: caddy:2.9
        container_name: 'caddy'
        hostname: caddy
        restart: always
        ports:
            - '0.0.0.0:443:443'
            - '0.0.0.0:80:80'
        networks:
            - remnawave-network
        volumes:
            - ./Caddyfile:/etc/caddy/Caddyfile
            - caddy-ssl-data:/data

networks:
    remnawave-network:
        name: remnawave-network
        driver: bridge
        external: true

volumes:
    caddy-ssl-data:
        driver: local
        external: false
        name: caddy-ssl-data

Start the container

docker compose up -d && docker compose logs -f -t