> For the complete documentation index, see [llms.txt](https://docs.bluebubbles.app/server/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bluebubbles.app/server/advanced/byo-proxy-service-guides/caddy-and-duckdns.md).

# Caddy & DuckDNS

A way to get https when portforwarding with bluebubbles

This guide is written with the intention caddy is deployed on the same mac as your bluebubbles server but the process is similar if you have a remote caddy server.

Benefits:

* Works nonstandard ports

### Requirements

* A duckdns account with a domain <https://www.duckdns.org/domains>
* A setup bluebubbles server
* The ability to portforward your mac mini or reverse proxy to a machine that can be portforwarded (ex: aws, gcp, oracle, etc)

### Steps to setup caddy

1. Download caddy with duckns and move it to your home folder with the following command

Intel Macs:

`curl -o ./caddy https://caddyserver.com/api/download?os=darwin&arch=amd64&p=github.com/caddy-dns/duckdns&idempotency=8875705962096`

Apple Silicon:

`curl -o ./caddy https://caddyserver.com/api/download?os=darwin&arch=arm64&p=github.com/caddy-dns/duckdns&idempotency=28552737821716`

1. Make caddy executable with the command `chmod 755 ./caddy`
2. Download the template caddy file with the following command:

`curl -o ./Caddyfile https://raw.githubusercontent.com/Rihcus/BB-dynamic-dns-duckdns/main/Caddyfile`

1. Edit the Caddyfile

* replace the example domains with your domains
* replace `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with your duckdns token
* Optional adjust the https/http or bluebubbles server ports as needed

1. For testing purposes set your duckdns domain to the local ip of your bluebubbles server using the duckdns web portal

{% embed url="<https://www.duckdns.org/domains>" %}

1. test the config with `./caddy run`
2. if the config works and you can access your domain via https use `./caddy start` to make it auto run
3. Setup portforwarding (not covered in this guide)
4. Optional install duckdns to your mac server in order to auto-update public ip

{% embed url="<https://www.duckdns.org/install.jsp>" %}

#### Credit

Guide created by @Deemo in the BlueBubbles Discord


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bluebubbles.app/server/advanced/byo-proxy-service-guides/caddy-and-duckdns.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
