Let's Encrypt Setup for FileWave Server (Debian)

What

This Knowledge Base (KB) article covers a Debian-focused shell script that automates Let's Encrypt SSL certificate setup for a FileWave server on Debian 12/13.

The script supports two challenge methods:

Both paths handle certificate request, FileWave certificate injection, and renewal automation.

When/Why

FileWave administrators use this when they need a trusted SSL certificate for secure communication.

This documented process is for Debian 12/13. If you are a Hosted customer, FileWave can handle certificate management for you: SSL Certificate Management for Custom Domains (FileWave-Hosted Servers).

How

Prerequisites

Challenge method guidance

If TCP/80 is not available, select DNS-01 (Cloudflare) during install.

Install steps

  1. Download the script with wget:

    wget -O filewave-letsencrypt-debian.sh https://kb.filewave.com/attachments/413
    
  2. Make it executable:

    chmod +x filewave-letsencrypt-debian.sh
    
  3. Run install:

    sudo ./filewave-letsencrypt-debian.sh --install
    
  4. Follow prompts for:

    • Hostname (FQDN)
    • Email
    • Validation method:
      • 1 = HTTP-01
      • 2 = DNS-01 (Cloudflare)
    • If DNS-01 is selected: Cloudflare API token
  5. Confirm values when prompted.

  6. Verify output for success messages and final summary.

What the script does

Uninstall

To remove integration files created by the script:

sudo ./filewave-letsencrypt-debian.sh --uninstall

This removes FileWave renewal hook + cron job and (if present) Cloudflare credentials file. The script intentionally leaves certbot installed.

Troubleshooting

1) FileWave server prerequisites failed

If script reports missing FileWave binaries/paths:

2) Certificate request failed (HTTP-01)

Ensure inbound TCP/80 is reachable, then retry:

sudo certbot -n --agree-tos --standalone certonly -d "<FQDN>" -m "<EMAIL>"
sudo certbot renew --force-renewal

3) Certificate request failed (DNS-01 Cloudflare)

Ensure token permissions and retry:

sudo certbot -n --agree-tos --dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/secrets/cloudflare.ini certonly -d "<FQDN>" -m "<EMAIL>"
sudo certbot renew --force-renewal

4) FileWave UI shows old certificate behavior

If older behavior persists, verify mdm_cert_trusted is set in PostgreSQL:

image.png

/usr/local/filewave/postgresql/bin/psql -d mdm -U django

insert into ios_preferences values('mdm_cert_trusted', TRUE) on conflict (key) do nothing;

update ios_preferences set value='true' where key='mdm_cert_trusted';

\q

Revision #13
Created 2024-03-08 14:38:07 UTC by Josh Levitsky
Updated 2026-02-24 15:06:25 UTC by Josh Levitsky