专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

热门搜索:openclaw🔥nginx🔥redis🔥mysqlopenjdkcursorweb2apimemgraphzabbixetcdubuntucorednsjdk
terraria

ryshe/terraria

自动构建
ryshe

提供支持原版及移动设备的Terraria服务器,集成TShock工具以实现管理功能。

140 次收藏下载次数: 0状态:自动构建维护者:ryshe仓库类型:镜像最近更新:30 天前
轩辕镜像,让镜像更快,让人生更轻。点击查看
版本下载
轩辕镜像,让镜像更快,让人生更轻。点击查看

Terraria

[UPDATE] vanilla 1.4.5.2 Server is working on Linux

Quick start guide

First you need a linux machine with Docker installed. Everything from here on out assumes the docker service is running (you may need to start the service after install).

Create directory to save your world to

Next create a directory for your world file, configuration, and logs

bash
mkdir -p $HOME/terraria/world

Creating a fresh world

For the first run you will need to generate a new world with a size where: 1=Small, 2=Medium, 3=Large

bash
sudo docker run -it -p 7777:7777 --rm -v $HOME/terraria/world:/root/.local/share/Terraria/Worlds ryshe/terraria:latest -world /root/.local/share/Terraria/Worlds/<world_name_here>.wld -autocreate <world_size_number_here>

Note: If you close the the terminal, the server will stop running. You will need to restart with a preexisting world. It may be worth while to close after creation anyway to update the initial config.json settings.

To create a world with a few more initial options, you can do so in an interactive mode.

bash
sudo docker run -it -p 7777:7777 --rm -v $HOME/terraria/world:/root/.local/share/Terraria/Worlds ryshe/terraria:latest

To start with a preexisting world

bash
sudo docker run -d --rm -p 7777:7777 -v $HOME/terraria/world:/root/.local/share/Terraria/Worlds --name="terraria" -e WORLD_FILENAME=<.wld world_filename_here> ryshe/terraria:latest

Note: This command is designed to run in the background, and it is safe to close the terminal window.

Any config.json in the directory will automatically be loaded. The <world_file_name>.wld should be the name of your wld file in your $HOME/terraria/world directory.

Updating your container

Updating is easy!

  1. Grab the latest terraria container

    bash
    docker pull ryshe/terraria:latest
    
  2. First we need to find our running container to stop, so we can later restart with the latest

    bash
    docker container ls | grep ryshe/terraria
    

    The first few numbers and letters, on a line, are the container hash. Remember the first 3 or so letters or numbers

    Example:

    bash
    f25261ac55a4        ryshe/terraria:latest   "/bin/sh bootstrap.s…"   3 minutes ago       Up 3 minutes        0.0.0.0:7777->7777/tcp, 7878/tcp   reverent_solomon
    

    f25 would be the first few letters/numbers of the container hash

    NOTE: If you see multiple lines, find the one that still has an up status.

  3. Stop and remove the container

    bash
    docker container rm -f xxx # xxx is the letters/numbers from the last step
    
  4. Start your container again with your world (see the Quick start)

[Virtual] Machine Setup

Provision a linux machine that can support docker and containerization. For more information visit docker. For a small or medium world with no more than 8 users a linux machine with 1-1.5GB of ram should suffice. If you are running a vm in the cloud, make sure to expose tcp port 7777 and udp port 7777.

Before starting the build process make sure the https://github.com/Pryaxis/TShock/releases is specified in the https://github.com/ryansheehan/terraria/blob/master/Dockerfile under

Dockerfile
ADD https://github.com/Pryaxis/TShock/releases/download/v4.4.0-pre1/TShock_4.4.0_226_Pre1_Terraria1.4.0.2.zip /

Building from source

Assuming git and docker are installed..

  1. Clone this repository

    bash
    git clone https://github.com/ryansheehan/terraria.git
    
  2. Open a terminal window into the directory downloaded by the git

  3. Build the container

    bash
    docker build -t <name_here> .
    

Running a container image

Whether you build your own container, or use https://hub.docker.com/r/ryshe/terraria published to docker hub, we are ready to run our terraria server!

Note: For a full set of docker run options go here

First run

The first run of the server will give you the opportunity to create a world, and it will generate the server's config file. You may wish to add the config file for many reasons, but one of which is to add a password to your server.

bash
docker run -it --rm -p 7777:7777 -v $HOME/terraria/world:/root/.local/share/Terraria/Worlds ryshe/terraria:latest

Let's break down this command:

Command PartDescription
docker runtells linux to run a docker image
-itrun interactively and output the text to terminal
--rmremove docker container when the container stops or fails
-p 7777:7777exposes terraria port <host machine side>:<container side>
-v $HOME/terraria/world:/root/.local/share/Terraria/Worldsmaps a folder on the host machine into the container for saving the .wld file. This does not have to be $HOME/terraria/world. Anything left of the : is host machine directory
ryshe/terrariathe name of the image. This could be your image if you build from source
:latestthe tag, which defaults to latest if not specified. latest is the most recently published container
  • The config file can be found in the directory specified by the -v volume.
  • If the terminal window is shut down, that will exit the process. Make sure to do so after the world is created!

Running with an existing generated world

After a world has been generated, you may want to load directly into it.

bash
docker run -d --rm -p 7777:7777 -v $HOME/terraria/world:/root/.local/share/Terraria/Worlds ryshe/terraria:latest -world /root/.local/share/Terraria/Worlds/<world_filename_here>.wld

Let's break down the command:

Command PartDescription
-drun this in the background. It is okay to close the terminal window, the container will continue to run
-world /root/.local/share/Terraria/Worlds/<world_filename_here>.wldspecifies the world file name you wish to immediately load into
  • for the other parts check out the First run section
  • check out additional server startup flags here. They go on after the ryshe/terraria:latest portion of the line

Plugin support

A volume exists to support plugins. Create a folder, not inside your /world folder, for your plugins

bash
mkdir ServerPlugins

Mount the plugins directory with an additional -v switch on your docker run ... command

bash
-v <path_to_your_ServerPlugins_folder>:/plugins

Logs

A separate directory can be volumed in for storing logs outside of the image

bash
-v <path_to_store_logs>:/tshock/logs

Notes

  • sudo may be required to run docker commands.

  • Please post to the https://github.com/Pryaxis/TShock/discussions team with questions on how to run a server.

  • Any additional command-line instructions can be added to the end of either method for launching a server. Docker maps the $HOME/terraria/world linux-host folder to the /tshock/world container-folder.

  • Expecting your server to run for a while? Add --log-opt max-size=200k to limit your log file size. Otherwise one day you will wake up to see all your hdd space chewed up for a terraria docker setup!

Contributing

Email me rsheehan at gmail dot com if any of these instructions do not seem to work.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

TODO

  • Fork TShock and create a Dockerfile to build the project

查看更多 terraria 相关镜像 →

beardedio/terraria logo

beardedio/terraria

beardedio
用于运行Terraria服务器的Docker镜像,提供TShock Server(服务器修改版)和Vanilla Server(原版服务器)两种版本选择。
48 次收藏100万+ 次下载
19 小时前更新
grubertech/terraria logo

grubertech/terraria

grubertech
带有Agones集成的Terraria专用服务器镜像
1万+ 次下载
2 年前更新

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

Harbor 镜像源配置

Harbor Proxy Repository 对接专属域名

Portainer 镜像源配置

Portainer Registries 加速拉取

Nexus 镜像源配置

Nexus3 Docker Proxy 内网缓存

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

使用与功能问题

配置了专属域名后,docker search 为什么会报错?

docker search 限制

Docker Hub 上有的镜像,为什么在轩辕镜像网站搜不到?

站内搜不到镜像

机器不能直连外网时,怎么用 docker save / load 迁镜像?

离线 save/load

docker pull 拉插件报错(plugin v1+json)怎么办?

插件要用 plugin install

WSL 里 Docker 拉镜像特别慢,怎么排查和优化?

WSL 拉取慢

轩辕镜像安全吗?如何用 digest 校验镜像没被篡改?

安全与 digest

第一次用轩辕镜像拉 Docker 镜像,要怎么登录和配置?

新手拉取配置

错误码与失败问题

docker pull 提示 manifest unknown 怎么办?

manifest unknown

docker pull 提示 no matching manifest 怎么办?

no matching manifest(架构)

镜像已拉取完成,却提示 invalid tar header 或 failed to register layer 怎么办?

invalid tar header(解压)

Docker pull 时 HTTPS / TLS 证书验证失败怎么办?

TLS 证书失败

Docker pull 时 DNS 解析超时或连不上仓库怎么办?

DNS 超时

Docker 拉取出现 410 Gone 怎么办?

410 Gone 排查

出现 402 或「流量用尽」提示怎么办?

402 与流量用尽

Docker 拉取提示 UNAUTHORIZED(401)怎么办?

401 认证失败

遇到 429 Too Many Requests(请求太频繁)怎么办?

429 限流

docker login 提示 Cannot autolaunch D-Bus,还算登录成功吗?

D-Bus 凭证提示

为什么会出现「单层超过 20GB」或 413,无法加速拉取?

413 与超大单层

账号 / 计费 / 权限

轩辕镜像免费版和专业版有什么区别?

免费版与专业版区别

轩辕镜像支持哪些 Docker 镜像仓库?

支持的镜像仓库

镜像拉取失败还会不会扣流量?

失败是否计费

麒麟 V10 / 统信 UOS 提示 KYSEC 权限不够怎么办?

KYSEC 拦截脚本

如何在轩辕镜像申请开具发票?

申请开票

怎么修改轩辕镜像的网站登录和仓库登录密码?

修改登录密码

如何注销轩辕镜像账户?要注意什么?

注销账户

配置与原理类

写了 registry-mirrors,为什么还是走官方或仍然报错?

mirrors 不生效

怎么用 docker tag 去掉镜像名里的轩辕域名前缀?

去掉域名前缀

如何拉取指定 CPU 架构的镜像(如 ARM64、AMD64)?

指定架构拉取

用轩辕镜像拉镜像时快时慢,常见原因有哪些?

拉取速度原因

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
ryshe/terraria
博客公告Docker 镜像公告与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单,官方技术交流群:1072982923。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单,官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.