Project Icon

papermc-docker

高性能Minecraft服务器快速部署方案

PaperMC Docker镜像为Minecraft服务器管理提供了高效解决方案。该镜像基于Linux,支持插件和自定义配置,通过简单的Docker命令即可快速部署服务器。用户可灵活设置端口、存储卷和重启策略等选项,还能通过环境变量控制Minecraft版本、PaperMC构建、内存分配等参数。镜像遵循官方规范,在安装时直接从源头下载服务器文件,确保合规性和最新特性。

PaperMC Docker

This is a Linux Docker image for the PaperMC Minecraft server.

PaperMC is an optimized Minecraft server with plugin support (Bukkit, Spigot, Sponge, etc.). This image provides a basic PaperMC server. All customizations are left to the user.

Usage

It is assumed that the user has already acquired a working Docker installation. If that is not the case, go do that and come back here when you're done.

Command

With this image, you can create a new PaperMC Minecraft server with one command (note that running said command indicates agreement to the Minecraft EULA). Here is an example:

sudo docker run -p 25565:25565 -e EULA="true" phyremaster/papermc

While this command will work just fine in many cases, it is only the bare minimum required to start a functional server and can be vastly improved by specifying some...

Options

There are several command line options that users may want to specify when utilizing this image. These options are listed below with some brief explanation. An example will be provided with each. In the example, the part that the user can change will be surrounded by angle brackets (< >). Remember to remove the angle brackets before running the command.

  • Port
    • This option must be specified. Use port 25565 if you don't know what this is.
    • Set this to the port number that the server will be accessed from.
    • If RCON is to be used, this option must be specified a second time for port 25575.
    • -p <12345>:25565
    • -p <12345>:25565 -p <6789>:25575
  • Volume
    • Set this to a name for the server's Docker volume (defaults to randomized gibberish).
    • Alternatively, set this to a path to a folder on your computer.
    • -v <my_volume_name>:/papermc
    • -v </path/to/files>:/papermc
  • Detached
    • Include this to make the container independent from the current command line.
    • -d
  • Terminal/Console
    • Include these flags if you want access to the server's command line via docker attach.
    • These flags can be specified separately or as one option.
    • -t and -i in any order
    • -ti or -it
  • Restart Policy
    • If you include this, the server will automatically restart if it crashes.
    • Stopping the server from its console will still stop the container.
    • It is highly recommended to only stop the server from its console (not via Docker).
    • --restart on-failure
  • Name
    • Set this to a name for the container (defaults to a couple of random words).
    • --name "<my-container-name>"

There is one more command line option, but it is a bit special and deserves its own section.

Environment Variables

Environment variables are options that are specified in the format -e <NAME>="<VALUE>" where <NAME> is the name of the environment variable and <VALUE> is the value that the environment variable is being set to. Please note that setting an evironment variable with no value does not leave it at default; instead, this sets it to an empty string, which may cause issues. This image has four environment variables:

  • Minecraft Version
    • Name: MC_VERSION
    • Set this to the Minecraft version that the server should support.
    • Note: there must be a PaperMC release for the specified version of Minecraft.
    • If this is not set, the latest version supported by PaperMC will be used.
    • Changing this on an existing server will change the version without wiping the server.
    • -e MC_VERSION="<latest>"
  • PaperMC Build
    • Name: PAPER_BUILD
    • Set this to the number of the PaperMC build that the server should use (not the Minecraft version).
    • If this is not set, the latest PaperMC build for the specified MC_VERSION will be used.
    • Changing this on an existing server will change the version without wiping the server.
    • -e PAPER_BUILD="<latest>"
  • EULA
    • Name: EULA
    • Set this to true to accept the Minecraft server EULA
    • The server will not start if this is not set to true
    • -e EULA="true"
  • RAM
    • Name: MC_RAM
    • Set this to the amount of RAM the server can use.
    • Must be formatted as a number followed by M for "Megabytes" or G for "Gigabytes".
    • If this is not set, Java allocates its own RAM based on total system/container RAM.
    • -e MC_RAM="<4G>"
  • Java options
    • Name: JAVA_OPTS
    • ADVANCED USERS ONLY
    • Set to any additional Java command line options that you would like to include.
    • By default, this environment variable is set to the empty string.
    • -e JAVA_OPTS="<-XX:+UseConcMarkSweepGC -XX:+UseParNewGC>"

Further Setup

From this point, the server should be configured in the same way as any other Minecraft server. The server's files, including server.properties, can be found in the volume that was specified earlier. The port that was specified earlier will probably need to be forwarded as well. For details on how to do this and other such configuration, Google it, because it works the same as any other Minecraft server.

Technical

This project does NOT redistribute the Minecraft server files. Instead, the (very small) script that is inside of the image, papermc.sh, downloads these files from their official sources during installation.

PLEASE NOTE: This is an unofficial project. I did not create PaperMC. This is the official PaperMC website.

Project Pages

项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号