Run Cyproxy on a server with https¶
Use https when you or your AI clients connect from other computers, or when you use a cloud service such as Claude.ai.
The file docker-compose.https.yml adds Caddy. Caddy gets a certificate from Let's Encrypt and renews it.
Procedure¶
- Point a DNS name (for example
cyproxy.example.com) at the server. Open ports 80 and 443. - Copy
.env.exampleto.envand set:
CYPROXY_DOMAIN=cyproxy.example.com
- Start Cyproxy:
docker compose -f docker-compose.yml -f docker-compose.https.yml up -d
- Open
https://cyproxy.example.comimmediately and create the owner account. The first person who opens the page becomes the owner, and setup closes 30 minutes after the start. See Quick start.
The console is at https://cyproxy.example.com. AI clients connect to https://cyproxy.example.com/mcp.
With this setup, Cyproxy has no published port. Only Caddy can connect to it.
Before you use Cyproxy over a network¶
- Make sure that the owner account exists and has a strong password.
- Keep Require an authenticator app on. See Authenticator app.
- Set your own encryption key,
CYPROXY_ENCRYPTION_KEY, in.env. Then a copy of the data volume or of a backup does not contain the key. Keep a copy of the key in a different safe location. If Cyproxy already has data, see Change the encryption key. See also What is encrypted. - Plan your backups. The data volume contains your keys, in encrypted form.
Use your own reverse proxy¶
Forward requests to port 8787 and set these variables:
| Variable | Value |
|---|---|
CYPROXY_PUBLIC_MCP_URL |
The /mcp address that AI clients use. |
CYPROXY_PUBLIC_HOSTS |
Your host name. |
CYPROXY_TRUSTED_PROXIES |
The address of the proxy. Cyproxy then trusts its X-Forwarded-* headers. |
Set CYPROXY_TRUSTED_PROXIES to * only if both conditions are true:
- Only your proxy can connect to Cyproxy.
- The proxy replaces the
X-Forwarded-Forheader. It must not add to it.
If not, a client can send a false address and avoid the sign-in limit.
One container only¶
Cyproxy is one process with one data folder. Do not run two copies with the same data volume.