#Best practices after fresh install

1 messages ยท Page 1 of 1 (latest)

rough oasis
#

If I've just freshly installed OpenClaw on a Linux VPS (Ubuntu 24.04). What are some of the best practices I should implement to make OpenClaw perform optimally?

fossil magnetBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> โœ… Mark Solution

merry girderBOT
stable boneBOT
#

Let me pull the installed docs paths first so I don't make up links/keys.

#

Yep. For a fresh Ubuntu VPS, Iโ€™d optimize for reliability and safe remote access first.

#
  [Service]
  Environment=OPENCLAW_NO_RESPAWN=1
  Environment=NODE_COMPILE_CACHE=/var/tmp/openclaw-compile-cache
  Restart=always
  RestartSec=2
  TimeoutStartSec=90

Docs: https://docs.openclaw.ai/vps

If you want, I can turn that into a copy-paste post-install checklist for your exact VPS size and access setup.

rough oasis
#

sure

stable boneBOT
#

Yep, hereโ€™s a solid post-install checklist for an Ubuntu VPS.

1) Verify the install

openclaw --version
node -v
openclaw status
openclaw doctor

2) Keep the Gateway private

Recommended baseline:

openclaw config set gateway.bind loopback
openclaw config set gateway.auth.mode token
openclaw doctor --generate-gateway-token
#
openclaw gateway restart

3) Pick one remote-access path

Option A, Tailscale Serve (my favorite):

openclaw config set gateway.tailscale.mode serve
openclaw config set gateway.trustedProxies '["127.0.0.1"]'
openclaw gateway restart
tailscale serve status

Option B, SSH tunnel from your laptop:

#
ssh -N -L 18789:127.0.0.1:18789 user@your-vps

Then open http://127.0.0.1:18789/.

4) Make sure it stays up

sudo loginctl enable-linger $USER
systemctl --user status openclaw-gateway.service

Optional tuning for small VPSes:

systemctl --user edit openclaw-gateway.service
#

Paste:

[Service]
Environment=OPENCLAW_NO_RESPAWN=1
Environment=NODE_COMPILE_CACHE=/var/tmp/openclaw-compile-cache
Restart=always
RestartSec=2
TimeoutStartSec=90

Then:

systemctl --user daemon-reload
systemctl --user restart openclaw-gateway.service

5) Use server-friendly model auth

#

For always-on boxes, prefer API keys on the VPS over browser/OAuth-style setups.

Put them in:

~/.openclaw/.env

Then verify:

openclaw models status

Also, use a strong primary model plus fallbacks. Model docs: https://docs.openclaw.ai/concepts/models

6) Security quick wins

#
chmod 700 ~/.openclaw
openclaw security audit --deep

7) Backup from day one

openclaw backup create --verify

And keep your workspace in a private git repo:

cd ~/.openclaw/workspace
git init
git add .
git commit -m "Initial workspace backup"
#

Do not commit ~/.openclaw.

8) If the VPS is tiny

If youโ€™re on 1 GB RAM, add swap:

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Also, prefer cloud/API models over local models on small VPSes.

9) Routine health commands

rough oasis
#

from openclaw doctor:

โ—‡ Bootstrap file size โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ Workspace bootstrap files are near configured limits: โ”‚
โ”‚ - AGENTS.md: 11,683 chars (97% of max/file 12,000) โ”‚
โ”‚ Total bootstrap injected chars: 25,400 (42% of max/total 60,000). โ”‚
โ”‚ Total bootstrap raw chars (before truncation): 25,400. โ”‚
โ”‚ โ”‚
โ”‚ - Tip: tune agents.defaults.bootstrapMaxChars for per-file limits. โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Is this a concern? How best should I address it?

stable boneBOT
#

Let me check the bootstrap docs so I can give you the clean answer, not vibes.

#

Not an immediate problem, no. Itโ€™s a warning, not a failure.

What your output means:

  • AGENTS.md is close to the per-file cap: 11,683 / 12,000 chars
  • Total bootstrap size is fine: 25,400 / 60,000 chars

So the real risk is per-file truncation, not total budget.

My recommendation

Best fix: keep AGENTS.md focused on the stuff that truly must load every session.

Good split:

  • AGENTS.md = core rules, priorities, standing orders
  • SOUL.md = tone/personality
  • USER.md = user facts/preferences
#
  • TOOLS.md = local tool notes/conventions
  • longer procedures / examples = separate docs or skills, read on demand

When it becomes a real concern

If AGENTS.md grows past the cap, the tail gets truncated when injected. That means instructions near the end may silently stop being seen.

In your case

Because total budget is only 42%, you do not need to raise bootstrapTotalMaxChars.

If your AGENTS.md is already lean and the extra text is genuinely important every session, then a small bump to bootstrapMaxChars is reasonable, for example:

{
  agents: {
    defaults: {
      bootstrapMaxChars: 16000
#
    }
  }
}

Iโ€™d do that only after trimming obvious fluff, since bigger bootstrap means more prompt cost every run.

Quick sanity check

Run:

/context
/context detail

That will show raw vs injected sizes and whether truncation is actually happening.

rough oasis
#

I worked on that myself. Here is another issue I encountered:
can you see this? OpenClaw added to Discord is not responding.
#1491065264530264096 message

stable boneBOT
#

Iโ€™m going to check that linked Discord context first, then Iโ€™ll tell you exactly what I can and canโ€™t see.

#

I canโ€™t open that linked Discord message from here, I donโ€™t have access to that channel.

Since this is troubleshooting, the first thing I need is:

openclaw --version

Then please run this exact set and paste the output:

openclaw status
openclaw gateway status
openclaw channels status --probe
openclaw pairing list --channel discord
openclaw logs --follow
#

For Discord specifically, the most common causes are:

  • mention required in guild channels
  • pairing pending
  • allowlist / group policy mismatch

Typical log clues look like:

  • drop guild message (mention required
  • pairing request
  • blocked or allowlist

Also useful: does it fail only in the server, or also in DMs?

If you paste openclaw --version plus those command outputs, I can usually narrow it down fast. Docs: https://docs.openclaw.ai/help/troubleshooting

rough oasis
#

openclaw-agent@automation:~$ openclaw channels status --probe

๐Ÿฆž OpenClaw 2026.4.21 (f788c88)

โ”‚
โ—‡
Gateway reachable.

  • Discord default: enabled, configured, running, connected, in:48m ago, bot:@D333's OpenClaw, token:config, intents:content=limited, works
  • Telegram default: enabled, configured, running, connected, mode:polling, bot:@Lobsta_bot, token:config, works

Tip: status --deep adds gateway health probes to status output (requires a reachable gateway).
openclaw-agent@automation:~$ openclaw pairing list --channel discord

๐Ÿฆž OpenClaw 2026.4.21 (f788c88)

No pending discord pairing requests.

stable boneBOT
#

Nice, that rules out a few common failures. Iโ€™m going to check the Discord docs/log signatures for that content=limited piece before I point you at the next fix.

#

Yep, this helps a lot.

Good news: the Discord transport itself is up, connected, and probeable. Pairing is not the blocker.

The line that jumps out is:

intents:content=limited

For โ€œbot is online but no guild repliesโ€, the two big suspects now are:

  1. Discord message content intent
  2. Guild/channel gating (groupPolicy, guild allowlist, requireMention, per-channel allowlist, user allowlist)

First thing I would check

In the Discord Developer Portal โ†’ Bot โ†’ Privileged Gateway Intents:

#
  • enable Message Content Intent
  • enable Server Members Intent (recommended)
  • then restart the gateway

Docs: https://docs.openclaw.ai/channels/discord#troubleshooting

Then test with logs open

Run:

openclaw status
openclaw logs --follow

Then send a fresh test message in the server, ideally @mentioning the bot once.

What to look for in logs

#

If you see:

  • drop guild message (mention required
    โ†’ mention gating is blocking it

  • blocked / allowlist
    โ†’ guild/channel/user allowlist is blocking it

Very common config gotchas

If groupPolicy: "allowlist" is set, make sure:

  • the server ID is present under channels.discord.guilds
  • if you defined a channels map under that guild, the specific channel is listed
  • if you set a users allowlist, your user ID is in it
  • requireMention is under the right place: channels.discord.guilds.<guildId> or the channel entry

If itโ€™s your private server

#

A common working setup is:

{
  channels: {
    discord: {
      groupPolicy: "allowlist",
      guilds: {
        YOUR_SERVER_ID: {
          requireMention: false,
          users: ["YOUR_USER_ID"],
        },
      },
    },
  },
}
#

If you paste these next, I can usually pinpoint it fast:

  1. openclaw status
  2. the relevant openclaw logs --follow lines from one failed test message
  3. your channels.discord config block with the token redacted
rough oasis
#

"First thing I would check
In the Discord Developer Portal โ†’ Bot โ†’ Privileged Gateway Intents:
enable Message Content Intent
enable Server Members Intent (recommended)
then restart the gateway" - already enabled.

  1. nothing showed up in 'openclaw logs --follow'

  2. how to see?

stable boneBOT
#

I want to give you the exact config-inspection command, not a guessed one. Checking the CLI docs quickly.

#

Yep, for 3, easiest way is:

openclaw config get channels.discord --json

Redact the token if needed, then paste it here.

For 2, if you sent a fresh test message and nothing at all appeared in openclaw logs --follow, that usually means the event is not reaching the gateway. That points more to Discord-side visibility/permissions than pairing.

Next checks Iโ€™d do

  1. Make sure youโ€™re testing the same bot
    The probe says the connected bot is:
#
@D333's OpenClaw
  1. Check the bot can see the exact channel
    In Discord channel permissions, make sure the bot has at least:

    • View Channels
    • Send Messages
    • Read Message History
    • if this is a thread/forum/media post: Send Messages in Threads
  2. If in doubt, re-invite the bot
    With:

    • bot
    • applications.commands
  3. Do one DM test

#

If DM works but guild/thread does not, that narrows it hard to guild config/permissions.

Also paste these if you can

openclaw config get channels.discord.groupPolicy
openclaw config get channels.discord.guilds --json

Thatโ€™ll tell us really fast whether this is:

  • guild allowlist
  • requireMention
  • wrong guild/channel config
  • or Discord permissions on the channel/thread

My guess right now is guild/thread visibility or allowlist config, especially since channels status --probe says Discord is connected and healthy.

rough oasis
#

openclaw-agent@automation:~$ openclaw config get channels.discord --json
{
"enabled": true,
"token": "OPENCLAW_REDACTED",
"allowFrom": [
"723_i redacted it_456"
],
"groupPolicy": "allowlist"
}
openclaw-agent@automation:~$ openclaw config get channels.discord.groupPolicy

๐Ÿฆž OpenClaw 2026.4.21 (f788c88)

allowlist
openclaw-agent@automation:~$ openclaw config get channels.discord.guilds --json
Config path not found: channels.discord.guilds

stable boneBOT
#

Yep, this is the problem. ๐Ÿ‘€

You have:

channels.discord.groupPolicy = allowlist

but:

channels.discord.guilds = missing

So OpenClaw is connected to Discord, but no guild/server is actually allowed.

Also, allowFrom is not the guild allowlist. Thatโ€™s for sender allow rules, not the server list.

#

Then test again.

Why this was failing

With Discord, when groupPolicy is allowlist, docs say the guild must match channels.discord.guilds, and if that map is missing, guild messages are blocked.

Docs: https://docs.openclaw.ai/channels/discord

If it works after that, please right-click the solution message โ†’ Apps โ†’ โœ… Mark Solution so Answer Overflow can index it.