
Host a Minecraft or ARK Server With Claude Code
May 27, 2026
You can host a game server with Claude Code in about 15 minutes, even if you've never touched a Linux terminal. Claude does the typing while you answer plain-English questions about what game, how many friends, and which folder. The result is your own Minecraft or ARK box running on hardware you already own.
Why bother when Apex and Nitrado exist#
Managed hosts are fine until you read the invoice. Shockbyte raised Minecraft prices to $2.99 per GB per month in June 2024, so a usable 4GB box runs around $12, and Apex Hosting starts near $7.99. Nitrado ARK plans begin at $24.99 for 20 slots and climb fast once you add a second map.
I ran a Nitrado ARK cluster for six months. It cost me $84 a month and I still couldn't install the mods I wanted. The hidden tax of managed hosting is the things you can't do, not the price.
Self-hosting used to mean learning systemd, ufw, and Docker before your friends got bored of waiting. That's the part Claude Code removes.
Monthly cost for a usable game server (USD)
What Claude Code actually does#
Think of Claude Code as a patient sysadmin who lives in your terminal. You describe what you want, and it writes the commands, runs them, reads the errors, and tries again. You approve each step.
Install is one line, assuming you have Node.js on your machine:
npm install -g @anthropic-ai/claude-code
cd ~/servers/minecraft
claude
After claude starts, you type things like "set up a Minecraft 1.21 server for 5 friends with 4GB RAM" and watch what happens. If a command fails, Claude reads the error and adjusts. You just need to read the screen and say yes or no.
This is Claude Code for non-developers in one sentence: it converts "I want a Minecraft server" into the 30 commands that produce one. If you're curious about other ways to use it, I wrote about the best MCP servers worth installing and running Claude Code with local models.
The 15-minute Minecraft setup#
The easy path to self-host Minecraft is the itzg/minecraft-server Docker image. It handles version pinning, EULA, world persistence, and mod loading. You just give Claude the parameters.
Start a chat in an empty folder and paste this prompt:
Set up a Minecraft 1.21 vanilla server using the itzg/minecraft-server
Docker image. 4GB RAM, 5 player slots, view-distance 8, world saved
to ./data. Write a docker-compose.yml and start it. Show me the
connection IP when it's running.
Claude will write a compose file, pull the image, accept the EULA, and tail the logs until it sees Done. On my machine the whole thing took 11 minutes, mostly waiting for the Docker pull.
RAM sizing is the one number worth knowing. Squid Servers' breakdown is the cleanest I've found:
- 2GB: vanilla, 1-3 players, default view distance
- 4GB: vanilla, 5-10 players, view distance 8
- 6-8GB: modded packs like All The Mods or Create
- Dropping view distance from 10 to 7 cuts RAM use about 30%
Tip: Tell Claude your exact player count and machine RAM. It will pick view distance and entity limits that fit. Vague prompts get vague configs.
ARK is messier (and Claude doesn't mind)#
ARK server setup is harder than Minecraft because there's no friendly Docker image with a million pulls. You install it via SteamCMD, which is a finicky command-line tool that downloads a 20GB game server. The ports matter too.
Per Ventus Server's 2025 guide, ARK Survival Ascended needs:
- Ports: 7777 UDP and TCP for game traffic, 27015 UDP for the server browser
- RAM: 13-19 GB depending on map and mods
- Disk: ~30GB for the install, more once players build
- Auto-restart: required, ARK crashes on a schedule
I asked Claude to bootstrap a fresh Ubuntu box for an ARK: Survival Ascended server. It wrote a SteamCMD wrapper script, a systemd unit for auto-restart, and a 4am cron job for daily reboots. When SteamCMD threw a disk write failure on app 2430930, Claude noticed, ran df -h, and told me the disk was full.
It then moved the install to a bigger volume on its own. I didn't type a single command.
One quirk worth knowing. Nitrado holds an ARK console-hosting exclusivity deal running to 2030, so PS5 and Xbox players can't connect to a self-hosted box. PC-only friends are fine.
When port forwarding fails#
Half the people who try to host at home hit the same wall. They forward the port, restart the router, and nobody can connect. The reason is usually CGNAT, where your ISP shares one public IP across hundreds of customers, so port forwards die at their network, not yours.
Tell Claude to check first. This one prompt saves an evening of guesswork:
Check if I'm behind CGNAT. Compare my router's WAN IP to what
curl ifconfig.me returns. If they don't match, I'm behind CGNAT
and port forwarding won't work. Recommend a tunnel solution.
If you're on CGNAT (common on T-Mobile Home Internet, Starlink, and most mobile carriers), the CGNAT tunnel options are mature and free for small servers:
- Playit.gg: built for game servers, free tier covers Minecraft and ARK
- Pinggy: TCP/UDP tunnels with a generous free plan
- Cloudflare Tunnel: best for web traffic, awkward for UDP-heavy games
I use Playit for any port forwarding alternative when I'm on someone else's network. Claude can install and configure it from a single sentence. The LocalToNet writeup is a good background read if you want to understand the trade-offs.
Keep it running with a CLAUDE.md runbook#
The thing that separates a weekend hack from a server your friends actually keep using is the game server CLAUDE.md runbook. It's a plain markdown file Claude reads every time it opens that folder. Think of it as a memory note for the AI.
Put one in your server directory and Claude stops asking the same setup questions twice:
# Minecraft Server Runbook
## Stack
- Docker image: itzg/minecraft-server:java21
- Version: 1.21.1 vanilla
- RAM: 4GB heap, JVM flags via Aikar's tuning
- Data folder: ./data (back up before any upgrade)
## Common tasks
- Start: `docker compose up -d`
- Logs: `docker compose logs -f mc`
- Stop cleanly: `docker compose exec mc rcon-cli stop`
- Backup: tar ./data to ./backups/world-$(date +%F).tgz
## Known issues
- Players occasionally get "Connection refused" right after restart.
Wait 30 seconds for the server to bind to 25565.
- Do not delete ./data/world without copying ./data/world_nether and
./data/world_the_end with it. They're separate dims.
Pair the runbook with a self-healing log watcher. This single command keeps Claude looking at the logs and reacting to errors:
tail -f data/logs/latest.log | claude --print \
"Watch this log. If you see an exception or 'server overloaded',
tell me what's wrong in plain English and suggest a fix."
I leave this running in a tmux pane during big sessions. Twice now it's caught chunk-loading errors before players noticed. It's the same pattern I use in my self-hosted developer stack.
FAQ
TL;DR: If you've been paying $12-25 a month for a managed server and feeling boxed in, install Claude Code tonight, point it at an empty folder, and let it do the typing. Start with Minecraft. It's the gentlest landing. Once you've done one server with a CLAUDE.md runbook, ARK and the rest are just longer prompts.