Guides

How to host your own agar.io server

Updated July 2026

Full disclosure before you read on: alis.io is our own hosted agar game, so we have a horse in this race. This guide is still the honest DIY walkthrough we wish existed, and it is useful whether or not you ever touch our site.

What you're signing up for

Self-hosting means running open-source server code that has not been actively developed for a few years, on a machine that stays online for as long as anyone wants to play. You will pin a Node.js version, edit a config file or two, and keep an eye on it yourself. None of that is hard, but it is real work that the hosted route skips. The rest of this guide is the honest version of what that work looks like.

Pick a server implementation

They are all Node.js projects that descend from the original Ogar. Three are worth knowing about, and the gap between them is mostly about how painful the install is.

OgarII Luka967/OgarII

The most complete implementation and the de facto standard, with the widest protocol coverage and multiple worlds inside one instance. It is not archived, but the default branch was last updated in November 2019, and its single native dependency is the thing that trips most people up (see the Node version section below). Apache-2.0, around 72 stars.

MultiOgarII m-byte918/MultiOgarII

The easy path. It uses the pure-JavaScript ws library instead of a native module, so npm install just works and it runs on current Node with no compiler involved. Last updated October 2021, protocol versions roughly v4 to v11, Apache-2.0, around 132 stars (the most-forked of the maintained forks). Note the rename: this was Megabyte918/MultiOgar-Edited, and the old URL now redirects here.

Original Ogar OgarProject/Ogar

The historical root that everything else forks from, and by far the most-starred. It was archived by its owner on 27 November 2020 and is read-only. Worth knowing as context, but do not start a new server here; use OgarII or MultiOgarII instead.

There is also a small wave of newer rewrites in Go and Rust (for example 8h9x/CellKitServer, a Go server created in late 2025 and still being pushed in 2026). They are genuinely new but have near-zero adoption, so treat them as a space to watch rather than a safe default.

Install and first run

Both are the same shape: clone the repo, install dependencies, and run the entry file. Get it running locally first, before you think about a server.

OgarII

git clone https://github.com/Luka967/OgarII
cd OgarII
npm install
cd cli
node index.js

On first run OgarII writes settings.json and log-settings.json into the cli/ folder. Edit cli/settings.json to change the port and the rules. First read the next section though, because on a modern Node this step crashes.

MultiOgarII

git clone https://github.com/m-byte918/MultiOgarII
cd MultiOgarII
npm install
cd src
node index.js

Config lives in src/settings.json. Unlike OgarII, this one starts on current Node with no native build.

The Node version wall (and why the error message lies)

OgarII's only dependency is the old native µWebSockets binding, [email protected]. On a modern Node, npm install appears to succeed (you get a deprecation warning and nothing else), and then the server crashes the moment you start it.

Booting OgarII on Node 24:

Error: Compilation of µWebSockets has failed and there is no pre-compiled binary available for your system. Please install a supported C++11 compiler and reinstall the module 'uws'.
    at .../node_modules/uws/uws.js:40:19
    at Object.<anonymous> (.../src/sockets/Listener.js:1:19)
Node.js v24.16.0

Here is the part no other guide tells you: that message is misleading. uws does not compile anything at all. It picks a prebuilt binary by your Node ABI version, and it ships binaries only for ABI 57, 59 and 64, which are Node 8, 9 and 10. There is no source in the package to build. So when the loader finds no binary for your Node, it prints the "install a C++11 compiler" line as a fallback. Installing a compiler changes nothing: this error was reproduced on a machine with gcc 13 already installed.

This also means the usual advice to "pin Node 16" does not work either. Node 16 is ABI 93, which is not in the bundle, so it fails the exact same way. Only Node 8, 9 or 10 will run stock OgarII.

The fix that actually works for OgarII:

nvm install 10
cd cli
node index.js

On Node 10 it boots (you will see OgarII 1.3.6 and the FFA gamemode start), and the only thing left is an EACCES error on port 443, because the default port is privileged. Set listeningPort to something like 8080 in cli/settings.json and it runs. The catch: Node 10 has been end-of-life since April 2021, so exposing it to the internet is a real security liability.

MultiOgarII on the same Node 24 machine:

Running MultiOgarII 1.6.3, a FOSS agar.io server implementation.
Game server started, on port 8080
Current game mode is Free For All

Because MultiOgarII uses pure-JavaScript ws, npm install adds a single package and it boots on current Node in under a second. Same machine, same Node: OgarII crashes on its native dependency, MultiOgarII just runs. If you want a public server without pinning an end-of-life Node, start with MultiOgarII.

You also need a client

The live agar.io site will not reliably connect to your own server, so you run a small open-source client that speaks the same protocol as your server. These are static web pages you host yourself.

Cigar3 LituDev/Cigar3

The one to start with. It is a protocol 6 client and the best-maintained of the Cigar family (last updated March 2024). Run npm install then npm run cigar3, and it serves on localhost:3000. You list your servers in web/servers.json.

Cigar2 Cigar2/Cigar2

The classic that most old guides point at. Also protocol 6: npm i && npm start on localhost:3000, with servers added to the drop-down in index.html. It has been dormant since December 2021 (not archived), so prefer Cigar3 unless you have a reason not to.

agarian-2 agarian-2/agarian-2.github.io

A zero-build option: open the hosted page, press the dev-console shortcut, and run setServer("ip:port"). It pairs specifically with the agarian-2/MultiOgar server.

The one rule that matters: client and server must agree on a protocol version. MultiOgar and MultiOgarII speak protocol 6, so use a protocol 6 client like Cigar3. OgarII speaks every version, so a protocol 6 client works, or you can use the modern branch of Luka967/Cigar for its native protocol. A mismatch simply will not connect.

OgarII's readme documents a console command, core.disableIntegrityChecks(true), to aim the official client at a private server. It historically worked, but the live agar.io client is rebuilt often and that hook may be gone, so do not build your setup around it. Ship a dedicated client instead.

Where to run it

Oracle Cloud Always Free is the popular choice. The Ampere ARM shape (VM.Standard.A1.Flex) gives an always-free 2 OCPU and 12 GB of memory per tenancy as of 2026, halved from the old 4 OCPU / 24 GB. Two caveats: "Out of host capacity" errors are common when launching this shape, and your home region is fixed at signup. ARM also makes native compiles harder, but that only bites OgarII (the uws build); MultiOgarII is pure JavaScript, so pairing MultiOgarII with the ARM free tier is painless.

The other always-free option is VM.Standard.E2.1.Micro: an AMD x86 box with 1 GB of RAM, up to two of them. Native builds are easier on x86, and it is fine for a few dozen players.

A Raspberry Pi at home costs nothing extra and gives low latency to local players. The limits are networking, not compute: many home connections use CGNAT (so you cannot forward a port inbound) and hand out a changing IP. A Cloudflare Tunnel solves both at once. Use the 64-bit Raspberry Pi OS.

Skip the serverless and PaaS free tiers for a live game loop. Render free spins the service down after 15 minutes idle and cold-starts in about a minute, which drops every connection. Railway has no permanent free tier in 2026 (a one-time credit, and a card is required). Netlify cannot hold a persistent WebSocket at all. Vercel now accepts WebSocket upgrades, but it cannot run a single long-lived, in-memory game process: connections die at the function time limit and reconnects land on different instances. An agar.io tick loop needs one process holding all player state, which none of these provide.

Making it reachable (wss)

If the client page is served over HTTPS, the browser will only open a wss:// (secure) socket, so your server needs TLS in front of it. Two clean ways to do that.

nginx reverse proxy (the load-bearing lines):

location / {
    proxy_pass http://127.0.0.1:8080;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_read_timeout 3600s;
}

The Upgrade and Connection headers are what let the WebSocket handshake through; the raised proxy_read_timeout keeps idle sockets from being cut at 60 seconds. Pair it with certbot for the certificate. On nginx 1.29.7 and later, HTTP/1.1 to the upstream is the default; on older nginx add proxy_http_version 1.1; as well.

Simpler still: a Cloudflare Tunnel. It has full WebSocket support, the cloudflared daemon dials out (so there is no port to forward and it works behind NAT or CGNAT), and Cloudflare terminates TLS at its edge. For a home box this is usually the least-effort path to a working wss endpoint.

What this costs you over time

The honest ledger: uptime is now yours to keep, you patch the OS and Node yourself, and you deal with protocol drift as agar.io keeps changing. Nobody upstream is fixing these servers, so any bug you hit is yours to work around. For a small server among friends that is a fun weekend and a cheap box. For something you want to be reliably up for strangers, that ongoing maintenance is the real price.

The version that takes three minutes

If after reading all that you would rather not run and patch a server yourself, that is exactly the gap alis.io fills: build a gamemode in a visual editor, publish, and it goes live on a hosted server with its own link. The full walkthrough is in how to make your own agar server, or you can go straight to the editor.

FAQ

Does OgarII still work in 2026?
Yes, but only on Node 8, 9 or 10, because its native uws dependency ships binaries for those versions only. Its code was last updated in November 2019. For a modern Node without pinning an old version, use MultiOgarII instead.
Why does npm install succeed but the server crashes on boot?
The uws package installs a placeholder that carries prebuilt binaries only for old Node ABI versions. Install works, but at startup the loader finds no binary for your Node and throws a misleading "install a C++11 compiler" error. A compiler does not fix it; a matching (old) Node version does.
Can I connect with the official agar.io client?
Not reliably. Run a dedicated open-source client such as Cigar3 that speaks the same protocol as your server. There is an old console workaround for the official client, but it is not something to depend on.
What is the cheapest way to host it?
Free: Oracle Cloud Always Free (the x86 E2.1.Micro, or the ARM A1 paired with the pure-JavaScript MultiOgarII), or a Raspberry Pi at home behind a Cloudflare Tunnel.
Do I have to open ports or buy a domain?
A Cloudflare Tunnel avoids port forwarding and gives you a working TLS endpoint without opening anything inbound. The alternative is nginx plus certbot on a VPS with your own domain.