High detail walkthrough with newbie-friendly notes
Note: This guide assumes you are running OpenClaw on a Ubuntu KVM VPS. Running it directly on your local machine is possible but not recommended -- you are responsible for any side effects on your environment. If you choose to skip the VPS setup, start at Part 2: OpenClaw Installer and run the install command on your local machine instead.
- In your hosting dashboard, go to Settings > SSH Keys > [+ Add SSH Key]
-
Open a terminal and run:
ssh-keygen -t ed25519 -C "your_email@example.com"Replace the email with your actual address.
-
Press Enter to accept the default file path (recommended). The key will be saved to your
.sshfolder automatically. -
Set a passphrase when prompted (recommended) and confirm it.
- Navigate to the
.sshdirectory in your user folder. - Run the following to print your public key (adjust path for your OS -- macOS uses
/Users/your_username/, Linux/WSL uses/home/your_username/):You should see output like:cat ~/.ssh/your_key_filename.pubssh-ed25519 AAAA...longkey... your_email@example.com - Copy that entire line and paste it into the SSH Key field in your Hostinger browser window.
ssh root@your_vps_ip_addressEnter the passphrase you set for the SSH key.
You are in when you see:
root@sr########:~
That unique identifier confirms you are connected.
From within your SSH session, run:
curl -fsSL https://openclaw.ai/install.sh | bashYou should see something like:
I'll butter your workflow like a lobster roll: messy, delicious, effective.
✓ Detected: linux
Install plan
OS: linux
Install method: npm
Requested version: latest
[1/3] Preparing environment
· Node.js not found, installing it now
· Installing Node.js via NodeSource
· Installing Linux build tools (make/g++/cmake/python3)
Dots become checkmarks as each step completes. This takes a few minutes -- good time for a coffee break.
| Prompt | Selection |
|---|---|
| Personal vs shared use | Continue (yes) |
| Setup type | QuickStart |
| Model / Auth provider | Your choice -- OpenRouter is a good default |
| How to provide API key | Paste key |
| API key | Paste your OpenRouter key from openrouter.ai |
| Keep current model | Keep current (openrouter/auto) |
STOP: You must have your own Discord server before continuing. Create one now, then proceed.
- Go to Discord Developer Portal and log in.
- In the sidebar, click Applications > [New Application].
- Name your application and click Create.
- In the left sidebar, click Bot.
- Scroll down and click [Reset Token], accept any prompts.
- Copy the token.
- Back in your SSH terminal, paste the token when prompted:
Enter Discord Bot Token:
You need Discord Developer Mode enabled to copy channel IDs.
- In Discord, go to User Settings > Advanced > Developer Mode and toggle it on.
- Right-click the channel you want the bot to use and select Copy Channel ID.
The value you paste will look like a long number (e.g., 1234567890123456789). The wizard may ask for it in SERVER_ID/CHANNEL_ID format -- if so, right-click your server icon and Copy Server ID for the first part.
| Prompt | Selection |
|---|---|
| Configure Discord Channel Access? | Yes |
| Discord Channel Access | Allowlist |
| Paste channel ID | YOUR_SERVER_ID/YOUR_CHANNEL_ID -- see note above about enabling Developer Mode |
| Configure Skills now? | No |
| Enable Hooks? | Skip for now (Space + Enter on Mac) |
| How to hatch bot? | Hatch in TUI (recommended) |
- In the Discord Developer Portal, go to OAuth2 in the sidebar.
- Scroll to the URL Generator at the bottom.
- Check only the bot box. Leave everything else unchecked.
- Scroll to the bottom, copy the Generated URL.
- Open a new browser tab and paste the URL.
- Select your own Discord server from the invite screen.
- Back in the Developer Portal, go to Bot in the sidebar.
- About halfway down, find Message Content Intent and toggle it on.
- Click Save Changes.
- Go to General Information in the Developer Portal.
- Copy your Application ID.
- Navigate to:
https://discord.com/users/YOUR_APPLICATION_ID - Click the message icon on your bot and send it a DM.
This is expected. Approve yourself via pairing:
- The bot's response will include a pairing command like:
openclaw pairing approve discord [your_identifier] - Copy that line and paste it into the terminal where you are SSH'd into the VPS.
- Send the bot another DM -- it should now respond.
You have the claw!
If your bot shows as offline on Discord, try reconfiguring:
openclaw configWalk through the wizard:
- Select Channels under sections to configure
- Select Discord (Bot API)
- Choose Modify settings
- Re-enter your bot token if needed
- Set channel access to Allowlist (not Open)
- Set DM policy to Pairing (recommended)
- Scroll to Continue at the bottom
Once complete, confirm Discord check, bot is online in the output.
Warning: You are letting your bot interact with other bots and other users. There is always risk on a shared server. You are on a VPS, so the blast radius is contained -- but proceed with awareness.
If you want to add your bot to a community or shared server, you will need help from someone who has admin access to that server.
- Go back to Discord Developer Portal > OAuth2.
- Scroll down, select only bot again.
- Copy the Generated URL at the bottom.
- Send that link to a server admin and ask them to authorize your bot.
- Follow the invite link and select their server to add your bot.
- If the server does not already have a role designated for bots, create one in Server Settings > Roles.
- Go to Server Settings > Integrations > [Your Bot Name].
- Under Roles, assign the bot role to your bot.
Once assigned, your bot will have the appropriate permissions scoped to that role.