Skip to content

Troubleshooting

Philippe edited this page Nov 13, 2026 · 2 revisions

Troubleshooting

Most problems are explained in the bot log (console, docker logs crafty-bot, LOG_FILE or the Web Dashboard). Set LOG_LEVEL=DEBUG for more detail.

The bot doesn't start

Log message Fix
Invalid configuration: Missing environment variables: ... Set the named variables, see Configuration
Login to Discord failed, check DISCORD_TOKEN Copy the token again from the Discord Developer Portal (Bot → Reset Token)
Enable the "Message Content Intent" ... Enable Message Content Intent under Bot → Privileged Gateway Intents
Login to Crafty failed, check SERVER_URL and the Crafty login settings Check the login, or use CRAFTY_TOKEN (required with two-factor authentication). Check SERVER_URL, CRAFTY_USERNAME and CRAFTY_PASSWORD

list says "No servers found"

The Crafty user has no access to any server. Give it a role with access to the servers (see Installation).

"Request to Crafty Controller failed"

The bot can't reach Crafty or Crafty rejected the request. The log contains the exact error:

  • failed: ... Connection refused / timed out: wrong SERVER_URL or Crafty is down
  • returned HTTP 401 / NOT_AUTHORIZED: the token is wrong or lacks a permission (COMMANDS, BACKUP...)
  • certificate errors: set CRAFTY_VERIFY_SSL=false for Crafty's self-signed certificate

Slash commands don't show up

Run >sync as the bot owner. Without GUILD_ID Discord can take a while to show global commands. Make sure the bot was invited with the applications.commands scope.

"You are not allowed to use this command"

backup, sync, clear, commands and get_token are reserved for the owner of the Discord application.

Auto stop doesn't stop a server

See Auto Stop: a server is only stopped when it was empty at two checks in a row, and servers with an unknown player count are skipped. The log says why a server was skipped.

The dashboard doesn't load

Symptom Fix
Log: Cannot start the web dashboard ...: port 8080 is already in use Set WEB_PORT to a free port
Log: WEB_HOST ... is not an address of this machine Use 127.0.0.1 (local only) or 0.0.0.0 (all interfaces)
Browser: Host not allowed Open it by IP address or localhost, set WEB_PASSWORD, or add the name to WEB_ALLOWED_HOSTS
Not reachable from another machine Set WEB_HOST=0.0.0.0 (the Docker image does this) and publish the port in Docker

Clone this wiki locally