Service eligibility and regional restrictions
PuppyIP serves only compliant overseas businesses and their authorized personnel. Proxy services are not available in mainland China. The service may only be used for lawful business activities outside mainland China. Use of this service within mainland China is prohibited.
Hosting a proxy IP or server overseas does not change these restrictions. The service must not be provided to end users in mainland China through relaying, forwarding, sharing or resale. Before use, read the Terms of Service.
Key Takeaways
- acme.sh standalone needs to receive HTTP-01 validation on TCP 80; Caddy listening there can prevent the challenge server from starting.
- Check DNS, inbound port-80 access and the actual listener before choosing a maintenance stop or another validation method.
- Stopping Caddy affects sites using it. Automated renewal must restore the service whether renewal succeeds or fails.
- After renewal, verify the certificate on x-ui's real TLS port and target SNI instead of relying only on the ACME log.
Understand the conflict: standalone needs to bind port 80
In standalone mode, acme.sh temporarily starts its own HTTP service to answer an HTTP-01 challenge. If Caddy or another reverse proxy already owns TCP 80, acme.sh may be unable to bind the validation port and renewal can fail. Even if x-ui serves its panel on a separate HTTPS port, HTTP-01 still requires public traffic for the domain to reach the correct host on TCP 80.
Caddy and x-ui can run on the same machine, but port ownership must be planned. The existing web service can proxy the challenge, the port owner can be stopped briefly during maintenance, or another validation method can be selected for the deployment. A working Caddy site on 443 does not prove that a standalone server can bind port 80.
Read-only checks for the listener, container and certificate task
First inspect the process listening on TCP 80, the Caddy container state, the certificates managed by acme.sh and recent renewal logs. Replace the domain placeholder; do not paste full domain names, private-key paths or ACME account details into public tickets. If another service owns port 80, identify its role and dependent sites before acting. Do not kill an unknown PID.
Also check that the domain's A/AAAA records point to an endpoint that can receive the challenge, and that the security group and host firewall allow inbound TCP 80. If a CDN, port forward or multiple addresses are involved, verify that the request reaches the host running ACME. Stopping Caddy will not fix a DNS or routing mismatch.
Inspect the listener, container and acme.sh certificates
shss -ltnp 'sport = :80'
docker ps --format '{{.Names}} {{.Status}}' | grep -i caddy
/root/.acme.sh/acme.sh --list
systemctl list-timers --all | grep -i acme
Choose a standalone renewal method that restores the service
Use a controlled renewal wrapper only after confirming that Docker manages Caddy and that a short outage for sites behind that container is acceptable during a maintenance window. The script uses an EXIT trap for cleanup and makes HUP, INT and TERM exit with statuses 129, 130 and 143 so EXIT performs the restoration. Replace the domain and container name, confirm that the container is running and that the current user can manage it. Do not copy this example if systemd or another orchestrator manages Caddy.
This is a single controlled renewal run. Save pre-hooks and post-hooks in the certificate's acme.sh renewal configuration as supported by the installed release, then confirm that cron or systemd invokes them. A failed Caddy stop must stop renewal, and Caddy must be restored after a failed renewal. A shell trap cannot run after SIGKILL, host power loss or Docker failure; keep a manual recovery path and treat failed restoration as an incomplete maintenance operation.
Controlled standalone renewal for Docker Caddy
shset -eu
DOMAIN='EXAMPLE.COM'
CADDY_CONTAINER='REPLACE_WITH_CONFIRMED_CADDY_CONTAINER'
docker inspect -f '{{.State.Running}}' "$CADDY_CONTAINER" | grep -qx true || exit 1
restore_caddy() {
renew_status=$?
trap - EXIT
if [ "$(docker inspect -f '{{.State.Running}}' "$CADDY_CONTAINER")" != "true" ]; then
docker start "$CADDY_CONTAINER" >/dev/null
fi
exit "$renew_status"
}
trap restore_caddy EXIT
trap 'exit 129' HUP
trap 'exit 130' INT
trap 'exit 143' TERM
docker stop "$CADDY_CONTAINER"
/root/.acme.sh/acme.sh --renew -d "$DOMAIN" --standalone
Recheck the scheduled renewal and HTTP-01 route together
A successful manual run does not prove the scheduled job is configured. Check the validation mode and hooks saved for the certificate. Confirm the scheduled task uses the same user, acme.sh path and configuration directory; cron and a systemd timer may have different environment variables. Do not recreate the ACME account or reset the certificate directory to fix a port conflict.
If a Caddy outage is unacceptable, evaluate a validation method that works with the reverse proxy or DNS-01, then confirm the DNS API permissions, credential storage and automation owner. Before changing validation, retain the current certificate and renewal configuration and confirm the new challenge works with this domain and DNS provider. Do not put a DNS API token in shell history or logs.
Verify the certificate on x-ui's actual TLS port
After renewal, check the acme.sh result, the certificate file's validity dates and the service installation state separately. A running Caddy container proves only that the reverse proxy returned; it does not prove that x-ui loaded the new certificate. Compare x-ui's actual HTTPS listener address and port with its certificate installation path, then verify the certificate chain and hostname with the service SNI from the intended network entry. A successful issuance log is not enough to close a failed verification.
If external HTTPS works but x-ui still presents the old certificate, check whether the install hook deployed the new file to x-ui's target path and whether that service needs a controlled reload. Verify the chain and hostname on the target port again after reloading, then confirm that Caddy sites remain available. Caddy's certificate on 443 does not prove that another panel port has updated.
Verify the x-ui TLS certificate chain and hostname
shDOMAIN='EXAMPLE.COM'
CONNECT_ADDRESS='127.0.0.1'
PORT='REPLACE_WITH_XUI_TLS_PORT'
openssl s_client -connect "$CONNECT_ADDRESS:$PORT" -servername "$DOMAIN" -verify_hostname "$DOMAIN" -verify_return_error </dev/null
Rollback and stop conditions
If the challenge still fails, restore Caddy and then check DNS, inbound TCP 80, the firewall and the ACME task context. Do not repeatedly let HTTP services compete for port 80 or terminate an unknown PID. If automated hook configuration is wrong, restore the saved renewal configuration, confirm Caddy starts and schedule another controlled attempt.
Completion requires a successful renewal, installation to x-ui's actual path, the new certificate on the target SNI port and recovery of sites behind the paused Caddy service. Caddy's manager, x-ui's HTTPS port and the acme.sh user's home directory vary by deployment. Replace all example domains, container names and ports; they are not production values to copy.
Sources
Frequently Asked Questions
Why can standalone renewal fail while Caddy holds port 80?
Standalone HTTP-01 needs to bind TCP 80 temporarily. If Caddy already listens there, the challenge server may not bind. Also confirm DNS and firewall routing to the correct host.
Does renewal success after stopping Caddy mean x-ui uses the new certificate?
No. Confirm that the new certificate was installed to x-ui's configured path, then inspect the certificate served on x-ui's actual TLS port and SNI.
Can I use the Docker example for systemd-managed Caddy?
Do not copy it directly. Confirm how Caddy is managed and use the matching stop/start commands and failure-recovery plan.
How can I prevent Caddy from staying stopped during scheduled renewal?
Use pre/post hooks supported by the acme.sh release in use, verify that the scheduled job runs them, and keep a manual recovery path for script interruption or a failed service start.