How can I connect to the same server in Agar.io? [duplicate]

UPDATE: There is an other way

I was just reminded of another way to connect to an custom Agar.io server. And it's so incredibly simple.

Navigate your browser to the normal Agar.io address, but add a query at the end of the url like so:

http://agar.io?[ip address here]

Please note that you should not enter the ws:// prefix. Here is an example:

http://agar.io?127.0.0.1:443

And you do not prefer to do so, you may use the updated bookmarklet:

javascript: location.href = "http://agar.io?" + prompt("IP Address", "XXX.XXX.XXX:XXXX"); void 0;

Another more user friendly bookmarklet created by @E. Sundin. It's a jumble of text, but it works:

javascript: if(window.location.host%20!%3D%3D%20%22agar.io%22)%20%7Bwindow.location%3D%22http%3A%2F%2Fagar.io%2F%22%3B%7D%20else%20if(typeof%20_ws%20%3D%3D%3D%20%22undefined%22)%20%7Bvar%20server%20%3D%20prompt(%22Server%20url%22%2C%20localStorage.getItem(%22__server%22))%3Bconsole.log(%22Selected%3A%20%22%20%2B%20server)%3BlocalStorage.setItem(%22__server%22%2C%20server)%3Bwindow._ws%20%3D%20WebSocket%3Bwindow.WebSocket%20%3D%20function(a%2C%20b)%20%7Bvar%20_server%20%3D%20localStorage.getItem(%22__server%22)%20%7C%7C%20%22%22%3Bif(_server.length%20!%3D%3D%200)%20a%20%3D%20_server%3Bconsole.log(%22WebSocket%20opened%20with%3A%20%22%20%2B%20Array.prototype.join.call(arguments%2C%20%22%2C%22))%3Breturn%20arguments.length%20%3D%3D%3D%202%20%3F%20new%20_ws(a%2C%20b)%20%3A%20new%20_ws(a)%3B%7D%3B%7D%20void%200%3B

EDIT: This no longer works

This function was removed by the dev and this is now broken. I will keep it here for reference.

The dev has also added a new game mode, Party. With that you can connect with your friends. At the moment it only works with FFA rules.

Of course if you want to play Any of the other modes, again you can connect to the server via the country selection as the same time as your friend.


Broken stuff:

Actually, yes there is.

Paste this into the address bar while on the Agar.io website:

javascript: connect("ws://" + prompt("Server IP", "XXX.XXX.XXX.XXX:XXX")); void 0;

Now most browsers will remove the javascript: from the start as a security measure; you just need to go back there and add it.

It will prompt you for the server IP. Please don't add ws:// at the start, include the whole IP with the port number.

As well you can bookmarklet the JS code. You can easily bookmarklet the code with my bookmarklet tool located here. For more on bookmarklets, see here.


I would also like to mention something else. When you connect to the server on a specified port you will not always be on the same game.

The second you connect to the port, the server selects a game with the least amount of players from that port. If the all of the games from that port is full, it will display an error and try a different server.

Connecting to a server this way is not reliable, especially if you want to join the same game as your friends. It might cause you some grief.

The only way around this I can see is to connect to the same server at the same time hoping that the server will select the same game for you and your friend. Of course this is not always the case.


You can use the Chrome plugin for it.

You just type the IP address out in the Start GUI.