{"id":13735644,"url":"https://github.com/pseiler/puppet-lanserver","last_synced_at":"2025-05-08T12:30:54.788Z","repository":{"id":89476732,"uuid":"171012723","full_name":"pseiler/puppet-lanserver","owner":"pseiler","description":"Puppet module to fully deploy all neccesarry services to run a LAN party at any size with ease","archived":false,"fork":false,"pushed_at":"2023-11-02T13:27:29.000Z","size":66420,"stargazers_count":41,"open_issues_count":0,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-06T00:26:12.406Z","etag":null,"topics":["automation","bash-script","dnsmasq","hosting","httpd","inotifywatch","lan","lanparty","lanserver","ngircd","opentracker","party","puppet","server","torrent","transmission-daemon"],"latest_commit_sha":null,"homepage":null,"language":"Puppet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pseiler.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}},"created_at":"2019-02-16T14:29:35.000Z","updated_at":"2024-05-27T14:27:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"482a1000-09b4-4ed1-8ea8-0eef0c12414c","html_url":"https://github.com/pseiler/puppet-lanserver","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseiler%2Fpuppet-lanserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseiler%2Fpuppet-lanserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseiler%2Fpuppet-lanserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseiler%2Fpuppet-lanserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pseiler","download_url":"https://codeload.github.com/pseiler/puppet-lanserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253068357,"owners_count":21848796,"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":["automation","bash-script","dnsmasq","hosting","httpd","inotifywatch","lan","lanparty","lanserver","ngircd","opentracker","party","puppet","server","torrent","transmission-daemon"],"created_at":"2024-08-03T03:01:09.257Z","updated_at":"2025-05-08T12:30:51.495Z","avatar_url":"https://github.com/pseiler.png","language":"Puppet","funding_links":[],"categories":["Software"],"sub_categories":["Server Management"],"readme":"# puppet-lanserver\nPuppet module to fully deploy all neccesarry services to run a LAN party at any size with ease\n\nThe following components are included\n* DHCP - [Dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html)\n* DNS - [Dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html)\n* FTP Server for easy user uploads - [vsftpd](https://security.appspot.com/vsftpd.html)\n* BitTorrent tracker - [opentracker](http://erdgeist.org/arts/software/opentracker/)\n* Torrent Client - [transmission](http://transmissionbt.com/)\n* Webserver - [Apache httpd](https://httpd.apache.org/)\n* IRC Server [ngircd](https://ngircd.barton.de/index.php.en)\n* IRC Webgui [kiwiirc](https://kiwiirc.com/)\n* [inotify-tools](https://mirrors.edge.kernel.org/pub/linux/kernel/people/rml/inotify/README)\n* self-written bash scripts\n    * monitor the upload directory of the FTP Server and create a torrent from it (inotify2announce)\n    * creating a torrent including information on the LAN website (``add_game.sh``)\n    * cleanup old torrents and whitelist only available torrents from the website\n\n## Features\n* Automatically deploy an environment for a LAN party. Provide all neccesary network services and client tools via http\n* Share prepared games via torrent. Use a easy-to-use script ``add_game.sh``to create an entry in your webservers */games.html* and add a local file or **directory**.\n* Users can upload an archive via FTP and the server creates a **torrent** file for it and shares the content with with it's own client.\n* Create your own Games list with a simple bash script *add\\_game.sh*. It automatically generates an entry in your webservers */games.html*.\n  The template directory for every game is located in */var/www/template*.\n\n## Requirements\n* **CentOS** \u003e= 7, Other distributions will be supported in the future.\n* **Puppet** \u003e= 4, The install script for CentOS/RHEL will include puppet 5.\n* an internet connection (to install the packages from the bash script).\n* Enough disk space for the torrent contents. Depends on how much you want\n  to serve.\n\nEverything data-related is located somewhere in ***/var*** by default. So it's recommended that you add an additional partition mounted on ***/var***.\n\n### Caution\nPlease don't start the dnsmasq server in a network, which already has a DHCP server. Things could go wrong.\nAnd the hole torrent tracker part doesn't working without DNS.\n\n## Setting the language\nThe lanserver website is currently available in two languages.\nTo switch it edit the *lanserver/manifests/params.pp* **lang** parameter and reapply the module to the server.\n### translate the website\nIf you want to translate the website, copy the *en* directory in *lanserver/files/webroot/* and translate the whole content of *index.html*, *torrent.html* and *tech.html*.\nYou also need to add language vars to *lanserver/manifests/webroot.pp* for your specific language code. Two letters are allowed.\n\n## Enable or disable specific services\nEvery service mentioned above can be managed independently. Enable or disable the services via *lanserver/manifests/params,pp*\n\n## Usage / Installation\n1. Download the code to your server. For example with git.``git clone --recursive https://github.com/pseiler/puppet-lanserver``\n1. Change into the puppet module directory ``cd lanserver/manifests``\n1. Edit the **lanserver/manifests/params.pp** to the values you like. This includes the admin account name and password, the server configuration, the device you want to configure your listening services, ...\u003c/br\u003eDon't forget to set the right interface found from ``ip addr show``.\n1. Change back into the puppet-lanserver directory. Run ``bash install_server.sh`` as root.\n    * This script adds every requirement and installs every server component enabled by a a simple puppet **lanserver/manifests/params.pp** parameter.\n    * If the script runs successfully every service should be running except *dnsmasq*.\n1. Reboot your system when the script successfully deployed the puppet module. Caution! The DHCP Server starts after the next reboot.\n\n## Verifying everything is running\nThis lanserver features serveral type of services.\nTo have an easy overview if everything is running,\nrun ``lanserver status`` on the command line\nTo stop/start everything use\n``lanserver start``\nor\n``lanserver stop``\n\n## Controlling services\nEvery service running is controlled by systemd.\nCheck the specific service or use the controller script\n\"lanserver\" to start or stop all lanserver services.\n\n## Add Games to games.html\nTo add a new game, or just add a new plattform for a game, just run ``game_add.sh``. You can find every parameter of the script when calling it with the **-h** parameter.\nEvery parameter except **-f** is optional and will be asked interactively. The file or directory must already exist somewhere on this server. So you need to transfer the game/application file or directory manually via scp or something else.\n\nThe snippet files you generated with this script are located in */var/www/template* by default. It's a bit ugly but perhaps this part will be rewritten with a database-like backend.\nIf needed, you can modify the \\*.html snippets with the editor of your choice.\nIf you have changed something manually in in a html snippet in */var/www/template* just run ``games_reindex.sh`` to create a new *games.html* in the webservers directory.\n\n\n## Forwarding Internet from another device\nIf your device has two interfaces, you can use a bash script called ``nat_control.sh`` to enable NAT forwarding/masquerading to the LAN network.\nIt only has two options (enable/disable) and when calling it with ***enable*** you must provide the device which has internet access. It depends on your configuration of interfaces.\n\nExample:\n```bash\nroot# nat_control.sh enable eth1\n```\n\n## Contributing\nIf you want to add a component to the puppet module, just create a new \u003ccomponent\u003e.pp to the ``lanserver/manifests/`` directory and write some puppet code. If you want to add support for more distributions, modify the ``install_server.sh`` file and add a function which checks requirements as repositories for packages, etc. Don't forget to check the module code for distribution-specific paths and add a conditional statement for it.\n\n## ToDos\n* interactive bash script to create a hiera template which overwrites parameters from params.pp\n* add mumble server\n* add etherpad support\n* add kiwiirc to autostart via systemd\n* rewrite ``add_game.sh`` to use a markup language like *.xml* or use a little database backend like sqlite\n* add a list/searching feature to ``add_game.sh``. Output html snipet when found.\n* let the \"lanserver\" script enable NAT and disable it again, when it's running\n* Make code more portable to support more distributions like Debian, Ubuntu and openSUSE\n* Support other solutions for the admin to upload a game to the server except ssh/scp. Something like uploading a file/directory via non-anonymous ftp user.\n* search for a better solution to translate titles of the website in webroot.pp. Consider a own class containting the language variables or something.\n* Add information about bridging from a vm\n* add spec tests to test all kinds of stuff\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseiler%2Fpuppet-lanserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpseiler%2Fpuppet-lanserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseiler%2Fpuppet-lanserver/lists"}