Linode CLI
Production Surface

linode-cli linodes list

linode-cli reference distilled to what engineers with production scars actually reach for. Now Akamai Cloud: same CLI.

22 entries
6 phases
linode-cli 5.x
What's not here, and why. linode-cli stackscripts: use cloud-init or Ansible for provisioning. Linode provisioning belongs in Terraform (the Linode provider is solid). linode-cli longview: console only. Object Storage uses the S3-compatible API. Use the AWS CLI with a custom endpoint. Note: Linode is now Akamai Cloud; the CLI and API are unchanged but branding is shifting.
cross-cutting: know these before anything else
configure + token
linode-cli configure linode-cli configure --token $LINODE_TOKEN # config stored in ~/.config/linode-cli # env var: LINODE_CLI_TOKEN linode-cli profile view
--text + --format for scripting
linode-cli linodes list --text --no-header linode-cli linodes list --format id,label,status,region --text --no-header linode-cli linodes list --json | jq '.[].id' # --text --no-header produces tab-separated output for xargs
regions + types
linode-cli regions list --format id,country,status linode-cli linodes types --format id,label,memory,vcpus,price.monthly linode-cli images list --format id,label,type,status | grep linode # pin image IDs: "linode/ubuntu24.04" etc
Phase 22 shown
ServicePhaseKey commandsUse case
linode-cli configure auth
linode-cli configure linode-cli configure --token $LINODE_TOKEN LINODE_CLI_TOKEN=$TOKEN linode-cli linodes list linode-cli profile view linode-cli profile token-create --label ci-token --expiry 2027-01-01T00:00:00
Single token per CLI config: no multi-account context switching like doctl. For multiple accounts, use LINODE_CLI_TOKEN env var scoped to the command. token-create generates a scoped token with an expiry. Prefer over using your personal token in CI. Tokens are managed under My Profile → API Tokens in the console.
linodes list / inspect linodes
linode-cli linodes list --format id,label,status,region,type,ipv4 linode-cli linodes view <id> linode-cli linodes list --format id,label --text --no-header | grep myapp linode-cli linodes stats <id> linode-cli linodes list --json | jq '.[] | select(.status != "running") | {id,label,status}'
stats returns CPU, I/O, and network stats for the past 24 hours: useful for a quick performance snapshot without opening the console. The jq filter surfaces non-running Linodes. Run this as a periodic check for unexpected shutdowns. Linode labels are unique per account, making them safe to use as identifiers in scripts.
linode power ops linodes
linode-cli linodes boot <id> linode-cli linodes reboot <id> linode-cli linodes shutdown <id> linode-cli linodes resize <id> --type g6-standard-4 --allow_auto_disk_resize true linode-cli linodes rebuild <id> --image linode/ubuntu24.04 --root_pass "$PASS"
resize requires the Linode to be shut down first. It won't error immediately but will queue until the next shutdown. rebuild reinstalls the OS and wipes all data. Use only when you mean it. allow_auto_disk_resize=true expands the disk to fill the new plan's disk allocation automatically.
linode SSH linodes
linode-cli linodes view <id> --format ipv4 --text --no-header | ssh deploy@$(cat -) ssh deploy@$(linode-cli linodes list --label myapp --format ipv4 --text --no-header | tr -d ' ') linode-cli linodes list --format id,label,ipv4 --text --no-header | column -t
The linode-cli has no built-in SSH command like doctl: shell substitution is the pattern. The column-formatted list gives a readable IP reference for a fleet. Add aliases to ~/.ssh/config for frequently accessed Linodes to avoid looking up IPs every time.
backups + snapshots linodes
linode-cli linodes backups-list <id> linode-cli linodes snapshot <id> --label myapp-$(date +%Y%m%d) linode-cli linodes backups-enable <id> linode-cli linodes backups-restore <id> --backup_id <backup-id> --linode_id <target-id> --overwrite true linode-cli images list --format id,label,type,size --json | jq '.[] | select(.type=="snapshot")'
Snapshots are stored as Images and count against your image storage quota (free up to 10GB per account). backups-enable enables the $2-5/month automated backup service: includes daily, weekly, and biweekly snapshots. Restore to a different Linode with --linode_id to test a restore without affecting production.
disk + config linodes
linode-cli linodes disks-list <id> --format id,label,size,status linode-cli linodes disk-resize <id> <disk-id> --size 40960 linode-cli linodes configs-list <id> --format id,label,kernel,root_device linode-cli linodes config-view <id> <config-id>
Disk resize requires the Linode to be shut down and cannot shrink below current usage. Config view shows the boot kernel and device map: useful when a Linode fails to boot and you need to confirm it's booting from the right config. Linode's boot configuration system is more granular than most VPS providers.
LKE clusters kubernetes
linode-cli lke clusters-list --format id,label,region,k8s_version,status linode-cli lke kubeconfig-view <id> --text --no-header | base64 -d > ~/.kube/linode-config export KUBECONFIG=~/.kube/linode-config linode-cli lke versions-list linode-cli lke cluster-dashboard-url <id>
Kubeconfig is returned base64-encoded: decode and write to a file explicitly. versions-list shows available Kubernetes versions for the region. cluster-dashboard-url generates a temporary authenticated URL to the Kubernetes dashboard: useful for quick visual inspection without setting up kubectl access on a new machine.
LKE node pools kubernetes
linode-cli lke pools-list <cluster-id> --format id,type,count,nodes.status linode-cli lke pool-update <cluster-id> <pool-id> --count 5 linode-cli lke pool-update <cluster-id> <pool-id> --autoscaler.enabled true --autoscaler.min 2 --autoscaler.max 10 linode-cli lke node-recycle <cluster-id> <pool-id> <node-id> linode-cli lke cluster-recycle <cluster-id>
node-recycle replaces a specific node: drains, deletes, and provisions a replacement. cluster-recycle rolls all nodes. Use after a Kubernetes minor upgrade to ensure nodes are running the new version. Autoscaler is configured per pool; enable with sensible min/max bounds to avoid surprise billing.
Object Storage storage
linode-cli obj mb s3://mybucket --cluster us-east-1 linode-cli obj ls linode-cli obj ls s3://mybucket linode-cli obj put ./file.tar.gz s3://mybucket/backups/ linode-cli obj get s3://mybucket/backups/file.tar.gz ./file.tar.gz # or use AWS CLI with Linode endpoint: aws s3 ls s3://mybucket --endpoint-url https://us-east-1.linodeobjects.com
Object Storage uses S3-compatible API: the AWS CLI with --endpoint-url is more capable than linode-cli obj for complex operations (presign, sync with delete, multipart). Configure with Object Storage access keys from the console, not your API token. Buckets are region-specific; check cluster/region before creation.
volumes (block storage) storage
linode-cli volumes list --format id,label,size,region,linode_id,status linode-cli volumes attach <vol-id> --linode_id <linode-id> linode-cli volumes detach <vol-id> linode-cli volumes resize <vol-id> --size 40 linode-cli volumes delete <vol-id> # volumes with no linode_id are unattached: still billed
Volumes without a linode_id are detached and still billed at the full rate. Resize only increases size: no shrinking. After resizing you must resize the filesystem inside the Linode (resize2fs for ext4). Detach before delete; deletion of an attached volume is blocked.
firewalls networking
linode-cli firewalls list --format id,label,status linode-cli firewalls rules-list <id> linode-cli firewalls rules-update <id> --inbound '[{"action":"ACCEPT","protocol":"TCP","ports":"443","addresses":{"ipv4":["0.0.0.0/0"]}}]' --inbound_policy DROP --outbound_policy ACCEPT linode-cli firewalls devices-list <id> linode-cli firewalls device-create <firewall-id> --id <linode-id> --type linode
Linode firewalls use inbound_policy and outbound_policy as defaults: DROP is the correct production default for inbound. rules-update replaces the entire ruleset atomically: build the full JSON array before calling it. Firewall devices list shows which Linodes are protected: any Linode not in a firewall is fully exposed.
NodeBalancers networking
linode-cli nodebalancers list --format id,label,hostname,region,transfer.total linode-cli nodebalancers configs-list <id> --format id,port,protocol,algorithm,check,check_path linode-cli nodebalancers nodes-list <nb-id> <config-id> --format id,label,address,status,weight linode-cli nodebalancers node-update <nb-id> <config-id> <node-id> --weight 50 linode-cli nodebalancers node-delete <nb-id> <config-id> <node-id>
Node status in nodes-list shows UP/DOWN/unknown: the first check when traffic stops reaching backends. check_path in configs confirms what path the health check is probing. Adjusting weight enables weighted traffic splitting between nodes: zero-weight effectively drains a node without removing it.
domains / DNS networking
linode-cli domains list --format id,domain,type,status linode-cli domains records-list <domain-id> --format id,type,name,target,ttl_sec linode-cli domains records-create <domain-id> --type A --name api --target 10.0.0.1 --ttl_sec 300 linode-cli domains records-update <domain-id> <record-id> --target 10.0.0.2 linode-cli domains records-delete <domain-id> <record-id>
Linode DNS is free for domains pointed at Linode nameservers. Record operations need the domain ID, not the domain name: list first. TTL of 300 seconds (5 minutes) is reasonable for records that may change; use higher values for stable records to reduce DNS lookup latency.
VPC + private networking networking
linode-cli vpcs list --format id,label,region,subnets linode-cli vpcs view <id> linode-cli vpcs subnets-list <vpc-id> --format id,label,ipv4,linodes linode-cli networking ips-list --format address,type,region,linode_id linode-cli networking ip-addresses-assign --region us-east --assignments '[{"address":"<ip>","linode_id":<id>}]'
Linode VPCs are region-scoped and relatively new. Check regional availability before designing around them. ips-list shows all IPs in the account including reserved IPs: unassigned reserved IPs are billed. Subnet linodes field shows which Linodes are attached to a subnet without querying each Linode individually.
managed databases databases
linode-cli databases list --format id,label,engine,version,region,status,cluster_size linode-cli databases postgresql-view <id> linode-cli databases postgresql-credentials-view <id> --text --no-header linode-cli databases postgresql-patch <id> linode-cli databases postgresql-backups-list <id> --format id,created,type
credentials-view returns host, port, username, and password. Treat this output as sensitive and pipe directly to a secrets store rather than printing to a shared terminal. postgresql-patch applies the latest minor version patch to the cluster: triggers a rolling restart. Check backups-list before patching to confirm a recent backup exists.
DB access controls databases
linode-cli databases postgresql-access-controls-list <id> linode-cli databases postgresql-access-controls-update <id> --allow_list '["10.0.0.1/32","192.168.1.0/24"]' # replaces the entire allow list: build the full JSON array # empty allow_list blocks all access: even from your app linode-cli databases mysql-access-controls-update <id> --allow_list '["10.0.0.0/8"]'
Linode managed databases use an IP allowlist model: no connection without an explicit CIDR entry. access-controls-update replaces the entire list atomically: build the complete JSON array including all existing entries before calling. An empty allowlist blocks all connections immediately, including your application servers.
No entries match this filter.