Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Community Apps
  3. TShock — Terraria server

TShock — Terraria server

Scheduled Pinned Locked Moved Community Apps
8 Posts 3 Posters 59 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tachy
    wrote last edited by
    #1

    Hey everyone !

    I've packaged TShock for Cloudron. TShock is a Terraria server. It adds user/group management, anti-cheat, protected regions, a SQLite database, and a full REST API on top of the vanilla Terraria dedicated server.

    TShock source: https://github.com/Pryaxis/TShock
    Package: https://github.com/EliottGoye/cloudron-tshock

    Installation

    Clone and install :

    git clone https://github.com/EliottGoye/cloudron-tshock
    cd tshock-cloudron
    cloudron install -p GAME_PORT=7777
    

    How it works

    • Game port (TCP) — exposed via tcpPorts, configurable at install time. Point your Terraria client at your-cloudron-ip:GAME_PORT.
    • REST API (port 7878) — served through the standard Cloudron HTTPS proxy at your app domain. The health check uses /v2/server/status.
    • Persistent data in /app/data/:
      • tshock/ — config, SQLite database, logs, backups
      • worlds/ — world files
      • plugins/ — drop .dll plugin files here and restart to load them

    On first start a world is auto-created (large size) and a superadmin REST token is written to /app/data/rest-api-credentials.txt. Retrieve it with cloudron exec.

    First-time admin setup: check the app logs for the /setup <token> line, connect with a Terraria client, and run /setup <token> in chat.

    Notes

    • Tested with TShock 6.1 / Terraria 1.4.5.6 / Cloudron 9.2.0
    • Memory limit set to 2 GB (world generation is hungry, afterward 1 GB is fine)
    • TERRARIA_PASSWORD env var can be set to require a server password
    • The image uses ghcr.io/pryaxis/tshock with a pined version
    • I should connect Renovate to auto update the image and build a CloudronVersions.json, but I might be too lazy for that 😄

    Feedback welcome!

    1 Reply Last reply
    1
    • jamesJ Offline
      jamesJ Offline
      james
      Staff
      wrote last edited by james
      #2

      Hello @tachy
      If you want to make this a community app you will have to add / generate the CloudronVersions.json.
      See https://docs.cloudron.io/packaging/publishing.
      With that, we can also add your app to the list https://forum.cloudron.io/topic/15172/community-apps

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tachy
        wrote last edited by
        #3

        Done ! Pushed to image to GitHub registry and generated the config file.
        I had to build the image twice with cloudron build and docker build/push then I could cloudron versions add AND change the path to the image in the CloudronVersions.json to use the image in the GitHub registry.

        Have I missed something, or could it be easier to use a different Docker registry ?

        Here is the CloudronVersions.json : https://raw.githubusercontent.com/EliottGoye/cloudron-tshock/refs/heads/main/CloudronVersions.json

        1 Reply Last reply
        0
        • jamesJ james referenced this topic
        • jamesJ Offline
          jamesJ Offline
          james
          Staff
          wrote last edited by
          #4

          Hello @tachy
          Thank you.
          I have updated the list with your community app.

          1 Reply Last reply
          0
          • U Offline
            U Offline
            User123456
            wrote last edited by
            #5

            Not working on Cloudron demo

            1 Reply Last reply
            1
            • jamesJ Offline
              jamesJ Offline
              james
              Staff
              wrote last edited by
              #6

              Hello @user123456
              I think that message in the browser is actually a working message.
              If I understood this app correctly, you need to follow the first steps:

              First start:
              
              Check the logs to get the /setup code
              Connect to the Terraria server and run /setup <code>
              Your REST superadmin token is in /app/data/rest-api-credentials.txt
              

              I have no terraria server, so I can't validate that.
              Did you do this?

              U 1 Reply Last reply
              1
              • jamesJ james

                Hello @user123456
                I think that message in the browser is actually a working message.
                If I understood this app correctly, you need to follow the first steps:

                First start:
                
                Check the logs to get the /setup code
                Connect to the Terraria server and run /setup <code>
                Your REST superadmin token is in /app/data/rest-api-credentials.txt
                

                I have no terraria server, so I can't validate that.
                Did you do this?

                U Offline
                U Offline
                User123456
                wrote last edited by
                #7

                @james I just saw that the app someone has installed, I did not and did not want to try it and it did not work or I understand the principle behind it not I assumed that there is a webgui.

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tachy
                  wrote last edited by
                  #8

                  I'm the one who deployed to the demo instance to test if the image/manifest could be pulled from an instance without credentials.
                  And yes, the HTTP endpoint returns a 404 because it's a REST API.
                  You can fetch the server status even without a token :

                  curl https://terraria.demo.cloudron.io/v2/server/status
                  {
                    "status": "200",
                    "name": "",
                    "serverversion": "v1.4.5.6",
                    "tshockversion": "6.1.0.0",
                    "port": 7777,
                    "playercount": 0,
                    "maxplayers": 16,
                    "world": "World",
                    "uptime": "0.02:02:19",
                    "serverpassword": false
                  }
                  
                  1 Reply Last reply
                  0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search