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

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

官方QQ群: 1072982923

ryshe/terraria Docker 镜像 - 轩辕镜像 | Docker 镜像高效稳定拉取服务

terraria
ryshe/terraria
自动构建
ryshe
提供支持原版及移动设备的Terraria服务器,集成TShock工具以实现管理功能。
137 次收藏下载次数: 0状态:自动构建维护者:ryshe仓库类型:镜像
🔒 更安全的专业镜像服务
版本下载
🔒 更安全的专业镜像服务

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 latest tshock version is specified in the Dockerfile under

Dockerfile
ADD [***] /

Building from source

Assuming git and docker are installed..

  1. Clone this repository

    bash
    git clone [***]
    
  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 my container 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 TShock 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(原版服务器)两种版本选择。
47 次收藏100万+ 次下载
11 天前更新
grubertech/terraria logo
grubertech/terraria
grubertech
带有Agones集成的Terraria专用服务器镜像
1万+ 次下载
1 年前更新

轩辕镜像配置手册

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

Docker 配置

登录仓库拉取

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

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

系统配置

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 Hub 查询

docker search 报错问题

网页搜不到镜像:Docker Hub 有但轩辕镜像搜索无结果

镜像搜索不到

离线传输镜像:无法直连时用 docker save/load 迁移

离线传输镜像

Docker 插件安装错误:application/vnd.docker.plugin.v1+json

Docker 插件安装错误

WSL 下 Docker 拉取慢:网络与挂载目录影响及优化

WSL 拉取镜像慢

轩辕镜像是否安全?镜像完整性校验(digest)说明

镜像安全性

如何用轩辕镜像拉取镜像?登录方式与专属域名配置

如何拉取镜像

错误码与失败问题

manifest unknown 错误:镜像不存在或标签错误

manifest unknown 错误

TLS/SSL 证书验证失败:Docker pull 时 HTTPS 证书错误

TLS 证书验证失败

DNS 解析超时:无法解析镜像仓库地址或连接超时

DNS 解析超时

410 Gone 错误:Docker 版本过低导致协议不兼容

410 错误:版本过低

402 Payment Required 错误:流量耗尽错误提示

402 错误:流量耗尽

401 UNAUTHORIZED 错误:身份认证失败或登录信息错误

身份认证失败错误

429 Too Many Requests 错误:请求频率超出专业版限制

429 限流错误

Docker login 凭证保存错误:Cannot autolaunch D-Bus(不影响登录)

凭证保存错误

账号 / 计费 / 权限

免费版与专业版区别:功能、限额与使用场景对比

免费版与专业版区别

支持的镜像仓库:Docker Hub、GCR、GHCR、K8s 等列表

轩辕镜像支持的镜像仓库

拉取失败是否扣流量?计费规则说明

拉取失败流量计费

KYSEC 权限不够:麒麟 V10/统信 UOS 下脚本执行被拦截

KYSEC 权限错误

如何申请开具发票?(增值税普票/专票)

开具发票

如何修改网站与仓库登录密码?

修改网站和仓库密码

配置与原理类

registry-mirrors 未生效:仍访问官方仓库或报错的原因

registry-mirrors 未生效

如何去掉镜像名称中的轩辕域名前缀?(docker tag)

去掉域名前缀

如何拉取指定架构镜像?(ARM64/AMD64 等多架构)

拉取指定架构镜像

查看全部问题→

用户好评

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

用户头像

oldzhang

运维工程师

Linux服务器

5

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

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