Relays Oblivious HTTP requests to protect IP metadata in the Payjoin v2 protocol. This is based on a caddy server.
- Building the Docker Image:
- Ensure Docker is installed on your system.
- Clone the repository containing the Dockerfile and Caddyfile.
- Navigate to the directory and build the Docker image:
docker build -t caddy-ohttp-relay .To run the Caddy server with automatic HTTPS, execute the following command, replacing your_server_name and your_gateway_url with your actual server name and OHTTP gateway URL:
docker run -d -p 80:80 -p 443:443 \
-e SERVER_NAME='your_server_name' \
-e OHTTP_GATEWAY='your_gateway_url' \
--name my-caddy-ohttp-relay caddy-ohttp-relayCaddy will automatically handle HTTPS, including obtaining and renewing SSL/TLS certificates.
- For initial testing, use the staging environment of Let's Encrypt. Modify the Caddyfile to include the tls block as shown below.
- Rebuild the Docker image and run the container.
- Remember to remove the tls block when you are ready to go live.
tls {
ca https://acme-staging-v02.api.letsencrypt.org/directory
}- Once you have finished testing, remove the tls block from the Caddyfile to switch back to the production environment of Let's Encrypt.
- Rebuild the Docker image and redeploy the container.
- Caddy will now obtain trusted certificates from Let's Encrypt's production environment.
Monitor the logs of your Docker container to ensure everything is running smoothly:
docker logs my-caddy-ohttp-relayLook out for any errors and confirm that SSL/TLS certificates are being obtained successfully.
- Regularly update your Docker image to get the latest version of Caddy and security updates.
- Use Docker commands to stop, remove, rebuild, and restart the container with the new image.