User Tools

Site Tools


esxi:terraria_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
esxi:terraria_server [2020/05/20 15:57]
derek
esxi:terraria_server [2024/09/22 19:51] (current)
Line 3: Line 3:
  
 ====Setup==== ====Setup====
-First, install a base installation of Photon OSwith an appropriate hostname+First, install a base installation of Photon OS with the following changes: 
-{{page>esxi:photon_os#Setup}}+  * Hostname: ''Photon-Terraria'' 
 +  * CPU: 
 +    * CPU: 2 
 +    * Cores per Socket: 2 
 +  * Memory: 2GB 
 + 
 +{{page>esxi:photon_os#Setup&noheader}}
  
 ===Install Terraria Server:=== ===Install Terraria Server:===
Line 13: Line 19:
 <code bash> <code bash>
 # Allow port 7777 through iptables # Allow port 7777 through iptables
-echo "-A INPUT -p tcp -m tcp --dport 7777 -j ACCEPT" >> /etc/systemd/scripts/ip4save +sed -i "s/COMMIT/-A INPUT -p tcp -m tcp --dport 7777 -j ACCEPT\n-A INPUT -p udp -m udp --dport 7777 -j ACCEPT\nCOMMIT/" /etc/systemd/scripts/ip4save 
-echo "-A INPUT -p udp -m udp --dport 7777 -j ACCEPT" >> /etc/systemd/scripts/ip4save+reboot  # And then reconnect the SSH client
  
 tdnf install unzip tmux less tdnf install unzip tmux less
  
-# Download and place the server in /terraria (Check the PC Dedicated Server link at the bottom of https://terraria.org for the latest server file and change all the 1402 references to the correct version)+# Download and place the server in /terraria (Check the PC Dedicated Server link at the bottom of https://terraria.org for the latest server file and change all the "1402references to the correct version)
 cd /tmp cd /tmp
-curl --output terraria-server-1402.zip https://terraria.org/system/dedicated_servers/archives/000/000/036/original/terraria-server-1402.zip?1589675482 +curl --output terraria-server.zip https://terraria.org/system/dedicated_servers/archives/000/000/036/original/terraria-server-1402.zip?1589675482 
-unzip terraria-server-1402.zip +unzip terraria-server.zip 
-mv 1402/Linux /terraria+mv 1402/Linux /terraria/server
  
 # Remove temp files # Remove temp files
-rm terraria-server-1402.zip+rm terraria-server.zip
 rm -r 1402 rm -r 1402
  
 # Allow the server to be executed and set the config # Allow the server to be executed and set the config
-cd /terraria +chmod u+x /terraria/server/TerrariaServer*
-chmod u+x TerrariaServer*+
  
-vim serverconfig.txt+vim /terraria/serverconfig.txt
 # Press i, then paste the following into the window (replacing the password): # Press i, then paste the following into the window (replacing the password):
 autocreate=2 autocreate=2
Line 43: Line 48:
 ## ##
 <esc> :wq <esc> :wq
-</code> 
  
-Run the following to start the server+# Start the server 
-<code> +tmux new -s terraria "/terraria/server/TerrariaServer.bin.x86_64 -config /terraria/serverconfig.txt" \; pipe-pane -o -t terraria "cat >>/terraria/server.log"
-tmux new -s terraria "/terraria/TerrariaServer.bin.x86_64 -config /terraria/serverconfig.txt" \; pipe-pane -o -t terraria "cat >>/terraria/server.log"+
 </code> </code>
  
   * Either use ''<Ctrl+b> d'' to detach the tmux client, or use the ''-d'' flag in the tmux command to start it disconnected.   * Either use ''<Ctrl+b> d'' to detach the tmux client, or use the ''-d'' flag in the tmux command to start it disconnected.
   * Either re-attach to the session with ''tmux a -t terraria'', and type ''exit'', or run ''tmux send-keys -t terraria "exit" Enter'' to shutdown the server.   * Either re-attach to the session with ''tmux a -t terraria'', and type ''exit'', or run ''tmux send-keys -t terraria "exit" Enter'' to shutdown the server.
 +  * Edit the VM note and append the following:
 +<code>
 +7777/both Terraria (Port Forwarded)
  
 +Run with:
 +tmux new -d -s terraria "/terraria/server/TerrariaServer.bin.x86_64 -config /terraria/serverconfig.txt" \; pipe-pane -o -t terraria "cat >>/terraria/server.log"
 +
 +Stop with:
 +tmux send-keys -t terraria "exit" Enter
 +
 +Attach tmux client:
 +tmux a -t terraria
 +Detach tmux client:
 +<Ctrl+b> d
 +</code>
  
 ====Update==== ====Update====
-{{page>esxi:photon_os#Update}}+{{page>esxi:photon_os#Update&noheader}}
  
-  * FIXMEupdate Terraria? +  * Check the PC Dedicated Server link at the bottom of https://terraria.org for the latest server file and change all the 1402 references to the correct version and link 
-  * Include in update all page using ''%%{{page>esxi:terraria_server#Update}}%%''+ 
 +<code bash> 
 +# Download 
 +cd /tmp 
 +curl --output terraria-server.zip https://terraria.org/system/dedicated_servers/archives/000/000/036/original/terraria-server-1402.zip?1589675482 
 +unzip terraria-server.zip 
 + 
 +Stop the server 
 +tmux send-keys -t terraria "exit" Enter 
 + 
 +# Replace server files FIXME 
 +rm -r /terraria/server 
 +mv 1402/Linux /terraria/server 
 +chmod u+x /terraria/server/TerrariaServer* 
 + 
 +# Remove temp files 
 +rm terraria-server.zip 
 +rm -r 1402 
 + 
 +# Start the server 
 +tmux new -d -s terraria "/terraria/server/TerrariaServer.bin.x86_64 -config /terraria/serverconfig.txt" \; pipe-pane -o -t terraria "cat >>/terraria/server.log" 
 + 
 +exit 
 +</code>
esxi/terraria_server.1589990232.txt.gz · Last modified: 2024/09/22 19:51 (external edit)