This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
esxi:terraria_server [2020/05/20 15:50] derek created |
esxi:terraria_server [2024/09/22 19:51] (current) |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====Setup==== | ====Setup==== | ||
| - | First, install a base installation of Photon OS, with an appropriate hostname: | + | First, install a base installation of Photon OS with the following changes: |
| - | {{page> | + | * Hostname: '' |
| + | * CPU: | ||
| + | * CPU: 2 | ||
| + | * Cores per Socket: 2 | ||
| + | * Memory: 2GB | ||
| + | |||
| + | {{page> | ||
| ===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" >> / | + | 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/" / |
| - | echo "-A INPUT -p udp -m udp --dport 7777 -j ACCEPT" | + | reboot |
| 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:// | ||
| cd /tmp | cd /tmp | ||
| - | curl --output terraria-server-1402.zip https:// | + | curl --output terraria-server.zip https:// |
| - | unzip terraria-server-1402.zip | + | unzip terraria-server.zip |
| - | rm terraria-server-1402.zip | + | mv 1402/Linux / |
| - | mv 1402/Linux /terraria | + | |
| + | # Remove temp files | ||
| + | rm terraria-server.zip | ||
| rm -r 1402 | rm -r 1402 | ||
| - | cd /terraria | + | # Allow the server to be executed and set the config |
| - | chmod u+x TerrariaServer.bin.x86_64 | + | chmod u+x / |
| - | 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 39: | Line 48: | ||
| ## | ## | ||
| <esc> :wq | <esc> :wq | ||
| - | </ | ||
| - | Run the following to start the server: | + | # Start the server |
| - | < | + | tmux new -s terraria "/ |
| - | tmux new -s terraria "/ | + | |
| </ | </ | ||
| * Either use ''< | * Either use ''< | ||
| * Either re-attach to the session with '' | * Either re-attach to the session with '' | ||
| + | * Edit the VM note and append the following: | ||
| + | < | ||
| + | 7777/both Terraria (Port Forwarded) | ||
| + | Run with: | ||
| + | tmux new -d -s terraria "/ | ||
| + | |||
| + | Stop with: | ||
| + | tmux send-keys -t terraria " | ||
| + | |||
| + | Attach tmux client: | ||
| + | tmux a -t terraria | ||
| + | Detach tmux client: | ||
| + | < | ||
| + | </ | ||
| ====Update==== | ====Update==== | ||
| - | {{page> | + | {{page> |
| - | * FIXME: update Terraria? | + | * Check the PC Dedicated Server link at the bottom of https:// |
| - | * Include in update | + | |
| + | <code bash> | ||
| + | # Download | ||
| + | cd /tmp | ||
| + | curl --output terraria-server.zip https:// | ||
| + | unzip terraria-server.zip | ||
| + | |||
| + | # Stop the server | ||
| + | tmux send-keys -t terraria " | ||
| + | |||
| + | # Replace server files FIXME | ||
| + | rm -r / | ||
| + | mv 1402/Linux / | ||
| + | chmod u+x / | ||
| + | |||
| + | # Remove temp files | ||
| + | rm terraria-server.zip | ||
| + | rm -r 1402 | ||
| + | |||
| + | # Start the server | ||
| + | tmux new -d -s terraria "/ | ||
| + | |||
| + | exit | ||
| + | </ | ||