# Check Java (need 11+)
java -version
# If not installed:
# Ubuntu/Debian: sudo apt install openjdk-11-jdk
# Mac: brew install openjdk@11
# Windows: Download from https://adoptium.net/
# Install Leiningen
# Linux/Mac:
curl https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > ~/bin/lein
chmod +x ~/bin/lein
lein version # Downloads dependencies on first run
# Windows:
# Download lein.bat from https://leiningen.org/ and add to PATH# Copy sample config
cp files/config/config.ini.sample files/config/config.ini
# Edit with your credentials
nano files/config/config.ini # or use any text editorMinimal config:
[options]
username = YOUR_USERNAME
password = YOUR_PASSWORD
webpage = uni1.ogame.org
attackRadius = 10
attackingShip = smallCargo
probesToSend = 1Option A: Web UI (Recommended)
# Starts web interface on http://localhost:3000
./run-bot.sh # Linux/Mac
run-bot.bat # Windows
# OR directly:
lein run
# Then open http://localhost:3000 in your browserOption B: Console Mode
# Console mode (no GUI)
./run-bot.sh --no-gui # Linux/Mac
run-bot.bat --no-gui # Windows
# OR directly:
lein run --no-guiWatch the console output:
Bot started.
Contacting server...
Logged in with user YOUR_USERNAME
Connected to OGame server
Searching inactive planets...
Found 45 inactive planets in 21 systems
Entering attack mode
Attacking [1:234:5] from [1:240:3] with 50 smallCargo
...
Check logs:
tail -f files/log/ogbot.logYour bot is now running. It will:
- Scan for inactive planets
- Send espionage probes
- Attack profitable targets
- Repeat continuously
# Make sure lein is in PATH
export PATH="$HOME/bin:$PATH" # Add to ~/.bashrc- Double-check config.ini
- Try logging in manually to verify credentials
- This is expected - GUI mode is not yet implemented
- Use
--no-guiflag
- Check your internet connection
- Verify OGame server is accessible
- Check if proxy is needed (add to config.ini)
- Monitor First Run: Watch for 10-15 minutes
- Check Results: Log into OGame and verify attacks
- Adjust Settings: Tune attackRadius, rentabilityFormula
- Set Up Automation: Use cron/systemd to run continuously
lein repl(require '[ogbot.bot :as bot])
(require '[ogbot.config :as config])
;; Load config
(def cfg (config/load-bot-configuration "files/config/config.ini"))
;; Create bot state
(def state (bot/create-bot-state "files/config/config.ini"
(bot/->ConsoleEventManager)))
;; Manually scan galaxies
(def updated-state (bot/scan-galaxies state))
;; Check inactive planets
(count (:inactive-planets updated-state))lein uberjar
java -jar target/uberjar/ogbot-3.1.0-SNAPSHOT-standalone.jar --no-gui# Create systemd service
sudo nano /etc/systemd/system/ogbot.service[Unit]
Description=OGBot Clojure
After=network.target
[Service]
Type=simple
User=your_user
WorkingDirectory=/path/to/kovans-ogbot
ExecStart=/usr/bin/java -jar target/uberjar/ogbot-3.1.0-SNAPSHOT-standalone.jar --no-gui
Restart=always
[Install]
WantedBy=multi-user.targetsudo systemctl enable ogbot
sudo systemctl start ogbot
sudo journalctl -u ogbot -f # View logsattackRadius = 20 # Default: 10sourcePlanets = [1:240:3], [1:250:7]# More weight on deuterium
rentabilityFormula = (metal + 2 * crystal + 4 * deuterium) / flightTime
# Only metal and crystal
rentabilityFormula = (metal + 1.5 * crystal) / flightTimeplayersToAvoid = BadPlayer1, BadPlayer2
alliancesToAvoid = StrongAlliance- Start Small: Use attackRadius=5 for first run
- Monitor Closely: Watch first hour of operation
- Use Dedicated Account: Don't risk your main account
- Check OGame Rules: Bot usage may violate ToS
- Backup Config: Keep config.ini backed up
# In run-bot.sh or run-bot.bat, change:
lein run --no-gui # Uses default 512MB
# To:
export JVM_OPTS="-Xmx256m"
lein run --no-gui# Use uberjar for faster startup
lein uberjar
java -jar target/uberjar/ogbot-*-standalone.jar --no-gui- Logs:
files/log/ogbot.log - Debug HTML: Check
debug/folder for captured pages - Config: Review
files/config/config.ini - Database:
files/botdata/planets.db(SQLite)
✅ Bot logs show "Bot started" ✅ Bot logs show "Connected to OGame server" ✅ Bot logs show "Found X inactive planets" ✅ Bot logs show "Attacking [X:Y:Z]" ✅ OGame shows fleet missions in progress
- Press
Ctrl+Cin console - Or send SIGTERM to process
- Bot saves state automatically on shutdown
Happy Botting! 🚀
For more details, see:
- README-CLOJURE.md (comprehensive guide)
- TRANSLATION-SUMMARY.md (translation details)
- Original README (Python version reference)