Skip to content
Whishper

HTTPS setup with Caddy

If you want to host Whishper on your own domain, you can use a reverse proxy such as Caddy. This will allow you to use your own domain, and also to use HTTPS. You can also use Caddy to automatically get a certificate from Let’s Encrypt, or a self-signed certificate for a local setup.

Local setup with HTTPS

We will be using Caddy Docker Proxy to speed things up and avoid having to create a Caddyfile. For this, copy the following docker-compose.yml file to any directory of your choice, for example I use /home/username/caddy-docker-proxy:

version: "3.9"

services:
  caddy:
    image: lucaslorentz/caddy-docker-proxy:latest
    container_name: caddy
    ports:
      - 80:80
      - 443:443
    environment:
      CADDY_INGRESS_NETWORKS: caddy_net
    networks:
      - caddy_net
    restart: unless-stopped
    volumes:
      - caddy_data:/data
      - /var/run/docker.sock:/var/run/docker.sock:ro

volumes:
  caddy_data:
    name: caddy_data

networks:
  caddy_net:
    name: caddy_net

Then, run docker-compose up -d to start the Caddy Docker Proxy container. You won’t need to do anything else with this container, it will automatically detect other containers and create a Caddyfile for them and gracefully reload Caddy when needed, and it will also automatically get a self-signed certificate for your domain.

Setting up whishper

Assuming you already setup Whishper using the Quick setup (if not, go ahead and do it), you can then add the following to your docker-compose.yml file:

version: "3.9"

services:
# [...] Other services

whishper:
    # [...] Other configuration
    networks:
        - caddy_net
        - default
    labels:
        caddy: whishper.localhost
        caddy.reverse_proxy: "{{upstreams 80}}" 

networks:
    caddy_net:
        external: true

Caddy automatically detects any domain that ends with .localhost and automatically gets a self-signed certificate for it. You can then access Whishper at https://whishper.localhost.

Setting up a custom domain with HTTPS

If you want to use a custom domain, you will need to:

  1. Get a domain name, we will use example.com as an example.
  2. Get a server to host Whishper.
    • If you want privacy-respecting hosting, you can use check out this list.
  3. Install Whishper using the Quick setup (or manually set it up).
  4. Point the domain to your server’s IP address.
    • You can use a subdomain if you prefer, for example whishper.example.com.

Now, you can use the following docker-compose.yml file to set up a Caddy Docker Proxy in your server:

version: "3.9"

services:
  caddy:
    image: lucaslorentz/caddy-docker-proxy:latest
    container_name: caddy
    ports:
      - 80:80
      - 443:443
    environment:
      CADDY_INGRESS_NETWORKS: caddy_net
    networks:
      - caddy_net
    restart: unless-stopped
    volumes:
      - caddy_data:/data
      - /var/run/docker.sock:/var/run/docker.sock:ro

volumes:
  caddy_data:
    name: caddy_data

networks:
  caddy_net:
    name: caddy_net

Then, run docker-compose up -d to start the Caddy Docker Proxy container. You won’t need to do anything else with this container, it will automatically detect other containers and create a Caddyfile for them and gracefully reload Caddy when needed, and it will also automatically get a certificate for your domain.

Setting up whishper

Assuming you already setup Whishper using the Quick setup (if not, go ahead and do it), you can then add the following to your docker-compose.yml file:

version: "3.9"

services:
# [...] Other services

whishper:
    # [...] Other configuration
    networks:
        - caddy_net
        - default
    labels:
        caddy: whishper.example.com
        caddy.reverse_proxy: "{{upstreams 80}}" 

networks:
    caddy_net:
        external: true

After adding this, run docker-compose up -d to restart Whishper. If you pointed your domain correctly to your server, caddy will generate an HTTPS certificate and you can now access Whishper at https://whishper.example.com.