Click this button to deploy to your cloudflare account right now:
Run a full Minecraft Java server on the edge with real-time monitoring, authentication, and plugin management powered by Cloudflare Workers and Containers.
🎮 You get a single Cloudflare standard-4 container with 4 vCPUs, 12 GiB of memory and 20 GB of storage, enough to comfortably accomodate 20 players.
💵 This costs approximately 50 cents per hour to run on Cloudflare. The server automatically shuts down after 20 minutes of inactivity to save costs, your maps and plugin configurations are saved to R2 storage and restored when you start the server again.
Click on the Deploy to Cloudflare button above to deploy to Cloudflare. The Cloudflare free tier is not supported for Containers so you have an account on the $5/month Cloudflare paid plan (or higher) to deploy.
- Navigate to your deployed worker URL
- Click "Set Password" to secure your Server with a password
- Login with your credentials
- Click "Start Server" to launch the Minecraft container
- While you're waiting for the server to start up head over to https://playit.gg/ and sign up for a free account. DO NOT create an agent or a tunnel in playit.gg, this will be done automatically for you in step 6.
- Wait 2-3 minutes for the server to fully initialize
- Follow the playit.gg server address shown in the plugin panel to connect to your server via playit.gg
- Use your playit.gg server address
<some-name>.gl.joinmc.linkto connect to your Cloudflare Minecraft server
- 🚀 Serverless Infrastructure - Built on Cloudflare Workers, Containers, Durable Objects and R2
- 🎮 Full Minecraft Server - Paper server with plugin support
- 🗺️ Live Mini-Map - Integrated web Mini-Map on R2 storage
- 🔐 Authentication - Secure cookie-based auth with encrypted tokens
- 💻 Web Terminal - Real-time Minecrat control console via WebSocket
- 🔌 Plugin Management - Enable/disable plugins through web UI
- 💤 Auto-Sleep - Containers sleep after 20 minutes of inactivity to save resources
- 📊 Real-time Monitoring - Server status, player list, and performance metrics
Core Components:
- Main Worker (
src/worker.ts) - Elysia API server - Frontend - Preact SPA with Eden Treaty client using polling for real-time updates
- MinecraftContainer (
src/container.ts) - Durable Object managing server lifecycle & security - HTTP Proxy - Custom TCP-to-HTTP bridge in Bun binary allows container to securely connect to R2 via bindings (no R2 tokens needed)
- Dynmap Worker - Separate worker serving Mini-Map
If you do not want to use playit.gg, you can use Tailscale or Cloudflare Tunnels for super secure private networking but it's harder to share with friends.
These instructions are only if you do not want to use playit.gg and want to use Tailscale for private networking instead.
- Disable the playit.gg plugin in the plugin panel
- Generate a Tailscale authentication key in your Tailscale account settings
- Create a TS_AUTHKEY build secret in your mineflare worker on Cloudflare and re-deploy your worker
- Look in your tailscale dashboard for a new node called "cloudchamber", grab the private IP address
- Create a new server in Minecraft using the address
<tailscale private ip>:8081and connect to your Cloudflare Minecraft server
Instructions coming soon....
- Bun javascript runtime
- Cloudflare account with Workers and R2 enabled
# Install dependencies
bun install
# Start local development environment
bun run dev# Configure alchemy
bun run configure
# Login to Alchemy
bun run login
# Deploy to Cloudflare
bun run deployAfter deployment, you'll receive URLs for:
- Main worker (API and frontend)
- Dynmap worker (map tiles)
Required environment variables (set in .env file):
# Cloudflare credentials (from Alchemy login)
CLOUDFLARE_ACCOUNT_ID=your_account_id
CLOUDFLARE_API_TOKEN=your_api_token
# Optional: Tailscale for private networking
TS_AUTHKEY=your_tailscale_key
# Optional: Alchemy password for state encryption
ALCHEMY_PASSWORD=your_secure_passwordEdit src/container.ts to customize:
sleepAfter- Auto-sleep timeout (default: 20 minutes)maxPlayers- Maximum concurrent playersserverVersion- Minecraft server version- Plugin configurations
Mineflare supports optional Minecraft plugins that can be enabled/disabled via the web UI:
Built-in Plugins:
- Dynmap - Always enabled, provides live web-based map
- playit.gg - Optional tunnel service for external access
Adding Custom Plugins:
Instructions coming soon....
# Build worker code
bun run build
# Build container services including HTTP proxy binary and File server binary
./container_src/build-container-services.sh
# Destroy deployed resources
bun run destroy
# Show Alchemy version
bun run version- CLAUDE.md - AI generated technical documentation
MIT License - see LICENSE file for details
- Cloudflare Workers - Serverless platform
- Alchemy - Infrastructure as Code tool
- itzg/minecraft-server - Docker Minecraft server
- Dynmap - Live mapping plugin
- Paper - High-performance Minecraft server
- Bun - JavaScript runtime
- Container costs can be significant including CPU, memory, storage and network egress costs. These will apply based on usage (check Cloudflare pricing, leaving a cloudflare container running 24/7 can cost you $100s per month)
- R2 storage has minimal costs (generous free tier)
- Workers have generous free tier (100k requests/day)
For issues and feature requests, please use the GitHub issue tracker.
Made with ☁️ by eastlondoner