Clone this repository and run the start script:
# Run this in your shell/terminal:
git clone https://github.com/open-mc/server
sh server/node/start
Starting the server will create 1 file and 1 folder where the command is run:
world
containing world data as well as config filesproperties.yaml
for server properties which you can edit in any text editor.- You can optionally add a different path with something like
sh server/node/start /Path/To/Properties/File
to change where this file is read/created. - In this file you can also specify where the
world
directory should be read/created, relative toproperties.yaml
- You can optionally add a different path with something like
Got any issues? Open a new issue, or directly ask for help on our discord!
You may want to secure your server so that players on other computers can join:
Make sure you have a domain that points to your server's IP. We recommend no-ip
- Go over to https://certbot.eff.org/instructions, follow their instructions to install certbot for your OS if you haven't already.
- Run
certbot certonly --standalone
. - If this is your first time using certbot, enter your email, and agree to their required and optional emails if you wish.
- Enter your domain name(s)
- Once the command has finished, it will show you where the private key and certificate are saved, for example,
/etc/letsencrypt/live/mydomain.com/privkey.key
and/etc/letsencrypt/live/mydomain.com/fullchain.pem
. Copy these - Enter those paths into the
key:
andcert:
entries in theproperties.yaml
file respectively, and restart the server.
If you are running your server on a local network (such as a home router) you will need to enable port forwarding first before doing all of the above.
If you are running your server on a local network (such as a home router) you may need to enable port forwarding
- Open up your router's home page, this is usually on 192.168.1.1 or 192.168.1.254
- Find the page for "Port Forwarding" options or "IPv6 pinholes" (one, the other, or both), these settings are usually under "Firewall", "Devices" or "IPv4"/"IPv6" category. You may need to enter your router's admin password (which is different from the WiFi password)
- Create a new rule:
- Select your device (there may be a dropdown menu or you may need to enter its local IP address which should start in
192.168.
, this can be found in your device's wifi info settings) - Set all external/internal ports to be
27277
- Set the protocol to
TCP
- Give it a nice name if prompted (this part doesn't matter)
- Select your device (there may be a dropdown menu or you may need to enter its local IP address which should start in
- Save and exit
Updating is done automatically by the start script.
If you're starting the server directly without the start script, updating is as simple as performing git pull
. If you are running a public server consider keeping to the release
branch
You can use a tool like tmux
or systemd
to keep your server running even after you close your terminal session. Neither of these are available on windows, but I recommend using another hosting medium (such as a raspberry pi or a VPS) that runs on a linux distribution if you intend on keeping your server up around the clock.
Consider reading through properties.yaml
and fine-tuning your server's configuration, most properties are well documented so you're unlikely to mess up.
Starting the server will start a CLI, where you can chat or enter commands Press tab to switch between chat mode (for chat and commands) and REPL mode (for debugging, experts only!)
Type /help
for a list of commands or /help <command>
for more help on a specific command. Here are some basic must-know commands:
/list
, see who's online/info
or/i
, see server info (version, uptime, CPU & RAM usage)/give [player]
/hide [player]
,/show [player]
- Put someone in/out of spectator/perm [player] [op or mod or normal or visitor or deny]
- Change someone's perms/op [player]
- Same as/perm [player] op
/ban [player] (duration)
- Ban a player from your server/wipe [player]
- Wipe someone's playerdata, sending them back to world spawn with an empty inventory./where [player]
- See where a player is without having to join the game or teleport to them/restart (delay)
- Restart the server after some time, or immediately