Unturned server on linux

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Unturned dedicated server with Linux and Docker containers

License

notarobot767/unturned

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Unturned Dedicated Server

Utilizing Linux and Docker Containers

Dedicated to my best friend on Discord, Joseph

This server software was installed in a Ubuntu 22.04 Docker container. Since the server is a container, the host operating system could theoretically be any distribution of Linux that supports Docker and Docker Compose. Git was also used to clone the repository.

1. Linux host machine or VM to Install Server

We recommend Ubuntu Server without a GUI. If you prefer a desktop, we recommend Linux Mint.

2. Install Docker Engine and Docker Compose

Follow official guide. Test installation with version command for Docker and Docker Compose. Output should represent the most current version.

Docker version 24.0.2, build cb74dfc

Install git if not already installed

Clone the unturned repository to your current location

git clone https://github.com/notarobot767/unturned.git 

Change directory into the newly cloned repository folder. The default name is called unturned.

Edit the .env file, and set the path to store persistent server data. The default is the local directory, data. Optionally set the server name. This is the name the server will call the file saved to disk, not what is advertised to players. Keep it something short without spaces.

#edit these variables to match your server

I have supplied a series of scripts to help with server management.

Читайте также:  Install office arch linux

They are intended as a draft to point server admins in the right direction. Edit them to fit your needs for automation. Refer to the official documentation and learn the docker compose.

update.sh will download the initial server files as well as apply any released updates. The launch parameters are included in command field of the docker-compose.yml file and do not require modification.

The update may appear to freeze, but that is normal. This container will shutdown upon updating the server files.

The server is built with the Ubuntu Docker Image 22.04 tag. Theoretically, other 64-bit Linux images would work, but I only tested it with Ubuntu. Other than updates, I only added the ca-certificates and screen packages in the Dockerfile for the server. ca-certificates is necessary to TLS connections to communicate with Steam servers. Screen will allow us to keep the server console contained in what is called a screen to be attached or detached on a given terminal. I am unaware of any other necessary packages to run Unturned on Linux.

If not already built, run.sh will automatically build the server image. If you make any modifications to the Dockerfile, you will need to manually rebuild the image for any changes to take effect.

sudo docker compose build unturned_srv 

Finally, run the server with

Upon startup, the server will be put in a screen and attached to your terminal. Note that a break command will terminate the server. Detach the screen and keep the server running by typing the following key command:

Note: This is just a series of keys to press in order. Please don’t actually type the «+» symbol.

Normally using the docker compose logs command would be sufficient to monitor container standard output (stdout), but this console is interactive. Therefore, the stdin_open and tty flags were set true in the docker-compose.yml section for the server container. The screen utility adds the benefit to be able to pull up the server console from any SSH session. The -d flag will forcible detach a screen, and -r will then attach the open screen session on the given terminal window. The -d flag is necessary for the first time connecting upon launching the server. Subsequently including it in later sessions has no negative effects but could be ran without. Type help in the console to see the available commands.

Rather then sending a break command in an attached screen, you can alternatively stop a server running in the background with stop.sh.

✔ Container unturned-unturned_srv-1 Stopped

Restart the server using restart.sh. This will NOT attach a screen instance on the given terminal; however, feel free to modify this script to do so. This is useful as run.sh will not restart an already running server instance. This is true as long as the image was not rebuilt or parameters for unturned_srv in the docker-compose.yml were not changed, updated, or removed.

✔ Container unturned-unturned_srv-1 Started

Update and then Restart the Server

Читайте также:  Signal examples in linux

update_run_headless.sh will safely and without output, update then restart the server. This is ideally the kind of script to use for automation.

sudo ./update_run_headless.sh 

By default, UDP ports 27015 and 27016 are used. Ensure your router has a rule to forward these ports to your server when clients connect on your public IP address. If you are new to networking, read about the difference between public and private IP address and NAT. Essentially, your home network is likely a private IP address range, and your router has a single public IP address. Public addresses can talk on the internet while private addresses can’t. NAT is the mechanism that allows your private addresses to masquerade as your router’s single public IP address. Port forwarding is how we enable a public IP to initiate a connection to private IP address, in this case to your Unturned server.

Beginning in version 3.20.4.0 Unturned dedicated servers can be authenticated using a Game Server Login Token or GSLT. After version 3.21.31.0 anonymous servers (without GSLT) are hidden from the internet server list.

Follow the official guide to generate a token and apply a token to your server.

Find your commands.dat file in the data/Servers/[NAME]/Server/Commands.dat

Use a guide such as nodecraft.com to find the available options

Optional: Set the server owner with the Owner command

In the same directory as Commands.dat, list server admins by their SteamID64 one per line.

About

Unturned dedicated server with Linux and Docker containers

Источник

How To Install Unturned on Linux

In this guide, you’ll be learning how to setup and install an Unturned server on Linux. Unturned is a popular survival game, that is free to play.

The commands in this tutorial may vary slightly depending on your Linux distribution. It was originally tested against Ubuntu 16.04.

Prerequisites

Before starting and running your server, there is compulsory software needed.

Downloading server files

Download SteamCMD to the server.

wget http://media.steampowered.com/installer/steamcmd.zip 

Next, simply unzip the file you just downloaded:

Once the file has been unzipped proceed to run SteamCMD :

Now that SteamCMD is running, log into your secondary Steam account using the following code. Changing out username and password with your account details:

Your account is now logged in. It’s time to define the install directory:

force_install_dir (Your servers file directory. Ex: /home/your/unix/folder) 

Download the game to the dedicated server using the following command:

You have now successfully installed SteamCMD and Unturned server files on your Linux server.

Running the server

Logged in as root, add a user for Unturned.

adduser unt adduser unt sudo 

Now that the user is added, switch accounts.

sudo apt-get install wine xinit 

Configure the server to allow any user to start it:

sudo dpkg-reconfigure x11-common 

Now start it in headless mode.

Читайте также:  Linux wifi низкая скорость

That’s done, now move to a new shell in TMUX using:

Tell wine to use the headless mode with:

Finally, Start the Unturned server.

wine Unturned.exe -nographics (Add your command line options here) -sv 

Your Unturned server is now up and running.

Extra: Sample command line options

The Unturned command line can be customized with the options below.

Want to contribute?

You could earn up to $600 by adding new articles.

Источник

Unturned server on linux

I’m aware there are other ways of doing this. This guide still works but it is recommended to go to Nelson’s guide here [smartlydressedgames.github.io]

Step 1- Make a folder for SteamCMD, preferably on your Desktop with the name of your server

Step 2- Install SteamCMD. Here is the official website for SteamCMD. You can download it Here [developer.valvesoftware.com] .

Step 3- Move SteamCMD to your folder in Desktop, Now run and it will get steam folders setup for your Unturned Server.

Step 4- [Highly Recomended] Make a new Steam Account with Steam Guard disabled. Run unturned once, this will be an account just for updating your server.

For Windows 7 users
Make a shortcut of SteamCMD by right clicking SteamCMD and hover over «Send To» There will be a option to create a shortcut on the Desktop

For Windows 10 users
Make a shortcut of SteamCMD by right clicking SteamCMD and clicking «Create Shortcut«

So now, right click your new shortcut, and rename to your preference. I recommend «Run Update» to avoid confusion.

After that is complete, right click yet again, and click «Properties» A menu should appear.
In the target section you should see a «Target» section. Included in this section is a «Target» category. In that category, a text box should appear including

«C:\Users\Server\Desktop\SteamCMD» is what should come up in the «Target» Section
Add this command line +login username password +force_install_dir .\unturned\ +app_update 304930

C:\Users\Server\Desktop\SteamCMD\steamcmd.exe +login username password +app_update 304930 +exit «This is what it should look like after.«

Step 6- After you create that shortcut, double click the shortcut and it should install Unturned in your SteamCMD folder on your Desktop. This averages around 15-20 minutes depending on your internet.

You now have Unturned Installed through SteamCMD! See my other guides on installation of Rocket, Port-Forwarding, Plugin Installation And Configuration, and more!

Linux
Alternative scripts for alternative Linux builds can be found Here [github.com]
And Here [github.com]

Step 1- Download SteamCMD to your server by running this command

Step 4- I highly recommend making a second account for this but you can use your personal. In the SteamCMD console, run

Your account should now be logged in SteamCMD. If you use your personal account and have Steam Guard enabled, you will need to type the Steam Guard code you get from email.

Step 5-Make install directory

Источник

Оцените статью
Adblock
detector