mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-23 03:27:27 +09:00
## Summary Renew the local Builder HTTPS certificate for `wstd.dev` and its wildcard subdomains. ## Todo - [x] Replace the tracked certificate, private key, and HAProxy bundle - [x] Verify certificate dates, SANs, and matching public/private keys - [x] Verify repository formatting and diff integrity - [x] Review documentation impact — no product documentation changes are required ## Verification - `openssl verify -partial_chain -CAfile https/fullchain.pem https/fullchain.pem` - Certificate and private-key public keys match - HAProxy certificate and bundled private-key public keys match - `pnpm oxfmt --check` (using the existing Builder dependency installation) - `git diff --check` No fixture inputs or generated outputs are affected.
Admin only
Based on this article https://dev.to/istarkov/fast-and-easy-way-to-setup-web-developer-certificates-450e
sudo rm -rf /tmp/certbot/
sudo rm -rf /tmp/letsencrypt/
mkdir -p /tmp/certbot/
mkdir -p /tmp/letsencrypt/
infisical login
# When running infisical init, select: Webstudio > webstudio
infisical init
CLOUDFLARE_API_KEY=$(infisical secrets get WSTD_DEV-CLOUDFLARE_ZONE_TOKEN --path='/CLI' --env=staging --plain)
# Create cloudflare.ini with proper formatting and permissions
echo "dns_cloudflare_api_token = ${CLOUDFLARE_API_KEY}" > /tmp/certbot/cloudflare.ini
chmod 600 /tmp/certbot/cloudflare.ini
docker run -it --rm --name certbot \
-v "/tmp/letsencrypt/data:/etc/letsencrypt" \
-v "/tmp/certbot:/local/certbot" \
certbot/dns-cloudflare certonly \
--dns-cloudflare \
--dns-cloudflare-credentials /local/certbot/cloudflare.ini \
--agree-tos \
--noninteractive \
-m istarkov@gmail.com \
-d wstd.dev \
-d '*.wstd.dev'
sudo chown -R $USER:$(id -g) /tmp/letsencrypt
cp /tmp/letsencrypt/data/live/wstd.dev/fullchain.pem ./https/fullchain.pem
cp /tmp/letsencrypt/data/live/wstd.dev/privkey.pem ./https/privkey.pem
# Haproxy key
cd https
cat ./fullchain.pem ./privkey.pem > ./haproxy.pem