Loading...

Command line

cdnctl usage guide

Use cdnctl when you need the same customer-facing operations as the panel from a terminal, script, or AI agent.

Back to Platform Help

Install and update

The distributed cdnctl binary is built from Go and does not require PHP, Composer, Python, Node.js, or kubectl.

curl -fsSL https://cdn.com.tr/downloads/cdnctl/install.sh | sh
cdnctl --version
cdnctl update --check
cdnctl update --yes

Authenticate

Login stores a token in ~/.cdn/config.json. The command output must not print user id, account id, or email fields.

cdnctl login --email <customer@example.com> --password <password>
cdnctl accounts list
cdnctl configure --endpoint https://cdn.com.tr --token <access-token>

Managed Container workflow

These commands mirror the panel flow for app creation, deploy, status, logs, imports, and scheduled jobs.

cdnctl container registry-credentials create --account <account_uuid> --name docker --registry-url https://index.docker.io/v1/ --username <user> --password <token>
cdnctl container apps create --account <account_uuid> --name <app_name> --image <registry>/<image> --tag <tag> --port <port> --healthcheck /health --domain <api.example.com>
cdnctl container imports database --account <account_uuid> --app <app_uuid> --file source.sql.gz
cdnctl container imports files --account <account_uuid> --app <app_uuid> --file app-data.tar.gz --target-path /app/data
cdnctl container jobs create --account <account_uuid> --app <app_uuid> --name <job_name> --schedule "*/30 * * * *" --method POST --path "/jobs/run" --secret-header-name X-Token --secret-source JOB_TOKEN
cdnctl container apps deploy --account <account_uuid> --app <app_uuid>
cdnctl container apps wait --account <account_uuid> --app <app_uuid> --status running --timeout 300
cdnctl container apps status --account <account_uuid> --app <app_uuid>
cdnctl container apps logs --account <account_uuid> --app <app_uuid> --tail 100

Object Storage control plane

Use cdnctl to create buckets, create access keys, and bind a bucket to an app. Use AWS CLI only for S3-compatible object operations.

cdnctl object-storage buckets create --account <account_uuid> --name app-media
cdnctl object-storage access-keys create --account <account_uuid> --bucket <bucket_uuid>
cdnctl object-storage bindings create --account <account_uuid> --app <app_uuid> --bucket <bucket_uuid> --access-key <key_uuid> --env-prefix S3