This shows you the differences between two versions of the page.
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 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:// | + | # 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 |
- | 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 / |
- | 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 | ||
- | </ | ||
- | 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 | ||
+ | </ |