Summer Sale: up to 80% off Claim deal

How to set up OpenClaw: managed and self-hosted methods

How to set up OpenClaw: managed and self-hosted methods

You can set up OpenClaw in two main ways: use a managed OpenClaw service where most of the installation work is handled for you, or install OpenClaw manually on a self-hosted VPS for more control. Managed OpenClaw is the better path for beginners who want to start quickly without running Docker commands, configuring server ports, or setting up individual API keys. Manual VPS setup is better for technical users who want full control over the server environment, OpenClaw configuration, updates, and connected services.

This guide explains both setup methods. First, you’ll learn how to choose the right OpenClaw setup path based on your technical experience, setup time, and ongoing maintenance needs. Then, we’ll walk through the managed Hostinger setup, followed by the manual VPS method for users who prefer to install and manage OpenClaw themselves.

Prefer watching instead of reading? This video walks you through the OpenClaw setup step by step.

Subscribe For more educational videos! Hostinger Academy

How to choose the right OpenClaw setup method

The right OpenClaw setup method depends on how much control you need and how comfortable you are with server management. Beginners should choose managed OpenClaw if they want to start using the assistant quickly without manual server setup. Technical users should choose the manual VPS method if they want direct control over Docker, environment variables, API providers, ports, updates, and server configuration.

MethodBest forSetup difficultySetup timeOngoing work
Managed OpenClaw on HostingerBeginners, non-technical users, and fast launchLowA few minutesLow
Manual OpenClaw setup on a VPSDevelopers, advanced users, and full server controlMedium to highAround 30 minutesMedium
Local setupTesting OpenClaw before deploying itMediumVariesUser-managed

Managed OpenClaw is the fastest path because Hostinger handles most of the installation work for you. This method avoids manual Docker setup, terminal commands, port configuration, and individual API key setup if you use the included AI credits.

Manual VPS setup takes more work, but it gives you more control over the server environment and OpenClaw configuration. This path is better if you already know how to use SSH, Docker, API keys, and server logs.

Local setup is useful for testing OpenClaw on your own device, but it is not ideal for 24/7 use. OpenClaw goes offline when your computer is turned off, disconnected from the internet, or unable to keep the required services running.

How to set up Managed OpenClaw on Hostinger

Managed OpenClaw on Hostinger is the easiest setup path for beginners, non-technical users, and anyone who wants to run OpenClaw without manual server setup. Instead of installing Docker, cloning the OpenClaw repository, configuring ports, adding environment variables, and managing API keys manually, you can use a preconfigured OpenClaw setup that handles most of the server-side work for you.

This method still requires a few setup choices, such as selecting a plan, choosing an AI provider option, and connecting a messaging channel. However, it removes the most technical parts of the OpenClaw installation process.

1. Choose managed OpenClaw hosting

Start by choosing 1-click OpenClaw on Hostinger. This managed OpenClaw setup is best for beginners, users without server management experience, and anyone who wants to launch OpenClaw without manual server setup.

With 1-click OpenClaw, you don’t need to install Docker manually, configure ports, create environment variables, or prepare API keys before deployment. Hostinger handles the server environment and initial configuration, so you can focus on connecting your AI agent and choosing what it should do.

During setup, choose your plan, billing period, and server location. These settings determine where your OpenClaw instance runs and how long your subscription lasts.

"OpenClaw

Choose 1-click OpenClaw if you want:

  • OpenClaw without technical knowledge
  • Managed OpenClaw setup with no manual server configuration
  • A ready-out-of-the-box AI assistant
  • Built-in access to AI models
  • Built-in Telegram and WhatsApp pairing
  • Lower ongoing server maintenance

Choose OpenClaw on VPS instead if you want full root access, terminal access, and more control over the server, Docker configuration, and update process.

2. Add AI credits or connect your own AI provider

Next, choose how OpenClaw will connect to AI models. The easier option is to use nexos.ai credits, which let OpenClaw connect to supported large language models from providers like OpenAI, Anthropic, Google, and xAI without requiring separate API key setup for each provider.

"OpenClaw

This reduces setup friction for beginners because they don’t need to create accounts with multiple AI providers, generate individual API keys, add billing details in each provider dashboard, or paste credentials into environment files before starting.

If you prefer more control, use your own AI provider credentials where the product flow allows it. This option is better for advanced users who already have API keys, model preferences, or existing billing accounts with a specific AI provider.

3. Copy your gateway token and enter your messaging details

After choosing your AI setup, copy your OpenClaw gateway token. The gateway token is an access key that lets you authenticate and open the OpenClaw web interface.

Keep the token available because you’ll need it when you open the dashboard for the first time. You may also be asked to enter or connect your messaging details during onboarding, such as a WhatsApp number, Telegram account, or Hostinger Email inbox.

"Hostinger

This step connects OpenClaw to the communication channel you’ll use to interact with the assistant. For example, if you connect WhatsApp or Telegram, you’ll be able to message OpenClaw from that app after setup.

4. Wait for Hostinger to deploy OpenClaw

After you finish the onboarding steps, Hostinger deploys OpenClaw automatically. This means the application is installed, configured, and started in your hosted environment.

"OpenClaw

The deployment usually takes a few minutes. Once it is complete, you should see your OpenClaw instance in hPanel. Depending on the setup flow, you may be taken to the OpenClaw management page or Docker Manager, where your OpenClaw project should appear as running.

At this point, the server-side installation is complete. You don’t need to run terminal commands, install Docker manually, clone the OpenClaw repository, or start containers yourself.

5. Open the OpenClaw web interface

Open the OpenClaw interface from hPanel. If your setup shows the project in Docker Manager, click the link below the project name to open the OpenClaw web interface.

"Chat

When prompted, paste the gateway token you copied earlier. After authentication, confirm that the OpenClaw dashboard loads correctly.

The dashboard is where you manage your OpenClaw instance, check its status, adjust settings, and continue configuring how the assistant should work. You don’t need to configure everything immediately, but you should confirm that the interface opens and the instance is running.

6. Connect your messaging channel

OpenClaw is usually used through messaging channels, not only through the dashboard. During or after setup, connect the channel you want to use for conversations with the assistant.

Managed OpenClaw supports channels such as WhatsApp, Telegram, and Hostinger Email. If you choose WhatsApp, follow the pairing steps shown in hPanel. If you choose Telegram, follow the prompts to connect your Telegram bot. For detailed post-configuration steps, follow the OpenClaw post-configuration guide.

After connecting WhatsApp or Telegram, send a test message to confirm OpenClaw responds. This verifies that the assistant, messaging channel, and AI provider connection are working together.

7. Set up your first OpenClaw automation

Once OpenClaw is deployed and connected to a messaging channel, create a simple first automation. This helps you move from installation to actual use.

Here are three beginner-friendly examples:

AutomationTriggerChannelOutput
Daily morning briefingA scheduled morning requestWhatsApp or TelegramA short summary of your day, reminders, or priorities
Inbox or message summaryA user message asking for a summaryHostinger Email, WhatsApp, or TelegramA concise summary of recent messages or important items
Simple reminder assistantA user message with a task and timeWhatsApp or TelegramA reminder or task response based on your instruction

For example, you can ask OpenClaw to send a daily morning briefing through Telegram or WhatsApp. Keep the first automation simple: choose one trigger, one channel, and one expected output. After confirming that OpenClaw responds correctly, you can build more advanced assistant workflows.

Can you use OpenClaw without technical knowledge?

Yes, you can use OpenClaw without technical knowledge if you choose 1-click OpenClaw on Hostinger. This managed setup removes the need to install Docker, clone repositories, configure ports, edit environment variables, or prepare individual API keys before deployment.

You still need to make a few basic choices, such as selecting a plan, choosing where your OpenClaw instance runs, connecting a messaging channel, and deciding what you want the AI agent to do. For example, you can connect WhatsApp or Telegram and create a simple automation that sends a daily summary, answers routine messages, or manages reminders.

Choose the manual VPS method instead if you want full control over the server, Docker containers, provider credentials, updates, and logs. That path gives you more flexibility, but it requires more setup and ongoing maintenance.

How to set up OpenClaw manually

Manual OpenClaw setup is the best option if you want full control over the server, Docker configuration, AI provider credentials, messaging channels, and update process. This method works well for developers and technical users who are comfortable using SSH, running terminal commands, editing environment variables, and checking server logs.

1. Prepare a private server for OpenClaw

To prepare a private server for OpenClaw, you need a Linux VPS with full administrative access. This is the foundation of your project because an always-on server ensures your bot never sleeps.

You don’t need a supercomputer for this, but you do need specific OpenClaw server requirements to ensure stability.

Here is your checklist for the server:

  • Linux operating system (Ubuntu 22.04 or 24.04 works great).
  • Administrative access (root or sudo privileges).
  • Docker and Docker Compose.
  • At least 2GB RAM (4GB recommended for better performance).
  • 10GB+ disk space for Docker images, application data, and logs.

We’ll be using Hostinger OpenClaw hosting for this setup, because our Docker Manager makes things easier, but the same principles apply to any other VPS provider.

If you’re brand new to VPS setup, learn how to set up VPS first. Follow the initial setup there to make sure you can SSH into your server.

2. Make sure Docker is available on the VPS

OpenClaw runs in Docker containers, so Docker and Docker Compose must be installed and working before you continue with the manual setup. If Docker is not available, the OpenClaw containers won’t start.

Within Hostinger’s hPanel dashboard, look for Docker Manager. It should show Docker as installed or give you an option to enable it. That’s the easiest path.

If you’re on a different VPS or want to verify from the command line, SSH into your server and run:

docker --version

docker compose version

You should see version numbers for both Docker and Docker Compose. If you get “command not found,” Docker isn’t installed yet.

A proper OpenClaw Docker setup relies on the Docker container system being healthy, so to install it manually, learn how to install Docker on Ubuntu, and then verify it again.

Once Docker is confirmed and running, you’re ready for the actual OpenClaw deployment.

3. Clone the OpenClaw repository

Now we’re getting to the good stuff. We’re going to clone the OpenClaw repository and use the official Docker setup script to build and deploy everything.

First, you need to get the OpenClaw code on your server:

# Install git if you don't have it

sudo apt install git -y

# Clone the repository

git clone https://github.com/openclaw/openclaw.git

# Navigate into the directory

cd openclaw

Then run the Docker setup script. OpenClaw includes a setup script that handles everything automatically:

./docker-setup.sh

This setup script is your one-stop shop for getting OpenClaw running. Here’s what it does:

  1. Builds the OpenClaw Docker image locally (from the included Dockerfile).
  2. Runs the onboarding wizard inside a Docker container.
  3. Generates a gateway token for accessing the Control UI.
  4. Creates necessary configuration directories.
  5. Starts the OpenClaw gateway via Docker Compose.

The entire process is automated. Unlike many Docker applications, where you pull a pre-built image, OpenClaw builds the image locally on your server. This means:

  • You’re always running the exact version from the repository.
  • The first build takes a few minutes.
  • Subsequent rebuilds are faster thanks to Docker’s layer caching.
  • You have full control over what’s included.

4. Configure OpenClaw credentials and settings

The Docker setup script launches an interactive onboarding wizard that configures OpenClaw for you. This is where you’ll set up your AI provider credentials and other essential settings.

When you run ./docker-setup.sh, after building the image, you’ll see the onboarding wizard. It asks several important questions:

Gateway mode:

  • Local (run on this machine)
  • Remote (connect to existing gateway)

Choose Local. This means the gateway runs on your VPS.

Authentication method:

This is the most critical part. You need to tell OpenClaw how to access AI models:

  • Anthropic API Key (recommended)
  • OpenAI API Key
  • OAuth (Claude Pro/Max subscription)
  • OpenAI Code (Codex subscription)

If you go with the recommended option of Anthropic API Key, then you need to sign up or log in to Anthropic, navigate to API Keys, create a new key, copy it, and paste it into the setup wizard.

Keep this key secure. Anyone with this key can use Claude on your account and you’ll be charged for their usage.

The process is the same with the other options – you get a key from the AI platform, and add it into the setup. The wizard stores these credentials as Linux environment variables in your configuration files.

You then choose the model for the selected AI platform and pick security settings.

The most common OpenClaw config mistake is a missing API key. Without a valid Anthropic or OpenAI API key, OpenClaw won’t work. Both Anthropic and OpenAI require a payment method on file for API access, so make sure your API key is active and has billing set up.

5. Start OpenClaw and verify it is running

Once the setup script completes, OpenClaw should already be running.

To verify everything is working correctly, check the container status:

# Make sure you're in the openclaw directory

cd ~/openclaw

# Check running containers

docker compose ps

You should see openclaw-gateway with status “Up” or “Running”. Other signs that everything is working correctly include seeing:

  • A “OpenClaw initialized” message
  • Model provider connected (Anthropic/OpenAI)
  • No authentication errors

On the other hand, if you see “Invalid API key,” “Authentication failed,” “Connection refused,” or if the container just keeps restarting, then you’ve got an error.

Stop here and fix them before continuing by checking the logs:

docker compose logs openclaw-gateway

This is important for troubleshooting. The OpenClaw logs tell you what the bot is actually doing, so you can address the issues.

6. Access the OpenClaw interface

OpenClaw dashboard is accessible via your VPS IP address on port 18789:

http://your-vps-ip:18789

For example: http://45.123.45.67:18789

When you first visit the Control UI, you’ll need the gateway token that was generated during setup. Find it in:

cat ~/.clawdbot/.env | grep CLAWDBOT_GATEWAY_TOKEN

Or check the output from when you ran ./docker-setup.sh – it displays the token at the end.

Note: While the project has been renamed to OpenClaw, configuration files and directories still use “clawdbot” naming (like ~/.clawdbot/ and CLAWDBOT_GATEWAY_TOKEN). This is normal during the transition and doesn’t affect functionality.

Once you’re in the dashboard, go to Settings → Token (or you may be prompted immediately). Paste your gateway token, then click Save or Authenticate.

This OpenClaw interface is your control center. You don’t need to configure everything right now – just confirm you can access it and that OpenClaw shows as healthy.

If you can’t reach the interface, follow these troubleshooting steps:

  • Check that the container is actually running: docker compose ps
  • Verify your firewall isn’t blocking the port
  • Make sure you’re using HTTP, not HTTPS
  • Try accessing from the server itself in the command line: curl http://localhost:18789

7. Connect a messaging channel to OpenClaw

The web dashboard we just configured is for management, but you’ll interact with OpenClaw via a messaging app where AI conversations take place.

We’ll go through how to set things up with Telegram since it’s straightforward, but the process is similar for other platforms.

Here is how to handle a OpenClaw Telegram setup:

Step 1: Create a Telegram bot

  1. Open Telegram and search for @BotFather
  2. Start a chat and send /newbot
  3. Follow the prompts:
    • Choose a name (for example, My OpenClaw Assistant)
    • Choose a username (must end in “bot”, like “myawesomemoltbot”)
  4. BotFather will give you a bot token. Copy this.

Step 2: Add Telegram to OpenClaw

Back on your server, run:

# Make sure you're in the openclaw directory

cd ~/openclaw

# Add Telegram with your bot token

docker compose exec openclaw-gateway node dist/index.js providers add --provider telegram --token YOUR_BOT_TOKEN

Replace YOUR_BOT_TOKEN with the actual token from BotFather.

Step 3: Enable required bot permissions

In the BotFather chat:

  1. Send /mybots
  2. Select your bot
  3. Go to Bot Settings → Group Privacy
  4. Disable group privacy (this allows the bot to read messages in groups)

Step 4: Start chatting

  1. Open Telegram and search for your bot (by the username you chose)
  2. Start a conversation
  3. Send a message to test it

If you set up DM pairing during setup, you’ll get a pairing code. On your server, approve it:

docker compose exec openclaw-gateway node dist/index.js pairing approve telegram <the-code-you-received>

After approval, send another message. OpenClaw should respond!

If messages aren’t working in your OpenClaw Telegram setup:

  • Check the OpenClaw logs for errors.
  • Verify the API keys are still valid.
  • Make sure the container didn’t restart or crash.
  • Confirm your messaging platform credentials are correct.

 Is setting up OpenClaw manually difficult for beginners?

Setting up OpenClaw manually is manageable if you already know the basics of VPS hosting, SSH, Docker, and server maintenance. The process follows a clear sequence: prepare the server, install Docker, clone the OpenClaw repository, add AI provider credentials, start the containers, open the interface, and connect a messaging channel.

For beginners, manual setup has more moving parts. You need to use SSH, run Docker and Docker Compose commands, create API keys, edit environment variables, save the gateway token, configure ports or firewall rules, and check logs if a container stops or restarts. Each step is doable, but mistakes in one part can stop OpenClaw from running correctly.

Choose 1-click OpenClaw on Hostinger if you want to avoid manual server setup. The managed method removes the Docker installation, repository cloning, port configuration, environment variable setup, and most AI provider credential work, while still letting you connect OpenClaw to a messaging channel and start building automations.

How to troubleshoot common OpenClaw setup issues

To start troubleshooting based on the setup method you used. If you set up 1-click OpenClaw on Hostinger, first check whether the OpenClaw project is running in Docker Manager and confirm that you copied the correct gateway token. If you installed OpenClaw manually on a VPS, start by checking Docker logs, container status, AI provider API keys, and port configuration.

The steps below cover the most common OpenClaw setup issues, including stopped containers, authentication errors, port conflicts, restart loops, interface access problems, and safe restarts.

Container keeps stopping

If your container starts, then immediately stops:

  1. Check container status: docker compose ps
  2. View logs for errors: docker compose logs openclaw-gateway
  3. Look for the specific error: docker compose logs openclaw-gateway | grep -i “error”

Common causes include a missing or invalid API key, port 18789 already in use, Docker Compose configuration issues, or insufficient permissions.

Authentication failures

The most common problem by far. If you see “authentication failed”, “invalid API key”, or model requests failing, then check your API key:

cat ~/.clawdbot/.env

Look for ANTHROPIC_API_KEY or OPENAI_API_KEY. Make sure:

  • The key is present and not empty
  • There are no extra spaces or quotes
  • The key hasn’t been revoked or expired

You also need to verify the key is valid in the AI platform dashboard and check the billing status, as both Anthropic and OpenAI require active billing.

Then re-add your credentials:

# Edit the .env file

nano ~/.clawdbot/.env

# Add or update your API key

ANTHROPIC_API_KEY=your_actual_key_here

# Restart the gateway

docker compose restart openclaw-gateway

Port conflicts

If you get “port already in use” or “address already in use” errors:

  • Check what’s using the port: sudo lsof -i :18789
  • Change OpenClaw’s port by editing docker-compose.yml
  • Use a different port mapping: -p 18790:18789

Container restart loops

If the container keeps restarting, this usually means there are missing environment variables, corrupted configuration files, invalid model configuration, or permission issues.

To fix this:

  • Stop everything: docker compose down
  • Remove old containers and volumes: docker compose down -v
  • Rebuild and restart: ./docker-setup.sh

Can’t access the interface

If the container is running but you can’t reach the dashboard:

  • Check firewall rules and allow port 18789: sudo ufw allow 18789/tcp
  • Verify the container is listening: curl http://localhost:18789
  • Check VPS provider settings since some providers require you to configure security groups to allow inbound traffic on port 18789

Restarting safely

You’ll need to restart OpenClaw when you change environment variables, if the bot becomes unresponsive, or after specific configuration updates.

A restart is also useful for troubleshooting weird behavior, since a fresh start can clear up issues that don’t show obvious errors in the logs.

If you need to restart OpenClaw quickly without stopping the container first:

docker restart openclaw-gateway

Or for a clean restart where you manually stop and then start the container (useful when you want more control over the process or need to verify the container stops completely):

docker stop openclaw-gateway

docker start openclaw-gateway

What are the best practices for running OpenClaw?

Running OpenClaw reliably requires secure access, careful credential handling, resource monitoring, regular updates, and backups. These OpenClaw best practices are especially important for manual VPS setups because you manage the server, containers, tokens, and uptime yourself.

Keep your gateway token and API keys private

Your gateway token and AI provider API keys control access to OpenClaw and connected AI models. Don’t share them in screenshots, public repositories, support messages, or documentation examples.

If a gateway token or API key is exposed, rotate it immediately and update the OpenClaw configuration with the new value.

For a more complete protection checklist, follow our OpenClaw security guide.

Secure SSH and limit server access

Use SSH keys instead of password-based login where possible, and only give server access to users who need it. If you use a VPS, keep root or sudo access limited to trusted administrators.

You should also close unused ports and use firewall rules to allow only the traffic OpenClaw needs. This reduces the risk of exposing the OpenClaw gateway, dashboard, or other server services unintentionally.

Monitor CPU, RAM, disk space, and network usage

OpenClaw needs enough server resources to respond reliably. Monitor CPU usage, memory usage, disk space, and network activity, especially if the assistant handles frequent messages, scheduled tasks, or multiple automations.

If OpenClaw slows down, restarts, or stops responding, check resource usage before changing the configuration. If resource limits are the cause, review your VPS size and estimated AI usage. Our OpenClaw costs breakdown explains how hosting resources and AI model usage affect the total cost of running OpenClaw.

Keep OpenClaw and its dependencies updated

Update OpenClaw regularly to get bug fixes, security improvements, compatibility changes, and new features. For manual VPS setups, this usually means pulling the latest project files and restarting the containers safely.

Before updating, check the project notes and back up important configuration files. This helps you restore the previous setup if an update changes dependencies, environment variables, or container behavior.

Set up uptime monitoring

Use uptime monitoring if OpenClaw handles important workflows, scheduled messages, or background automations. Uptime alerts help you notice issues before users or connected messaging channels are affected.

This is especially useful when OpenClaw runs on a VPS because the assistant depends on the server, Docker containers, AI provider connection, and messaging channel staying available at the same time.

Back up configuration files and assistant settings

Back up your OpenClaw configuration files, environment variables, gateway details, and important assistant settings. Backups make recovery easier after a failed update, accidental deletion, server migration, or VPS issue.

Store backups somewhere separate from the server when possible. This prevents a single VPS failure from affecting both the live OpenClaw installation and the recovery files.

Choose the right hosting setup for your maintenance level

Manual VPS setup gives you more control, but it also gives you more responsibility for security, updates, logs, uptime, and performance. Managed setup reduces the amount of infrastructure work, but you still need to manage your assistant settings, connected accounts, and automations.

What ongoing work is required when running OpenClaw yourself?

Running OpenClaw yourself means you are responsible for keeping the application, server, and connected services working after the initial setup. Manual VPS setup gives you more control, but it also requires regular maintenance to keep OpenClaw available, secure, and responsive.

Start by checking OpenClaw logs when something stops working or behaves unexpectedly:

docker compose logs -f

Logs help you identify container errors, failed API requests, authentication issues, restart loops, and messaging channel problems. If OpenClaw stops responding, check the logs before changing configuration files or restarting the server.

You should also keep OpenClaw updated. Updates can include bug fixes, security improvements, dependency changes, and new features. To update a manual installation, pull the latest version of the OpenClaw repository and restart the containers:

git pull
docker compose down
docker compose up -d

Monitor uptime, so you know whether OpenClaw is available when users send messages. Since OpenClaw usually works through messaging channels like Telegram or WhatsApp, downtime can prevent the assistant from receiving or answering requests.

You should also monitor server performance. Check CPU usage, memory usage, disk space, and network activity, especially if OpenClaw handles frequent messages or multiple automations. If the VPS runs out of resources, OpenClaw may slow down, restart, or stop responding. Upgrade the VPS if performance issues continue after restarting containers and clearing unused files.

With manual setup, you own updates, logs, uptime checks, performance monitoring, configuration backups, and server security. With managed OpenClaw, Hostinger reduces the server setup and infrastructure management work, but you still need to manage your assistant settings, connected accounts, messaging channels, and automations.

All of the tutorial content on this website is subject to Hostinger's rigorous editorial standards and values.

Author
The author

Simon Lim

Simon is a dynamic Content Writer who loves helping people transform their creative ideas into thriving businesses. With extensive marketing experience, he constantly strives to connect the right message with the right audience. In his spare time, Simon enjoys long runs, nurturing his chilli plants, and hiking through forests. Follow him on LinkedIn.

What our customers say