Repository navigation
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.
| 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
|
The Crafty user has no access to any server. Give it a role with access to the servers (see Installation).
The bot can't reach Crafty or Crafty rejected the request. The log contains the exact error:
-
failed: ... Connection refused/timed out: wrongSERVER_URLor Crafty is down -
returned HTTP 401/NOT_AUTHORIZED: the token is wrong or lacks a permission (COMMANDS,BACKUP...) - certificate errors: set
CRAFTY_VERIFY_SSL=falsefor Crafty's self-signed certificate
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.
backup, sync, clear, commands and get_token are reserved for the owner of the Discord application.
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.
| 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 |
Setup
Usage
Help