Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Keep provider API keys outside agent workspaces, prefer OpenClaw SecretRefs for supported fields, and restrict every credential to the exact destinations that need it. A secure deployment treats the Gateway host, state directory, logs, subprocesses, and network egress as separate trust boundaries rather than assuming that an agent can safely handle plaintext secrets.

For a local installation, use the Gateway process environment or a trusted global dotenv file such as ~/.openclaw/.env (or $OPENCLAW_STATE_DIR/.env), lock the state directory to your account, and enable the egress proxy when Gateway-hosted subprocesses need provider access. For Kubernetes, use a Kubernetes Secret instead of a ConfigMap or committed manifest. Then scope, rate-limit, rotate, and revoke credentials as if an agent could be prompt-injected.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What OpenClaw API-key security is protecting

An OpenClaw API key is not just a value in a configuration file. It is a capability that can authorize requests, spend money, read data, or modify an external service. The security question is therefore broader than “Where do I put the key?” You must control who can read it, which process can use it, which destinations can receive it, and how quickly you can revoke it.

The practical trust boundary

OpenClaw workspaces can contain cloned repositories, generated files, tool output, and instructions supplied by other people. An agent may be able to read or write those files, so a workspace is not a trusted credential store. The same caution applies to shell history, logs, session transcripts, crash reports, and command output: each can preserve a secret long after the original process exits.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

The Gateway host and its state directory are the more appropriate local boundaries. Give access only to the user or service account that operates OpenClaw, and treat anyone who can read that account’s files as able to access the credentials and session data stored there.

Where to store a key: options and trade-offs

Choose the narrowest storage mechanism that fits your deployment. The table focuses on the properties that matter when an agent or one of its subprocesses is compromised.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Location or mechanism Can the agent read plaintext? Protection at rest Exact-destination binding Rotation and revocation Best fit
Workspace .env Potentially yes; provider credential variables and endpoint-routing controls are deliberately ignored from untrusted workspace dotenv files. Only filesystem permissions; unsuitable as a trust boundary. None. Depends on the provider; no OpenClaw control. Never use for provider credentials.
Gateway process environment Available to the Gateway process; whether a child process receives it depends on how that subprocess is launched. Protected by the service account and host permissions. Not by itself. Change the service environment and restart the Gateway. Local services and controlled deployments.
~/.openclaw/.env or $OPENCLAW_STATE_DIR/.env Available to the trusted Gateway environment, not to an untrusted workspace dotenv file. Depends on state-directory permissions. Not by itself. Edit or replace the file, then restart as required. Single-user or dedicated-host installations.
Supported configuration env value Available to OpenClaw where that field is supported; plaintext handling depends on the process and file permissions. Use a configuration file readable only by the service account. Not by itself. Update the value and restart or reload according to the deployment. Deployments that already manage environment values in configuration.
OpenClaw SecretRef backed by the shared Secret Store Protected secret entries can be delivered to supported Gateway-hosted subprocesses as opaque sentinels when the egress proxy is enabled; the agent does not receive the plaintext. Managed by the shared store and its access controls. Yes, when the egress proxy is configured with exact allowed HTTPS hosts. Change or revoke the stored value without copying it into prompts or commands. Preferred for supported credential fields and controlled subprocess access.
Kubernetes Secret Presented to the deployment according to Kubernetes and pod configuration; keep it out of manifests and ConfigMaps. Protected by cluster access controls and Secret handling. Network policy and the egress design provide destination control; the Secret alone does not. Patch the Secret and restart the deployment. Kubernetes Gateway deployments.

No storage option makes a credential harmless. A key in a trusted environment can still be abused by a process that legitimately receives it, which is why destination restrictions, least-privilege scopes, rate limits, and rotation are essential.

Recommended setup for a local or service installation

1. Keep credentials out of agent workspaces

Do not place provider keys in a project’s .env, a repository file, a scratch note, or a prompt. OpenClaw blocks provider credential variables and endpoint-routing controls from untrusted workspace dotenv files. That behavior prevents a cloned or tool-written workspace from substituting a provider account or changing the endpoint used by the Gateway.

Put the value in the Gateway process environment, a trusted global dotenv file, or a supported configuration env value instead. A global file means the one associated with the OpenClaw state root, not a file inside an individual project.

2. Use a trusted global dotenv file when appropriate

For a single-user installation, ~/.openclaw/.env is the conventional trusted location. If you set a custom state root, use $OPENCLAW_STATE_DIR/.env. Ensure the Gateway reads that file as its service account and does not inherit a project directory as the source of provider variables.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Keep the file out of source control, backups accessible to other users, and diagnostic bundles. A trusted location is still plaintext storage, so its security depends on the permissions and operating-system account that can read it.

3. Prefer SecretRefs for supported credential fields

When the credential field supports an OpenClaw SecretRef, store the value in the shared Secret Store and reference it rather than copying the value into a prompt, command line, or ordinary configuration text. SecretRefs let OpenClaw resolve a value at runtime while keeping the secret out of agent-visible conversation content.

Protected secret entries are designed for use by supported Gateway-hosted subprocesses without exposing their plaintext to the agent. Do not provide a secret template to the agent, override the protected variable, or print the resolved value. A debugging command that echoes the environment can defeat the entire design.

4. Bind each secret to exact egress destinations

Enable the secret egress proxy when a Gateway-hosted subprocess must call an external API. Each stored key should specify the exact allowed HTTPS host, such as api.openai.com for a provider endpoint. Do not authorize a broad suffix or an arbitrary URL when the integration needs only one host.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

With the proxy active, the agent receives an opaque value in the form of an oc-sent-v2...end sentinel rather than the real key. The Gateway substitutes the real value only when the outbound request is addressed to an authorized destination. If a request targets an unbound host, the proxy refuses it instead of sending the credential.

Redirects require their own authorization. The proxy does not automatically treat a redirect target as trusted merely because the original URL was allowed. Authorize every legitimate destination in the provider’s documented request flow, and reject unexpected redirect targets.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

5. Restart and verify the Gateway safely

  1. Place the provider credential in the Gateway environment, trusted global dotenv file, or Secret Store reference.
  2. Configure the egress proxy before enabling a subprocess that needs outbound access.
  3. Restart the Gateway using your normal service-management method so it receives the new environment or secret configuration.
  4. Test a minimal provider request that does not print request headers, environment variables, prompts, or response data containing credentials.
  5. Confirm that an allowed host succeeds and an unbound host is refused. Treat a refusal as a security control working, not as a reason to widen the allowlist.

Lock down the OpenClaw state directory

Set user-only permissions

The official hardening guidance specifies mode 700 for ~/.openclaw and mode 600 for ~/.openclaw/openclaw.json. On a Unix-like host, the corresponding commands are:

chmod 700 ~/.openclaw
chmod 600 ~/.openclaw/openclaw.json

If you use a custom state root, apply the same principle to that directory and its configuration file. The directory must be searchable and readable only by the OpenClaw account; the configuration file must be readable and writable only by that account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run openclaw doctor after installation or a permissions change. It can warn about weak permissions and offer to tighten them. Review the proposed changes before accepting them if your service account or deployment model is unusual.

Protect more than the configuration file

Permissions on openclaw.json do not protect data written elsewhere. Logs and session transcripts can contain pasted secrets, file contents, command output, URLs, and other sensitive context. Session databases, temporary files, backups, and crash dumps belong inside the same security review.

  • Restrict log and session storage to the Gateway account and trusted administrators.
  • Set retention periods that match your operational needs; delete old transcripts that no longer serve a purpose.
  • Exclude state files and trusted dotenv files from source-control and broad file-sharing workflows.
  • Use full-disk encryption on shared, portable, or physically exposed hosts.
  • Run the Gateway under a dedicated operating-system account where practical, rather than an account used for unrelated work.

OpenClaw’s state root should be shared only with trusted administrators. Anyone who can read it may be able to recover credentials, conversation context, or commands that reveal how those credentials were used.

Keeping an agent subprocess from seeing the key

Use the Gateway as the secret-handling boundary

The safest pattern is for the agent to request an operation while the Gateway-hosted component performs the network call under an egress policy. A SecretRef-backed protected entry can be supplied to a supported subprocess as an opaque sentinel, with the Gateway proxy injecting the plaintext only for an authorized destination.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

This is different from placing a normal environment variable in every child process. An ordinary environment variable can be read by code that dumps its environment, by a diagnostic command, or by another process with sufficient host privileges. SecretRefs and the egress proxy reduce that exposure, but only for the supported Gateway-hosted path.

Do not defeat the protection in prompts or commands

  • Never paste the key into an agent prompt, issue, ticket, or chat transcript.
  • Never put it directly in a shell command, URL, command-line argument, or here-document.
  • Do not ask the agent to print, decode, transform, or “verify” the secret.
  • Do not replace an opaque sentinel with the plaintext value to make a failing integration work.
  • Do not enable a debugging mode that records authorization headers or complete request bodies.

If an integration requires the subprocess to know the plaintext rather than sending through the protected proxy path, treat that subprocess as a credential-bearing service. Isolate it under its own account, narrow its file and network permissions, and give it a credential with the smallest possible scope.

Kubernetes deployment: use Kubernetes Secrets

Create and preserve the deployment secret

The official OpenClaw Kubernetes deployment flow accepts provider keys from environment variables, creates a Secret named openclaw-secrets containing the API keys and a Gateway token, and preserves existing values unless you explicitly overwrite them. Export values only in the controlled shell or secret-injection system used to run the deployment script.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not put raw keys in a ConfigMap, a committed YAML file, a Helm values file checked into a repository, or an issue tracker. Protect access to the Kubernetes Secret itself with cluster role-based access control and audit who can read it.

Rotate a Kubernetes credential

  1. Create or obtain the replacement provider credential with the same or narrower scope.
  2. Patch the openclaw-secrets Secret through your approved cluster administration workflow, without placing the raw value in a shared command history.
  3. Restart the OpenClaw deployment so the Gateway receives the replacement value.
  4. Verify a minimal allowed request and monitor for authentication failures.
  5. Revoke the old provider credential after the new one is confirmed, unless an overlap window is required by the provider.

Limit network exposure

Keep the Gateway bound to loopback and use port-forwarding for administration unless you have a properly authenticated, TLS-protected remote entry point. A publicly reachable unauthenticated Gateway turns every credential-handling feature into a remote compromise risk. Apply network egress allowlists so pods can reach only approved provider endpoints and required control-plane services.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Scope, rate-limit, rotate, and revoke

Use the smallest provider permission set

Create separate credentials for separate jobs when the provider supports it. A key used only to submit text should not also be able to administer accounts, read unrelated data, or change billing settings. Restrict project, tenant, model, repository, or resource access according to the provider’s controls.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Add realistic rate limits

Rate limits cap damage from a runaway loop, prompt injection, or compromised integration. Set limits that permit the expected workload but make abnormal usage visible quickly. Monitor both provider-side usage and Gateway-side request logs without recording secret values.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Prefer short-lived credentials

Enterprise guidance recommends replacing static API keys with short-lived, automatically rotating credentials through OAuth-based authentication or workload identity federation where the provider supports them. If a static key is unavoidable, set a rotation schedule, document the owner, and test revocation before an incident occurs.

Maintain an emergency revocation path

Keep provider-console access and the identity that owns the credential separate from the OpenClaw runtime account. During an incident, you should be able to revoke the key, disable the affected integration, and restart the Gateway without needing the compromised agent to cooperate.

How to audit an existing OpenClaw installation

  1. Search workspace files, repositories, tickets, and prompts for provider key patterns. Remove exposed copies and revoke any credential that may have been read.
  2. Inventory every location from which the Gateway can receive credentials: process environment, trusted dotenv files, configuration, SecretRefs, Kubernetes Secrets, and provider login sessions.
  3. Check ~/.openclaw and openclaw.json permissions, then run openclaw doctor.
  4. Review logs, transcripts, session databases, shell history, backups, and crash reports for pasted secrets or authorization headers.
  5. List every Gateway-hosted subprocess and determine whether it receives plaintext, an opaque sentinel, or no credential at all.
  6. Review egress rules. Every secret should have an explicit destination, and every redirect in the provider flow should be independently authorized.
  7. Check Kubernetes manifests and cluster access policies for raw credentials, broad Secret read permissions, public Gateway exposure, and missing network restrictions.
  8. Confirm that provider scopes, rate limits, rotation dates, and revocation owners are documented.

What to do if a key may have leaked

Assume the key is compromised if it appeared in a workspace, prompt, command line, log, transcript, URL, screenshot, repository, or untrusted process. Do not wait for proof of misuse.

  1. Revoke or disable the provider credential immediately.
  2. Issue a replacement with narrower scopes and appropriate rate limits.
  3. Replace it in the trusted Gateway environment, Secret Store entry, or Kubernetes Secret.
  4. Restart affected Gateway processes and workloads.
  5. Preserve relevant audit records while removing secret values from routine logs and shared copies.
  6. Inspect provider usage, destinations, and timestamps for unauthorized activity.
  7. Correct the exposure path, such as weak filesystem permissions, a workspace file, an overly broad egress rule, or an unsafe debugging command.

Common mistakes and their fixes

Mistake Why it is dangerous Safer correction
Putting the key in a project .env Workspace files are not trusted and may be cloned, edited by tools, or read by an agent. Move it to the Gateway environment, trusted global dotenv file, supported configuration field, or SecretRef.
Saving a plaintext key in a broadly readable configuration Any account or process that can read the file can copy the credential. Use mode 600, prefer a SecretRef, and restrict the owning service account.
Allowing the proxy to reach an entire domain family A stolen or redirected request may send the key somewhere you did not intend. Bind the secret to exact HTTPS hosts and authorize redirect destinations separately.
Printing the environment while troubleshooting The key can enter logs, transcripts, shell history, or support tickets. Test a minimal request without exposing headers or values.
Putting Kubernetes credentials in a ConfigMap or repository Those locations are routinely copied, reviewed, and retained. Use openclaw-secrets with cluster access controls and restart after rotation.
Exposing the Gateway remotely without strong authentication and TLS An attacker may reach credential-bearing operations directly. Keep it on loopback with port-forwarding or deploy a properly authenticated, TLS-protected entry point.
Using one powerful, permanent key everywhere One compromise creates a large and long-lived blast radius. Use separate, least-privilege, short-lived or automatically rotating credentials.

A secure operating pattern

For most local installations, the practical baseline is: keep provider variables out of workspaces; load them through the Gateway environment or a user-only global dotenv file; use SecretRefs for supported fields; enable exact-host egress controls for subprocess access; set the state directory to 700 and the configuration file to 600; protect logs and transcripts; and rotate credentials on a schedule.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For Kubernetes, use the deployment’s openclaw-secrets Secret, keep raw values out of manifests and ConfigMaps, restrict Secret readers, restart after changes, and keep the Gateway private unless a remote endpoint is fully authenticated and encrypted. In both environments, least privilege and a tested revocation process matter as much as where the initial key is stored.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.