HeadlinesBriefing favicon HeadlinesBriefing.com

Self-Hosted Freeciv Longturn Server on Fly.io

Hacker News •
×

A developer has launched a self-hosted Freeciv 3.2.3 multiplayer server designed for longturn games, where each turn lasts 23 hours instead of minutes. Running on Fly.io, the server features email notifications, a live status page, and an AI-generated newspaper. An active 16-player game is currently running at freeciv.andrewmcgrath.info, with players able to check live rankings, turn countdowns, and diplomacy tracking.

Longturn transforms Freeciv into a daily strategy game where players log in once per day to make moves before the timer expires. The server architecture uses a FIFO pipe for communication, with scripts handling everything from auto-saving every five minutes to sending turn reminders within two hours of deadlines. The system also generates 'The Civ Chronicle,' an era-appropriate wartime newspaper article for each turn using OpenAI's API.

The setup requires Fly.io CLI, Docker, AWS SES for email, and an optional OpenAI API key. Players connect using the Freeciv 3.2.3 client to your-app-name.fly.dev on port 5556. The server preserves turn timers across restarts and redeploys, making it resilient for long-running games. Full documentation covers player management, game state modifications, and common operations like deploying changes or forcing saves.