free web page counters

How to set up Moltbot on a private server

Sedang Trending 20 jam yang lalu

Jan 28, 2026

Simon L.

9min Read

How to group up Moltbot connected a backstage server

Setting up Moltbot (formerly known arsenic Clawdbot) connected a backstage server involves preparing your VPS (Virtual Private Server) environment, cloning nan Moltbot repository, moving nan Docker setup script, configuring your AI supplier credentials, and connecting to a messaging platform.

It’s a straightforward process that takes astir 30 minutes from commencement to finish, and by nan end, you’ll person your ain AI adjunct responding to messages 24/7.

You tin technically tally Moltbot connected your ain laptop, but that has limits. If you adjacent your machine aliases suffer net connection, your bot goes offline.

That’s why moving it connected a backstage server is truthful helpful. It provides accordant readiness and inheritance execution, moreover erstwhile you’re offline, truthful your bot runs 24/7 without you needing to babysit it.

1. Prepare a backstage server for Moltbot

To hole a backstage server for Moltbot, you request a Linux VPS pinch afloat administrative access. This is nan instauration of your task because an always-on server ensures your bot ne'er sleeps.

You don’t request a supercomputer for this, but you do request circumstantial Moltbot server requirements to guarantee stability.

Here is your checklist for nan server:

  • Linux operating strategy (Ubuntu 22.04 aliases 24.04 useful great).
  • Administrative entree (root aliases sudo privileges).
  • Docker and Docker Compose.
  • At slightest 2GB RAM (4GB recommended for amended performance).
  • 10GB+ disk abstraction for Docker images, exertion data, and logs.

We’ll beryllium utilizing Hostinger Moltbot hosting for this setup, because our Docker Manager makes things easier, but nan aforesaid principles use to immoderate different VPS provider.

If you’re marque caller to VPS setup, study how to group up VPS first. Follow nan first setup location to make judge you tin SSH into your server.

2. Make judge Docker is disposable connected nan VPS

Docker is really we’ll tally Moltbot. Think of Docker arsenic a instrumentality that packages everything Moltbot needs into 1 tidy unit. Instead of manually installing limitations and configuring different details, Docker handles it all. It’s cleaner, much reliable, and measurement easier to manage.

Within Hostinger’s hPanel dashboard, look for Docker Manager. It should show Docker arsenic installed aliases springiness you an action to alteration it. That’s nan easiest path.

If you’re connected a different VPS aliases want to verify from nan bid line, SSH into your server and run:

docker --version

docker constitute version

You should spot type numbers for some Docker and Docker Compose. If you get “command not found,” Docker isn’t installed yet.

A due Moltbot Docker setup relies connected nan Docker instrumentality strategy being healthy, truthful to instal it manually, study how to instal Docker connected Ubuntu, and past verify it again.

Once Docker is confirmed and running, you’re fresh for nan existent Moltbot deployment.

3. Clone nan Moltbot repository

Now we’re getting to nan bully stuff. We’re going to clone nan Moltbot repository and usage nan charismatic Docker setup book to build and deploy everything.

First, you request to get nan Moltbot codification connected your server:

# Install git if you don't person it

sudo apt instal git -y

# Clone nan repository

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

# Navigate into nan directory

cd moltbot

Then tally nan Docker setup script. Moltbot includes a setup book that handles everything automatically:

./docker-setup.sh

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

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

The full process is automated. Unlike galore Docker applications, wherever you propulsion a pre-built image, Moltbot builds nan image locally connected your server. This means:

  • You’re ever moving nan nonstop type from nan repository.
  • The first build takes a fewer minutes.
  • Subsequent rebuilds are faster acknowledgment to Docker’s furniture caching.
  • You person afloat power complete what’s included.

4. Configure Moltbot credentials and settings

The Docker setup book launches an interactive onboarding wizard that configures Moltbot for you. This is wherever you’ll group up your AI supplier credentials and different basal settings.

When you tally ./docker-setup.sh, aft building nan image, you’ll spot nan onboarding wizard. It asks respective important questions:

Gateway mode:

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

Choose Local. This intends nan gateway runs connected your VPS.

Authentication method:

This is nan astir captious part. You request to show Moltbot really to entree AI models:

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

If you spell pinch nan recommended action of Anthropic API Key, past you request to motion up aliases log successful to Anthropic, navigate to API Keys, create a caller key, transcript it, and paste it into nan setup wizard.

Keep this cardinal secure. Anyone pinch this cardinal tin usage Claude connected your relationship and you’ll beryllium charged for their usage.

The process is nan aforesaid pinch nan different options – you get a cardinal from nan AI platform, and adhd it into nan setup. The wizard stores these credentials arsenic Linux situation variables successful your configuration files.

You past take nan exemplary for nan selected AI level and prime information settings.

The astir communal Moltbot config correction is simply a missing API key. Without a valid Anthropic aliases OpenAI API key, Moltbot won’t work. Both Anthropic and OpenAI require a costs method connected record for API access, truthful make judge your API cardinal is progressive and has billing group up.

5. Start Moltbot and verify it is running

Once nan setup book completes, Moltbot should already beryllium running.

To verify everything is moving correctly, cheque nan instrumentality status:

# Make judge you're successful nan moltbot directory

cd ~/moltbot

# Check moving containers

docker constitute ps

You should spot moltbot-gateway pinch position “Up” aliases “Running”. Other signs that everything is moving correctly see seeing:

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

On nan different hand, if you spot “Invalid API key,” “Authentication failed,” “Connection refused,” aliases if nan instrumentality conscionable keeps restarting, past you’ve sewage an error.

Stop present and hole them earlier continuing by checking nan logs:

docker constitute logs moltbot-gateway

This is important for troubleshooting. The Moltbot logs show you what nan bot is really doing, truthful you tin reside nan issues.

6. Access nan Moltbot interface

Moltbot dashboard is accessible via your VPS IP reside connected larboard 18789:

http://your-vps-ip:18789

For example: http://45.123.45.67:18789

When you first sojourn nan Control UI, you’ll request nan gateway token that was generated during setup. Find it in:

cat ~/.clawdbot/.env | grep CLAWDBOT_GATEWAY_TOKEN

Or cheque nan output from erstwhile you ran ./docker-setup.sh – it displays nan token astatine nan end.

Note: While nan task has been renamed to Moltbot, configuration files and directories still usage “clawdbot” naming (like ~/.clawdbot/ and CLAWDBOT_GATEWAY_TOKEN). This is normal during nan modulation and doesn’t impact functionality.

Once you’re successful nan dashboard, spell to Settings → Token (or you whitethorn beryllium prompted immediately). Paste your gateway token, past click Save aliases Authenticate.

This Moltbot interface is your power center. You don’t request to configure everything correct now – conscionable corroborate you tin entree it and that Moltbot shows arsenic healthy.

If you can’t scope nan interface, travel these troubleshooting steps:

  • Check that nan instrumentality is really running: docker constitute ps
  • Verify your firewall isn’t blocking nan port
  • Make judge you’re utilizing HTTP, not HTTPS
  • Try accessing from nan server itself successful nan bid line: curl http://localhost:18789

7. Connect a messaging transmission to Moltbot

The web dashboard we conscionable configured is for management, but you’ll interact pinch Moltbot via a messaging app wherever AI conversations return place.

We’ll spell done really to group things up pinch Telegram since it’s straightforward, but nan process is akin for different platforms.

Here is really to grip a Moltbot Telegram setup:

Step 1: Create a Telegram bot

  1. Open Telegram and hunt for @BotFather
  2. Start a chat and nonstop /newbot
  3. Follow nan prompts:
    • Choose a sanction (for example, My Moltbot Assistant)
    • Choose a username (must extremity successful “bot”, for illustration “myawesomemoltbot”)
  4. BotFather will springiness you a bot token. Copy this.

Step 2: Add Telegram to Moltbot

Back connected your server, run:

# Make judge you're successful nan moltbot directory

cd ~/moltbot

# Add Telegram pinch your bot token

docker constitute tally --rm moltbot-cli providers adhd --provider telegram --token YOUR_BOT_TOKEN

Replace YOUR_BOT_TOKEN pinch nan existent token from BotFather.

Step 3: Enable required bot permissions

In nan BotFather chat:

  1. Send /mybots
  2. Select your bot
  3. Go to Bot Settings → Group Privacy
  4. Disable group privateness (this allows nan bot to publication messages successful groups)

Step 4: Start chatting

  1. Open Telegram and hunt for your bot (by nan username you chose)
  2. Start a conversation
  3. Send a connection to trial it

If you group up DM pairing during setup, you’ll get a pairing code. On your server, o.k. it:

docker constitute tally --rm moltbot-cli pairing o.k. telegram <the-code-you-received>

After approval, nonstop different message. Moltbot should respond!

If messages aren’t moving successful your Moltbot Telegram setup:

  • Check nan Moltbot logs for errors.
  • Verify nan API keys are still valid.
  • Make judge nan instrumentality didn’t restart aliases crash.
  • Confirm your messaging level credentials are correct.

How to troubleshoot communal Moltbot setup issues

To troubleshoot communal Moltbot setup issues, cheque instrumentality position first, verify your gateway token, and analyse nan logs for circumstantial correction messages. Most problems autumn into a fewer predictable categories, and erstwhile you cognize what to look for, they’re speedy to fix.

Here are nan astir communal problems you mightiness brushwood pinch Moltbot not working.

Container keeps stopping

If your instrumentality starts, past instantly stops:

  1. Check instrumentality status: docker constitute ps
  2. View logs for errors: docker constitute logs moltbot-gateway
  3. Look for nan circumstantial error: docker constitute logs moltbot-gateway | grep -i “error”

Common causes see a missing aliases invalid API key, larboard 18789 already successful use, Docker Compose configuration issues, aliases insufficient permissions.

Authentication failures

The astir communal problem by far. If you spot “authentication failed”, “invalid API key”, aliases exemplary requests failing, past cheque your API key:

cat ~/.clawdbot/.env

Look for ANTHROPIC_API_KEY aliases OPENAI_API_KEY. Make sure:

  • The cardinal is coming and not empty
  • There are nary other spaces aliases quotes
  • The cardinal hasn’t been revoked aliases expired

You besides request to verify nan cardinal is valid successful nan AI level dashboard and cheque nan billing status, arsenic some Anthropic and OpenAI require progressive billing.

Then re-add your credentials:

# Edit nan .env file

nano ~/.clawdbot/.env

# Add aliases update your API key

ANTHROPIC_API_KEY=your_actual_key_here

# Restart nan gateway

docker constitute restart moltbot-gateway

Port conflicts

If you get “port already successful use” aliases “address already successful use” errors:

  • Check what’s utilizing nan port: sudo lsof -i :18789
  • Change Moltbot’s larboard by editing docker-compose.yml
  • Use a different larboard mapping: -p 18790:18789

Container restart loops

If nan instrumentality keeps restarting, this usually intends location are missing situation variables, corrupted configuration files, invalid exemplary configuration, aliases support issues.

To hole this:

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

Can’t entree nan interface

If nan instrumentality is moving but you can’t scope nan dashboard:

  • Check firewall rules and let larboard 18789: sudo ufw let 18789/tcp
  • Verify nan instrumentality is listening: curl http://localhost:18789
  • Check VPS supplier settings since immoderate providers require you to configure information groups to let inbound postulation connected larboard 18789

Restarting safely

You’ll request to restart Moltbot erstwhile you alteration situation variables, if nan bot becomes unresponsive, aliases aft circumstantial configuration updates.

A restart is besides useful for troubleshooting weird behavior, since a caller commencement tin clear up issues that don’t show evident errors successful nan logs.

If you request to restart Moltbot quickly without stopping nan instrumentality first:

docker restart moltbot-gateway

Or for a cleanable restart wherever you manually extremity and past commencement nan instrumentality (useful erstwhile you want much power complete nan process aliases request to verify nan instrumentality stops completely):

docker extremity moltbot-gateway

docker commencement moltbot-gateway

What are nan champion practices for moving Moltbot?

Best practices for moving Moltbot see keeping your gateway token secure, monitoring assets usage regularly, and staying existent pinch updates.

Running an AI bot connected a server comes pinch responsibilities, but they’re manageable if you found bully habits early successful circumstantial areas.

Security practices

  • Never stock your gateway token. Treat it for illustration a password because anyone who has it tin power your bot.
  • Use a firewall. Only expose nan ports you really request (like larboard 18789 for nan interface).
  • Keep SSH secure. Use key-based authentication alternatively of passwords for server access.
  • Restrict interface access. Consider utilizing a VPN aliases IP whitelist if you don’t request nationalist entree to nan dashboard.

Resource management

Moltbot is comparatively lightweight, but you should still support an oculus on:

  • Memory usage. Check occasionally pinch docker stats moltbot-gateway
  • Disk space. Logs tin accumulate. Consider log rotation if moving long-term.
  • CPU usage. Spikes are normal during progressive conversations, but sustained precocious usage mightiness bespeak a problem.

If you announcement assets issues, you mightiness request to upgrade your VPS aliases analyse what’s causing excessive usage.

Update strategy

New Moltbot versions are released periodically pinch improvements and fixes.

  • Check for updates monthly (or subscribe to Moltbot announcements).
  • Test updates successful a non-production situation first if possible.
  • Keep a backup of your existent moving configuration earlier updating.
  • Read merchandise notes to understand what changed.

Monitoring uptime

Set up basal monitoring truthful you cognize if Moltbot goes down:

  • Docker’s restart argumentation helps pinch automatic recovery.
  • Consider a elemental uptime show (many free services exist).
  • Check logs periodically for different errors aliases warnings.
  • Test your messaging channels occasionally to corroborate functionality.

Backup configuration

Your situation variables (especially that gateway token) are basal to nan setup. Document them securely:

  • Store your token successful a password manager.
  • Keep notes connected your configuration settings.
  • Document immoderate civilization situation variables you’ve added.

How to negociate Moltbot aft setup

To negociate Moltbot aft setup, show logs regularly, update nan instrumentality erstwhile caller versions are released, and support an oculus connected capacity metrics.

Day-to-day guidance is minimal erstwhile everything is moving smoothly, but a small ongoing attraction keeps things healthy. Here’s what you request to do.

Check logs regularly

Make it a wont to peek astatine nan logs play using:

docker constitute logs --tail 100 moltbot-gateway

Look for repeated errors aliases warnings, capacity issues, relationship problems, aliases different patterns.

Most of nan time, you’ll spot regular operation, but catching issues early prevents bigger problems.

Update Moltbot

When a caller type is released, usage nan setup book to propulsion nan latest code:

git pull

Then rerun setup (this preserves your config):

./docker-setup.sh

Monitor uptime

Check instrumentality position periodically. It should show position arsenic “Up,” but if it’s restarting frequently, analyse nan logs.

Monitor performance

Every fewer weeks, cheque assets usage:

docker stats moltbot-gateway

This shows CPU, memory, and web usage successful real-time. If usage seems high, you mightiness request to:

  • Investigate what’s causing it (check logs)
  • Upgrade your VPS if you’ve outgrown nan existent specs
  • Optimize your configuration

You don’t request to interest astir scaling, clustering, aliases analyzable optimizations for astir usage cases. Moltbot runs good connected a azygous VPS for individual aliases mini squad use.

Focus connected keeping it moving reliably, updating erstwhile needed, monitoring for errors, and maintaining information basics.

For speedy reference to Docker commands you’ll usage while managing Moltbot, spot this Docker cheat sheet.

All of nan tutorial contented connected this website is taxable to Hostinger's rigorous editorial standards and values.

Author

Simon is simply a move Content Writer who loves helping group toggle shape their imaginative ideas into thriving businesses. With extended trading experience, he perpetually strives to link nan correct connection pinch nan correct audience. In his spare time, Simon enjoys agelong runs, nurturing his chilli plants, and hiking done forests. Follow him connected LinkedIn.