GithubHelp home page GithubHelp logo

sadsfae / rust-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from didstopia/rust-server

0.0 1.0 0.0 90 KB

Provides a dedicated linux server for Rust (the game) running inside a Docker container.

License: MIT License

Dockerfile 11.70% Shell 54.69% JavaScript 33.62%

rust-server's Introduction

Rust server that runs inside a Docker container

Show your support for this project by signing up for a free Bitrise account!


DISCLAIMER:

Cracked or pirated versions of Rust are not supported in any way, shape or form. Please do not post issues regarding these.

Install on DigitalOcean

TUTORIAL: We've written a guide on how to use this image here.

NOTE: This image will install/update on startup. The path /steamcmd/rust can be mounted on the host for data persistence.
Also note that this image provides the new web-based RCON, so you should set RUST_RCON_PASSWORD to a more secure password. This image also supports having a modded server (using Oxide), check the RUST_OXIDE_ENABLED variable below.

How to run the server

  1. Set the environment variables you wish to modify from below (note the RCON password!)
  2. Optionally mount /steamcmd/rust somewhere on the host or inside another container to keep your data safe
  3. Enjoy!

The following environment variables are available:

RUST_SERVER_STARTUP_ARGUMENTS (DEFAULT: "-batchmode -load +server.secure 1")
RUST_SERVER_IDENTITY (DEFAULT: "docker" - Mainly used for the name of the save directory)
RUST_SERVER_SEED (DEFAULT: "12345" - The server map seed, must be an integer)
RUST_SERVER_WORLDSIZE (DEFAULT: "4000" - The map size, must be an integer)
RUST_SERVER_NAME (DEFAULT: "Rust Server [DOCKER]" - The publicly visible server name)
RUST_SERVER_MAXPLAYERS (DEFAULT: "500" - Maximum players on the server, must be an integer)
RUST_SERVER_DESCRIPTION (DEFAULT: "This is a Rust server running inside a Docker container!" - The publicly visible server description)
RUST_SERVER_URL (DEFAULT: "https://hub.docker.com/r/didstopia/rust-server/" - The publicly visible server website)
RUST_SERVER_BANNER_URL (DEFAULT: "" - The publicly visible server banner image URL)
RUST_SERVER_SAVE_INTERVAL (DEFAULT: "600" - Amount of seconds between automatic saves.)
RUST_RCON_WEB (DEFAULT "1" - Set to 1 or 0 to enable or disable the web-based RCON server)
RUST_RCON_PORT (DEFAULT: "28016" - RCON server port)
RUST_RCON_PASSWORD (DEFAULT: "docker" - RCON server password, please change this!)
RUST_BRANCH (DEFAULT: Not set - Sets the branch argument to use, eg. set to "-beta prerelease" for the prerelease branch)
RUST_UPDATE_CHECKING (DEFAULT: "0" - Set to 1 to enable fully automatic update checking, notifying players and restarting to install updates)
RUST_UPDATE_BRANCH (DEFAULT: "public" - Set to match the branch that you want to use for updating, ie. "prerelease" or "public", but do not specify arguments like "-beta")
RUST_START_MODE (DEFAULT: "0" - Determines if the server should update and then start (0), only update (1) or only start (2))
RUST_OXIDE_ENABLED (DEFAULT: "0" - Set to 1 to automatically install the latest version of Oxide)
RUST_OXIDE_UPDATE_ON_BOOT (DEFAULT: "1" - Set to 0 to disable automatic update of Oxide on boot)

Logging and rotating logs

The image now supports log rotation, and all you need to do to enable it is to remove any -logfile arguments from your startup arguments. Log files will be created under logs/ with the server identity and the current date and time. When the server starts up or restarts, it will move old logs to logs/archive/.

How to send or receive command to/from the server

We recently added a small application, called rcon, that can both send and receive messages to the server, much like the console on the Windows version, but this happens to use RCON (webrcon). To use it, simply run the following on the host: docker exec rust-server rcon say Hello World, substituting rust-server for your own container name.

Anything else

If you need help, have questions or bug submissions, feel free to contact me @Dids on Twitter, and on the Rust Server Owners Slack community.

rust-server's People

Contributors

dids avatar brantje avatar moochannel avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.