---
title: "How to Host a Dedicated Minecraft Server on Linux | ZCS"
description: "Host a dedicated Minecraft server on Linux step by step: Java, a service user, firewall, systemd, backups, domain and security for a VPS or dedicated machine."
url: "https://www.zcraftstudios.com/blog/how-to-host-a-dedicated-minecraft-server"
updated: "2026-11-05T11:44:24.630443+00:00"
source: "ZCraft Studios"
---

> Site index for AI agents: https://www.zcraftstudios.com/llms.txt (full reference: https://www.zcraftstudios.com/llms-full.txt). Every page is available as Markdown by adding `.md` to its URL or sending `Accept: text/markdown`.

1. [Home](https://www.zcraftstudios.com/)
2. [Blog](https://www.zcraftstudios.com/blog)
3. How to Host a Dedicated Minecraft Server on Linux

[ All posts](https://www.zcraftstudios.com/blog)

# How to Host a Dedicated Minecraft Server on Linux

ZCraft StudiosNov 5, 2026

Host a dedicated Minecraft server on Linux step by step: Java, a service user, firewall, systemd, backups, domain and security for a VPS or dedicated machine.

## In this guide

- [What "dedicated" means](#what-dedicated-means)
- [Step 1: prepare the machine](#step-1-prepare-the-machine)
- [Step 2: install Java](#step-2-install-java)
- [Step 3: install the server](#step-3-install-the-server)
- [Step 4: firewall](#step-4-firewall)
- [Step 5: run it as a service](#step-5-run-it-as-a-service)
- [Step 6: tune memory and flags](#step-6-tune-memory-and-flags)
- [Step 7: domain and backups](#step-7-domain-and-backups)
- [Step 8: plugins, permissions and security](#step-8-plugins-permissions-and-security)
- [Windows dedicated server](#windows-dedicated-server)
- [Troubleshooting](#troubleshooting)
- [Frequently asked questions](#frequently-asked-questions)
- [Related reading](#related-reading)

## How to Host a Dedicated Minecraft Server on Linux

**Quick answer:** "dedicated server" means the server software running on its own machine, either a VPS or a physical dedicated server. To host one on Linux: update the system, create a non-root user, install the Java version your Minecraft version needs, download Paper, accept the EULA, open only SSH and port 25565 in the firewall, run it with `systemd`, and set up backups.

## What "dedicated" means

| Term                      | Meaning                                                |
| ------------------------- | ------------------------------------------------------ |
| Dedicated server software | The server jar that runs without a game client         |
| Dedicated machine         | A whole physical server you rent                       |
| VPS                       | A virtual slice of a machine, also fine for this guide |

Choosing between them: [Dedicated Server vs VPS](https://www.zcraftstudios.com/blog/minecraft-dedicated-server-vs-vps).

## Step 1: prepare the machine

1. Log in over SSH and update packages.
2. Create a user for the server, not root:

```
sudo adduser minecraft
```

1. Use SSH keys and disable password logins.

## Step 2: install Java

Install the Java version your Minecraft version needs: Java 21 for 1.20 to 1.21.11 and Java 25 for 26.1 and newer. Check with `java -version`. See [Update a Minecraft Server to 26.1+](https://www.zcraftstudios.com/blog/minecraft-26-1-server-update-guide).

## Step 3: install the server

```
sudo -u minecraft -i
mkdir server && cd server
# download Paper from papermc.io/downloads/paper into this folder
java -Xms4G -Xmx4G -jar paper.jar --nogui
```

The first run creates `eula.txt`. Read the EULA, set `eula=true`, and run it again. See [How to Start a Minecraft Server](https://www.zcraftstudios.com/blog/start-minecraft-server) and [server.properties Explained](https://www.zcraftstudios.com/blog/minecraft-server-properties-explained).

## Step 4: firewall

Allow only SSH and the Minecraft port:

```
sudo ufw allow OpenSSH
sudo ufw allow 25565/tcp
sudo ufw enable
```

See [Firewall Hardening](https://www.zcraftstudios.com/blog/minecraft-server-firewall-hardening).

## Step 5: run it as a service

Create `/etc/systemd/system/minecraft.service`:

```
[Unit]
Description=Minecraft Server
After=network.target

[Service]
User=minecraft
WorkingDirectory=/home/minecraft/server
ExecStart=/usr/bin/java -Xms4G -Xmx4G -jar paper.jar --nogui
Restart=on-failure
SuccessExitStatus=0 143

[Install]
WantedBy=multi-user.target
```

Then:

```
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft
```

Systemd restarts the server after crashes and starts it on boot. To send commands, use a console wrapper such as `tmux` or RCON secured to localhost. See [Automatic Restarts and Crash Recovery](https://www.zcraftstudios.com/blog/minecraft-server-auto-restart-crash-recovery) and [RCON Security](https://www.zcraftstudios.com/blog/minecraft-server-rcon-security-guide).

## Step 6: tune memory and flags

Match RAM to your needs, and leave memory for the OS. See [How Much RAM Does a Minecraft Server Need?](https://www.zcraftstudios.com/blog/how-much-ram-does-a-minecraft-server-need), [Aikar's Flags Explained](https://www.zcraftstudios.com/blog/aikars-flags-performance-tuning) and [ZGC for Minecraft Servers](https://www.zcraftstudios.com/blog/zgc-minecraft-server-flags-guide).

## Step 7: domain and backups

- Point a domain at the server with an A record. See [Custom Domain and SRV Records](https://www.zcraftstudios.com/blog/minecraft-server-dns-srv-record-guide).
- Back up the world, plugins and configs off the machine. See [Backup Script Guide](https://www.zcraftstudios.com/blog/minecraft-server-backup-script-guide) and [Backup Strategy](https://www.zcraftstudios.com/blog/minecraft-server-backup-strategy).

## Step 8: plugins, permissions and security

1. Add a permissions plugin and the core plugins. See [Best Plugins by Category](https://www.zcraftstudios.com/blog/best-minecraft-plugins-by-category).
2. Use a whitelist while testing. See [How to Whitelist Players](https://www.zcraftstudios.com/blog/how-to-whitelist-players-minecraft-server).
3. Keep the system updated.
4. Protect against bots. See [Join Spam Defense](https://www.zcraftstudios.com/blog/minecraft-server-antibot-join-spam-defense).
5. Monitor with [spark](https://www.zcraftstudios.com/blog/how-to-read-spark-profiler-minecraft).

## Windows dedicated server

The same steps apply. Install Java, run the jar in a folder you control, allow the port in Windows Firewall, and use Task Scheduler or a service wrapper to start on boot. Linux is the usual choice for public servers because of tools and lower overhead.

## Troubleshooting

| Problem                | Fix                                                                                                                      |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Service will not start | Check journalctl -u minecraft and the Java version                                                                       |
| Players cannot connect | Check the firewall and host's network rules. See [Port 25565 Not Working](https://www.zcraftstudios.com/blog/minecraft-server-port-25565-not-working) |
| Out of memory          | Lower \-Xmx or add RAM. See [RAM and Java Errors](https://www.zcraftstudios.com/blog/minecraft-java-heap-ram-errors)                                  |
| Crashes on start       | See [Minecraft Server Won't Start](https://www.zcraftstudios.com/blog/minecraft-server-wont-start-errors-fixes)                                       |

## Frequently asked questions

**How do I host a dedicated Minecraft server?** Install Java and Paper on a Linux VPS or dedicated machine, open port 25565, run it as a service and back it up.

**Do I need a physical dedicated server?** No. A VPS with fast CPU cores works for most servers.

**Which Linux distribution should I use?** A current Ubuntu LTS or Debian is common.

**How do I keep it running?** Use `systemd` with `Restart=on-failure`.

**Can I run several servers on one machine?** Yes, if CPU and RAM allow it.

## Related reading

- [How to Host a Minecraft Server](https://www.zcraftstudios.com/blog/how-to-host-a-minecraft-server)
- [Minecraft VPS Hosting Guide](https://www.zcraftstudios.com/blog/minecraft-vps-hosting-guide)
- [Docker for Minecraft Servers](https://www.zcraftstudios.com/blog/docker-minecraft-server-setup)

## Continue reading

- [Choosing a Minecraft Server Host: Shared, VPS, or Dedicated](https://www.zcraftstudios.com/blog/choosing-minecraft-server-host)
- [How to Host a Minecraft Server: Home, Hosting or VPS](https://www.zcraftstudios.com/blog/how-to-host-a-minecraft-server)
- [RealisticNode vs Shockbyte: Which Minecraft Host Is Better?](https://www.zcraftstudios.com/blog/realisticnode-vs-shockbyte-minecraft-hosting)
- [RealisticNode vs Apex Hosting: Which Minecraft Host to Pick](https://www.zcraftstudios.com/blog/realisticnode-vs-apex-hosting-minecraft)

[ Previous guide EternalTags Commands, Placeholders and Permissions](https://www.zcraftstudios.com/blog/eternaltags-commands-placeholders-permissions)[ Next guide Essential Minecraft Plugins: 15 Must-Have Server Plugins](https://www.zcraftstudios.com/blog/essential-minecraft-plugins-list)

<script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","@id":"https://www.zcraftstudios.com/#organization","name":"ZCraft Studios","alternateName":["ZCS","ZCraft","ZCraftStudios"],"logo":{"@type":"ImageObject","url":"https://www.zcraftstudios.com/favicon-192.png","width":192,"height":192},"image":{"@type":"ImageObject","url":"https://www.zcraftstudios.com/favicon-192.png","width":192,"height":192},"url":"https://www.zcraftstudios.com","description":"ZCraft Studios (ZCS) creates Minecraft plugins, server configs and tools. Browse resources, compatibility details and setup guides.","email":"Support@zcraftstudios.com","slogan":"Minecraft resources, configurations and custom server development.","knowsAbout":["Minecraft plugins","Minecraft server configuration","Java plugin development","Minecraft server optimization"],"sameAs":["https://dsc.gg/zcraftstudios","https://x.com/ZCraftNetwork","https://www.youtube.com/@zcraft_studios","https://www.instagram.com/ZCraftStudios"],"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"Support@zcraftstudios.com","availableLanguage":["English"],"areaServed":"Worldwide"}]}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebSite","@id":"https://www.zcraftstudios.com/#website","url":"https://www.zcraftstudios.com","name":"ZCraft Studios","alternateName":["ZCS","ZCraft"],"description":"ZCraft Studios (ZCS) creates Minecraft plugins, server configs and tools. Browse resources, compatibility details and setup guides.","inLanguage":"en","publisher":{"@type":"Organization","@id":"https://www.zcraftstudios.com/#organization","name":"ZCraft Studios","url":"https://www.zcraftstudios.com"}}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://www.zcraftstudios.com/blog/how-to-host-a-dedicated-minecraft-server#article","headline":"How to Host a Dedicated Minecraft Server on Linux","url":"https://www.zcraftstudios.com/blog/how-to-host-a-dedicated-minecraft-server","mainEntityOfPage":"https://www.zcraftstudios.com/blog/how-to-host-a-dedicated-minecraft-server","isPartOf":{"@type":"WebSite","@id":"https://www.zcraftstudios.com/#website","name":"ZCraft Studios","url":"https://www.zcraftstudios.com"},"speakable":{"@type":"SpeakableSpecification","cssSelector":["h1","main"]},"description":"Host a dedicated Minecraft server on Linux step by step: Java, a service user, firewall, systemd, backups, domain and security for a VPS or dedicated machine.","datePublished":"2026-11-05T11:44:24.630443+00:00","dateModified":"2026-11-05T11:44:24.630443+00:00","author":{"@type":"Organization","@id":"https://www.zcraftstudios.com/#organization","name":"ZCraft Studios","url":"https://www.zcraftstudios.com/about"},"publisher":{"@type":"Organization","@id":"https://www.zcraftstudios.com/#organization","name":"ZCraft Studios","url":"https://www.zcraftstudios.com","logo":{"@type":"ImageObject","url":"https://www.zcraftstudios.com/favicon-192.png","width":192,"height":192}},"inLanguage":"en","image":"https://www.zcraftstudios.com/api/og/blog/how-to-host-a-dedicated-minecraft-server?v=g7b4v3"}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.zcraftstudios.com/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https://www.zcraftstudios.com/blog"},{"@type":"ListItem","position":3,"name":"How to Host a Dedicated Minecraft Server on Linux","item":"https://www.zcraftstudios.com/blog/how-to-host-a-dedicated-minecraft-server"}]}</script>
