NewSchokr 13 is here. A whole new UI, seven locations, snapshots and more. Read more →

How port allocations work and how to add a port on Schokr

Every Schokr server gets one port. Learn what allocations are, when you need another port and how to add one for 25 credits.

Updated · 2 min read

A port allocation is an IP and port combination assigned to your server. Each Schokr server starts with one, which is its main address. You can add more in the Network section for 25 credits each, or unlimited with Schokr One.

The primary allocation

Your first allocation is the address people use to connect, written as <server-ip>:<port>. The server software is told to listen on this port automatically through the template, so you normally do not set it yourself.

For example, Minecraft templates set server-port for you. If you change it by hand in server.properties, players will not be able to connect. Keep it matching the allocation.

When do you need an extra port?

Most servers only need one. You need more when your software listens on more than one port, for example:

  • Minecraft with Geyser in standalone UDP mode, or a separate query or RCON port
  • Minecraft voice chat plugins that use their own UDP port
  • Map plugins that run a small web server (like a live web map)
  • Source games that want a separate port for SourceTV or RCON
  • A bot that also serves a web dashboard or webhook endpoint
  • TeamSpeak 3, which uses separate ports for voice, file transfer and server query

Adding a port

  1. Open your server in the console.
  2. Go to the Network section.
  3. Add an allocation. It costs 25 credits (free and unlimited with Schokr One). Your Discord account must be linked to spend credits.
  4. Note the new port number.
  5. Put that exact port into the plugin's or app's config.
  6. Restart the server.

Using the new port in your software

The port you get is assigned to you, so you cannot pick an arbitrary number like 8080. Configure your software to listen on the assigned port, and to bind to all interfaces.

# example plugin config
webserver:
  port: 25601
  bind: 0.0.0.0

For a web server in Node.js:

app.listen(25601, '0.0.0.0')

Listening on 127.0.0.1 or localhost makes the port unreachable from outside.

Reading ports from the environment

Bots and apps can read the primary port from the SERVER_PORT environment variable, so you do not have to hardcode it:

const port = process.env.SERVER_PORT

Troubleshooting

  • Address already in use: two things are trying to use the same port. Give each plugin its own allocation.
  • Port unreachable: check the software binds to 0.0.0.0 and uses exactly the allocated port, then restart.
  • Cannot add an allocation: check your team has at least 25 credits and that your role has the network permission.