Installation from Source¶
Prerequisites¶
- Go 1.25 or later — download
- Git — installation guide
- MariaDB or MySQL — MariaDB install guide
Notification Service¶
You will need at least one bot token:
Database Setup¶
Create a database and user for Dexter. Use a strong password.
For local connections:
CREATE DATABASE dexter;
CREATE USER 'dexteruser'@'localhost' IDENTIFIED BY 'yourStrongPassword';
GRANT ALL PRIVILEGES ON dexter.* TO 'dexteruser'@'localhost';
For remote connections (only if needed):
CREATE DATABASE dexter;
CREATE USER 'dexteruser'@'%' IDENTIFIED BY 'yourStrongPassword';
GRANT ALL PRIVILEGES ON dexter.* TO 'dexteruser'@'%';
Building Dexter¶
-
Clone the repository:
-
Build the binary:
-
On first start, Dexter creates
config/local.jsonfrom sensible defaults. Edit it to add your database credentials and bot tokens:
Game data
Dexter automatically downloads game data files (monsters, moves, items, grunts, quests, types, translations) on first startup and refreshes them every 6 hours. You can also regenerate manually with go run ./cmd/dexter-generate.
Updating¶
Running as a Service¶
Using PM2 (recommended)¶
PM2 is the preferred process manager for the Golbat/Dragonite stack. If you don't already have it:
Start Dexter with PM2:
Save the process list so it survives reboots:
Useful PM2 commands¶
pm2 status # Overview of all processes
pm2 logs dexter # Follow logs
pm2 restart dexter # Restart
pm2 stop dexter # Stop
pm2 delete dexter # Remove from PM2
Using systemd¶
If you prefer systemd, create /etc/systemd/system/dexter.service:
[Unit]
Description=Dexter Pokemon GO Alert System
After=network.target mysql.service
[Service]
Type=simple
User=dexter
WorkingDirectory=/opt/dexter
ExecStart=/opt/dexter/dexter
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Then:
Useful systemd commands¶
sudo systemctl status dexter # Check status
sudo systemctl restart dexter # Restart
sudo journalctl -u dexter -f # Follow logs
Next: Basic Configuration