Last active
January 21, 2026 18:52
-
-
Save djagya/06fb11378bc778cecb3e005b291a0b89 to your computer and use it in GitHub Desktop.
Terraria server in screen systemd service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/systemd/system/terraria.service | |
| [Unit] | |
| Description=Server daemon for Terraria with base directory /opt/terraria | |
| After=network.target | |
| [Service] | |
| WorkingDirectory=/opt/terraria | |
| User=terraria | |
| Restart=always | |
| Type=forking | |
| KillMode=none | |
| ExecStart=/usr/bin/screen -dmS terraria /opt/terraria/server/TerrariaServer.bin.x86_64 -config /opt/terraria/serverconfig.txt | |
| ExecStop=/usr/bin/screen -S terraria -X eval 'exit' | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks you!