Openclaw Config

by @KakiGao

I can quickly move openclaw to anywhere by backing up the configuration

Install with ClawLodge CLIRequires clawlodge-cli
npm install -g clawlodge-cli
clawlodge install kakigao-openclaw-config
Best for
Includes
18 Filesv0.1.0

OpenClaw Configuration Backup

Version-controlled backup of OpenClaw configurations with full history tracking.

📁 Repository Structure

├── openclaw.json              # Main OpenClaw configuration
├── agents/                   # Agent configurations
│   └── main/
│       └── agent/            # Agent settings (models only, no auth)
├── workspace/                # Personalization
│   ├── SOUL.md              # AI persona
│   ├── USER.md              # User preferences
│   ├── MEMORY.md            # Long-term memory
│   ├── IDENTITY.md          # AI identity
│   ├── AGENTS.md            # Agent notes
│   └── *.md                 # Other workspace files
├── cron/                    # Scheduled tasks
├── custom_skills/           # Custom OpenClaw skills
├── SKILL.md                 # OpenClaw Git Backup skill documentation
├── backup.sh               # Backup script
└── restore.sh              # Restore script

🔐 Sensitive Data (Excluded)

The following are NOT tracked in Git to protect sensitive information:

  • credentials/ - Authentication tokens and pairing files
  • identity/ - Device authentication keys
  • devices/ - Paired device information
  • agents/main/sessions/*.jsonl - Session history with API keys
  • *.jsonl.lock - Session lock files
  • auth-profiles.json - Authentication profiles
  • Any file containing secrets or tokens

🚀 Quick Start

Initial Setup

# Clone and initialize
git clone [email protected]:KakiGao/openclaw_config.git
cd openclaw_config

# Pull latest changes
git pull origin main

Manual Backup

# Run backup script
./backup.sh

# View git log
git log --oneline -10

# View changes
git diff HEAD

Restore to This Machine

# Run restore script
./restore.sh

# Restart OpenClaw Gateway
openclaw gateway restart

📜 Git Workflow

View History

git log --oneline           # Compact view
git log --patch -5          # Detailed diff
git show COMMIT_HASH        # Specific commit

Compare Changes

git diff HEAD               # Uncommitted changes
git diff main..feature     # Branch comparison
git log -p --follow FILE    # File history

Rollback

# Revert to previous commit
git revert COMMIT_HASH

# Restore specific file
git checkout COMMIT_HASH -- path/to/file

📊 Backup Contents

WhatDescriptionTracked
ConfigurationMain settings (tokens as placeholders)✅
SkillsCustom skills✅
WorkspacePersonalization (SOUL, USER, MEMORY, etc.)✅
CronsScheduled tasks✅
Models ConfigAgent model configurations✅
CredentialsSensitive tokens❌
IdentityDevice authentication❌
DevicesPaired devices❌
SessionsAPI keys and history❌

🔄 Automated Backup

This repository is backed up daily at 11:00 AM via cron job.

Cron Configuration

# View cron jobs
crontab -l

# Daily backup at 11:00
0 11 * * * /path/to/backup.sh >> /var/log/openclaw-backup.log 2>&1

🔧 Configuration

Environment Variables

Create a .env file for sensitive configuration (NOT tracked in Git):

# OpenClaw API Keys (DO NOT commit real values)
OPENAI_API_KEY=${OPENAI_API_KEY}
DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN}
MINIMAX_API_KEY=${MINIMAX_API_KEY}
GITHUB_TOKEN=${GITHUB_TOKEN}

Note: The openclaw.json uses placeholders like ${API_KEY} - replace these with real values when restoring.

Custom Skills

Add custom skills to custom_skills/ directory. They will be included in the backup.

📝 Notes

  • API Keys: Use environment variables or .env file. Do not commit real keys.
  • Restoration: After restore, restart OpenClaw Gateway to apply changes.
  • Verification: Always verify critical configurations after restoration.
  • Security: Sensitive directories (credentials, identity, devices) are excluded from Git tracking.

Workspace

Updated 2026-04-22 18:06:29Published via clawlodge-cli/0.1.818 items

Loading files...

No preview selected

Select a file from the tree to preview its shared content.

No comments yet.

Related Lobsters