{"id":19336714,"url":"https://github.com/samrocketman/docker-compose-lgsm-rust-dedicated-server","last_synced_at":"2025-10-26T17:37:27.916Z","repository":{"id":41745436,"uuid":"330268634","full_name":"samrocketman/docker-compose-lgsm-rust-dedicated-server","owner":"samrocketman","description":"A dockerized LGSM dedicated server for the Facepunch game: Rust.","archived":false,"fork":false,"pushed_at":"2024-10-24T02:53:31.000Z","size":72,"stargazers_count":49,"open_issues_count":3,"forks_count":20,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-02T06:11:21.275Z","etag":null,"topics":["hacktoberfest","playrust"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samrocketman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-16T22:18:05.000Z","updated_at":"2025-03-22T15:22:15.000Z","dependencies_parsed_at":"2024-10-24T06:03:30.914Z","dependency_job_id":"a2344307-e7fd-4180-b3a9-dbe7e243033f","html_url":"https://github.com/samrocketman/docker-compose-lgsm-rust-dedicated-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocketman%2Fdocker-compose-lgsm-rust-dedicated-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocketman%2Fdocker-compose-lgsm-rust-dedicated-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocketman%2Fdocker-compose-lgsm-rust-dedicated-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocketman%2Fdocker-compose-lgsm-rust-dedicated-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samrocketman","download_url":"https://codeload.github.com/samrocketman/docker-compose-lgsm-rust-dedicated-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250352183,"owners_count":21416454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","playrust"],"created_at":"2024-11-10T03:12:10.818Z","updated_at":"2025-10-26T17:37:27.808Z","avatar_url":"https://github.com/samrocketman.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dockerized LGSM Rust Dedicated Server \nThis project combines Docker, [Rust][rust] Dedicated Server, and [Linux\nGSM][lgsm] all in one!  Self-hosted Rust dedicated server management made easy.\n\n- [Play on your server](#play-on-your-server)\n- [Playing multiplayer](#playing-multiplayer)\n- [Prerequisites](#prerequisites)\n- [Getting started](#getting-started)\n- [Server power management](#server-power-management)\n  - [Starting the server](#starting-the-server)\n  - [Graceful shutdown](#graceful-shutdown)\n  - [Uninstallation](#uninstallation)\n- [Game Server Administration](#game-server-administration)\n  - [Login shell](#login-shell)\n  - [RCON: Remote Admin Console](#rcon-remote-admin-console)\n    - [RCON remote access](#rcon-remote-access)\n  - [Limiting server resources](#limiting-server-resources)\n  - [Backup and restore from backup](#backup-and-restore-from-backup)\n  - [Log management](#log-management)\n  - [Easy Anti-Cheat](#easy-anti-cheat)\n- [Server Mods](#server-mods)\n  - [Oxide mods](#oxide-mods)\n  - [Custom mods](#custom-mods)\n  - [Troubleshooting: Mods failing to load](#troubleshooting-mods-failing-to-load)\n  - [Updating mod configuration](#updating-mod-configuration)\n- [Customize Map](#customize-map)\n  - [Generated Maps](#generated-maps)\n  - [Custom Maps](#custom-maps)\n    - [Self-hosted custom maps](#self-hosted-custom-maps)\n    - [Remotely hosted custom maps](#remotely-hosted-custom-maps)\n    - [Observer Island](#observer-island)\n\n# Play on your server\n\nBy default your server is forwarding port `28015/UDP` to all interfaces so that\nyou can use router port forwarding to play multiplayer.\n\nIf you're playing on the same machine from Proton on Linux, then press F1 to\nopen console and connect with:\n\n    client.connect 127.0.0.1:28015\n\nYou may need to enter a domain name or alternate IP address if you're playing\nRust from a different computer.\n\n# Playing multiplayer\n\nEnable port forwarding on your router for the following ports.\n\n- `28015/udp` (required for game clients)\n- `8000/tcp` (optional: only required if self-hosting a custom map)\n\n# Prerequisites\n\n- 4GB of RAM if the server is remotely hosted (total memory including OS).\n  Alternately, 16GB of RAM if you're going to host a dedicated server and play\n  on the same machine.  These memory recommendations are just estimates and\n  minimum requirements for memory could be much lower.\n- You have [Git installed][git] and cloned this repository to work with locally.\n\n  ```\n  git clone https://github.com/samrocketman/docker-compose-lgsm-rust-dedicated-server\n  ```\n\n- Install [Docker on Linux][docker].  Docker on Windows or Mac would probably\n  work but is entirely untested.  Docker for Mac has known performance issues\n  unrelated to Rust.\n- Install [docker compose][compose].  This typically comes separate from Docker.\n\n# Getting started\n\nIf you don't want to customize anything, then start the server.  It will\ngenerate a 3K map using a random seed which will persist when restarting the\nserver.\n\n    docker compose up -d\n\nIt may take 15 minutes or longer for the server to start the first time\ndepending on your internet connection.  This is because it has to download Rust\namong other server setup tasks.  You can monitor the server logs at any time (to\nsee progress) with the following command.\n\n    docker compose logs -f\n\nPress `CTRL+C` to exit logs.\n\n# Server power management\n\n### Starting the server\n\n    docker compose up -d\n\nIt may take at 5 minutes or longer to start depending on your internet\nconnection.\n\nSee logs with the following command (`CTRL+C` to cancel).\n\n    docker compose logs -f\n\n### Graceful shutdown\n\n    docker compose down\n\n### Uninstallation\n\nTo completely uninstall and delete all Rust data run the following command.\n\n    docker compose down -v --rmi all\n\nRemove this Git repository for final cleanup.\n\n# Game Server Administration\n\n### Login shell\n\nIf you want a shell login to your server, then run the following command from\nthe root of this repository.\n\n```bash\n./admin/shell.sh\n\n# alternately if you need root shell access\n./admin/shell.sh root\n```\n\n### RCON: Remote Admin Console\n\nYou can access the Rust RCON interface using any RCON client.  I recommend one\nof the following clients.\n\n- https://facepunch.github.io/webrcon Facepunch official client\n- http://rcon.io/login community RCON client\n\nThe RCON interface is password protected.  Reveal the password using the\nfollowing command.\n\n    ./admin/get-rcon-pass.sh\n\nThe script will output your RCON password as well as additional instructions for\nyour web browser to access the RCON console.\n\n##### RCON remote access\n\nRust RCON connection uses `ws://` websocket protocol.  It does not support\nsecure websockets (`wss://`).  Because of this, it is not fit for secure\ninternet communication.  All of your passwords would be sent over plain text.\n\nThe recommended way to access RCON remotely from Linux is to forward the RCON\nport to your machine over SSH and connecting to the remote host over localhost\non your own machine.  The following SSH command makes RCON available on\nlocalhost.\n\n    ssh -vNL 127.0.0.1:28016:127.0.0.1:28016 user@example.com\n\nIf you still want your RCON interface to be publicy available (I don't recommend\nthis), then you can set the `RUST_RCON_INTERFACE` variable before starting the\nserver.\n\n```bash\ndocker compose down\nexport RUST_RCON_INTERFACE=0.0.0.0\ndocker compose up -d\n```\n\n### Limiting server resources\n\nIn the [`docker-compose.yml`](docker-compose.yml) file, there's two settings you\ncan adjust to limit how much CPU and memory the dedicated server is allowed.  By\ndefault, it is set to dedicated server recommended values for extremly high\npopulations:\n\n```yaml\ncpu_count: 2\nmem_limit: 8gb\n```\n\nYou can adust the resources to your liking.  Generally, I recommend to not set\nthe server below `2` CPUs and  `2gb` of memory (RAM).  These policies ensure the\nserver can't use more than these limits.\n\nYou can inspect server resource usage with the following command.\n\n    docker stats\n\nIf you see heavy resource usage and your server is performing poorly, then you\nmight need to allocate more resources.  100% CPU usage is fine but if you start\nseeing 600% usage, then that's an indicator you need to start increasing the\n`cpu_count` limit for Rust.\n\n### Backup and restore from backup\n\nThe following command is compatible with cron jobs and running from the root of\nthe repository.\n\n    ./admin/backup/create-backup.sh\n\nIf you run `create-backup.sh` from a cron job, then be sure to reference it by\nits full path.\n\nList backups,\n\n    ./admin/backup/list-backups.sh\n\nWill show you what backup files have been created along with their date and time\nof creation.  You could then restore a backup of your choice which would\ndestroy the running server in order to restore it from a backup.\n\n    ./admin/backup/restore-backup.sh ./backups/file.tgz\n\n### Log management\n\nThere's a few scripts to help you manage logs and log size on disk in the Rust\nserver.  The following script will create a backup of all LGSM and server logs.\n\n    ./admin/logs/create-backup.sh\n\nTo list known log file backups run the following command.\n\n    ./admin/logs/list-backups.sh\n\nLogs over time can take up a lot of disk storage.  To reclaim disk space and\ndeleted unused logs, run the following command.\n\n    ./admin/logs/clean.sh\n\n### Easy Anti-Cheat\n\nBy default, EAC is disabled for Linux clients.  Enable EAC with the following\nshell variable in [`rust-environment.sh`](rust-environment.sh).\n\n\n```bash\nexport ENABLE_RUST_EAC=1\n```\n\nIf EAC is enabled, Linux clients will not be able to connect and your server\nwill be listed in the in-game server browser.\n\n# Server Mods\n\n[Oxide plugins](https://umod.org/) and custom mods are supported.  I use the\nterm mods and plugins interchangeably.\n\nOxide mods are installed and updated automatically on every server start.\nHowever, if you have a custom mod that has a name conflict with an official\nOxide mod, then the custom mod will be used.\n\n### Oxide mods\n\nTo automatically install mods, create a new text file:\n[`mod-configs/plugins.txt`](mod-configs).  Add what plugins you would like\nin your rust server; one plugin per line.\n\nFor example, let's say you want the following plugins:\n\n* [Backpacks](https://umod.org/plugins/backpacks)\n* [Chest Stacks](https://umod.org/plugins/chest-stacks)\n\nThe download links for both of those plugins would be `Backpacks.cs` and\n`ChestStacks.cs`.  Your `mod-configs/plugins.txt` would need to have the\nfollowing contents.\n\n```bash\n# example mod-configs/plugins.txt\n# code comments are supported along with blank lines\nBackpacks\nChestStacks\n```\n\nWhen the server boots, the mods will be automatically downloaded from uMod.  If\nthey already exist, then updates will be checked instead.\n\nIf you edit `mod-configs/plugins.txt`, then you can reload plugins without\nrestarting the server.  Run the following command.\n\n    ./admin/get-or-update-oxide-plugins.sh\n\nIf you remove a plugin from `mod-configs/plugins.txt`, then it will be\ndeleted from your server automatically.\n\nYou can also remove mods from `mod-configs/plugins.txt` by starting the line\nwith a `#`.  This allows you to delete the plugin from the server but also keep\nit around in case you want to re-enable it later.\n\n### Custom mods\n\nIf you're writing your own custom mod, then the file name must end with `.cs`.\nFor example, `MyCustomMod.cs`.  Place any `.cs` files into the\n[`custom-mods/`](custom-mods) directory.  Next time your server\n\n\nYou can edit your mods as much as you want without affecting the mod used by the\nserver.  You can copy and update to your custom mod to the server using the\nfollowing command.\n\n    ./admin/get-or-update-oxide-plugins.sh\n\nIf you delete a custom mod from `custom-mods/` folder, then it will be removed\nfrom the server automatically.\n\n### Harmony mods\n\nAdd Harmony mods to [`harmony-mods`](harmony-mods) folder.  It will be available\nto your Rust maps such as [Observer Island][map-obs-isle].\n\n### Troubleshooting: Mods failing to load\n\nSometimes, mods will fail to load into Oxide because of differences between\nWindows and Linux.   An example is the following error message.\n\n```\nFurnaceSplitter was compiled successfully in 2345ms\nUnable to find main plugin class: FurnaceSplitter\nNo previous version to rollback plugin: FurnaceSplitter\n```\n\nTo fix this error run the following command.\n\n    ./admin/bugfix-oxide-plugins.sh\n\nThen, in the RCON console try reloading the oxide plugin.\n\n    oxide.reload FurnaceSplitter\n\n### Updating mod configuration\n\nOxide Mods automatically generate plugin config which is accessible by editing\nfiles in the [`mod-configs/`](mod-configs/) directory.  If you edit a JSON\nconfig you can open up the web management RCON console to reload the plugin (See\n[RCON: Remote Admin Console](#rcon-remote-admin-console) for how to access RCON\nconsole).\n\nUse console command:\n\n    oxide.reload plugin_name\n\nOr to reload all plugins:\n\n    oxide.reload *\n\nUse the uMod download name of the plugin.  For example, if you download from\nuMod `Backpacks.cs`, then you need only add `Backpacks` to\n`mod-configs/plugins.txt`.\n\n# Customize Map\n\nYou can have a randomly generated map with a seed or a custom map.\n\n### Generated Maps\n\n\u003e Note: Generated Map settings are completely ignored if you've configured a\n\u003e Custom Map.\n\nYou can uncomment and change the following variables in\n[`rust-environment.sh`](rust-environment.sh).\n\n- seed\n- salt\n- worldsize\n\nIf you want to wipe the map and start from another random see, then use\n[`./admin/regenerate-map.sh`](./admin/regenerate-map.sh).  You can also\nreference this script by its full path from a cron job (it will not wipe\nblueprints.\n\nWeekly map wipe (but not BP wipe) cron job:\n\n    @weekly /path/to/admin/regenerate-map.sh skip-prompt\n\n    # or specify time of cron; e.g. every sunday at 1am\n    0 1 * * 7 /path/to/admin/regenerate-map.sh skip-prompt\n\n\n### Custom Maps\n\nPlease note:\n\n\u003e _Your map file should be hosted on a public web-site that works 24/7, since\n\u003e new players of your server will download the map from that URL, not from your\n\u003e Rust server. If your URL link doesn't work then players that haven't\n\u003e downloaded the map yet won't be able to join the server._\n\u003e - [facepunch Wiki: Hosting a custom map][fp-custom-maps]\n\nThere's two ways a custom map is supported.\n\n1. Self-hosted\n2. Remotely hosted\n\n##### Self-hosted custom maps\n\nIf you're playing multi-player and self hosting your Map, then there's two extra\nconfiguration items you must toggle.\n\n- Port forward port `8000/tcp` to your router.\n- Set `MAP_BASE_URL` variable in [`rust-environment.sh`](rust-environment.sh) to\n  your public IP where clients can download the map.\n\nYour custom map file name must end with `.map`.  Download your custom map\nlocally to your computer and place it in the [`custom-maps/`](custom-maps/)\ndirectory.\n\nIf you have more than one map, then the first map alphabetically is used.  If\nyou would like to have multiple custom maps and change the map, then it is\nrecommended you prefix all maps with a 4 digit number.  For example,\n\n```\n0001_custom-map.map\n0002_custom-map.map\n0003_custom-map.map\n... etc\n```\n\nIf you wish to use a Generated Map, then all files ending with `.map` must be\nremoved from `custom-maps/` directory.  Just having the custom map file in that\ndirectory is what enables the Custom Map logic.\n\n##### Remotely hosted custom maps\n\nIf you're using a public file serving service separate from your game server\n(such as Dropbox), then set `CUSTOM_MAP_URL` variable in\n[`rust-environment.sh`](rust-environment.sh).  No extra configuration is\nrequired.\n\n##### Observer Island\n\nIf you want to play locally for yourself only, then setup is very straight\nforward.\n\n```bash\ncd custom-maps/\nunzip ~/Downloads/observer-island.zip\n\n# the map should be in the current directory\nls\n# next move the harmony mods to the appropriate location\nmv Mods/* ../harmony-mods/\n\n# clean up remaining files so that only the map remains\nrm -r changelog.txt Mods observer-island-* Prefabs/\n\n# go back to the root of this repository and start the dedicated server\ncd ..\ndocker compose up -d\n```\n\nAfter about 5 minutes you should be able to connect to `localhost:28015`.  If\nyou want to make this map available for multiplayer within your LAN or worldwide\nrefer to the previous sections for custom map hosting for remote play.\n\n# Road Map\n\n- :heavy_check_mark: Initial working vanilla server\n- :heavy_check_mark: Basic admin actions like shell login and RCON access\n- :heavy_check_mark: Support for adding server mods and automatic mod updates\n- :heavy_check_mark: Limit server resources\n- :heavy_check_mark: Support for customizing initial Map generation on first\n  time startup.\n- :heavy_check_mark: Support for custom server mods (Oxide plugins)\n- :heavy_check_mark: Support for custom Maps.\n- :heavy_check_mark: Improve documentation\n\n[compose]: https://docs.docker.com/compose/install/\n[docker]: https://docs.docker.com/engine/install/\n[fp-custom-maps]: https://wiki.facepunch.com/rust/Hosting_a_custom_map\n[git]: https://git-scm.com/\n[lgsm]: https://linuxgsm.com/\n[map-obs-isle]: https://lone.design/product/observer-island/\n[rust]: https://rust.facepunch.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrocketman%2Fdocker-compose-lgsm-rust-dedicated-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamrocketman%2Fdocker-compose-lgsm-rust-dedicated-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrocketman%2Fdocker-compose-lgsm-rust-dedicated-server/lists"}