diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8702a9b..be556cb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,16 +6,19 @@ on: - main workflow_dispatch: +permissions: + contents: write + jobs: deploy: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 with: - mdbook-version: '0.4.4' + mdbook-version: '0.4.10' - run: mdbook build @@ -25,3 +28,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./book force_orphan: true + cname: brickadia.vamist.dev diff --git a/README.md b/README.md new file mode 100644 index 0000000..61d2287 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Setup Guide +This repo uses [mdBook](https://rust-lang.github.io/mdBook/). Reading the official book is recommended, but as long as you understand how markdown works, you are good to go. + +## Quick Install +If you have [Cargo](https://www.rust-lang.org/tools/install) installed: +`cargo install mdbook` + +Otherwise you can download an executable from the [GitHub Release page](https://github.com/rust-lang/mdBook/releases). diff --git a/book.toml b/book.toml index 3a16a01..3f41eff 100644 --- a/book.toml +++ b/book.toml @@ -4,3 +4,7 @@ language = "en" multilingual = false src = "src" title = "Brickadia Manual" + +[output.html.playground] +editable = true +runnable = false diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 751e887..21b7a01 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -1,9 +1,12 @@ # Summary +[Brickadia](./brickadia.md) -- [Brickadia](./brickadia.md) +# Installation - [System Requirements]() -- [Installation](./installation.md) +- [Client Installation](./installation.md) + - [Proton](./installation_proton.md) +# Features - [Tools](chapter_1.md) - [Placer](tools/placer.md) - [Painter](tools/painter.md) @@ -25,15 +28,20 @@ - [Audio](components/audio.md) - [Item Spawn](components/item_spawn.md) -- [Minigames]() +- [Minigames](chapter_4.md) - [Deathmatch]() - [Bricktionary]() - [Sandbox]() -- [Hosting Servers]() +# Advanced Features +- [Hosting Servers](chapter_5.md) + - [Client Hosting](servers/setup_client.md) + - [Dedicated Server](servers/setup_dedicated.md) + - [Linux Setup](servers/setup_linux.md) + - [Windows Setup]() - [Port Forwarding]() - - [Dedicated Servers]() - [Roles & Permissions]() - [Moderation Tools]() +# Misc - [Users](./users.md) diff --git a/src/chapter_4.md b/src/chapter_4.md new file mode 100644 index 0000000..16f56f6 --- /dev/null +++ b/src/chapter_4.md @@ -0,0 +1,5 @@ +# Chapter 4: Minigames + +1. [Deathmatch]() - Deathmatch +2. [Bricktionary]() - Bricktionary +3. [Sandbox]() - Sandbox diff --git a/src/chapter_5.md b/src/chapter_5.md new file mode 100644 index 0000000..1ea0b2e --- /dev/null +++ b/src/chapter_5.md @@ -0,0 +1,6 @@ +# Chapter 5: Hosting Servers +In Brickadia, servers allow you to connect with other players. If you are interested in hosting a server for other players, read on! + +The two types of servers you will see: +1. [Client Hosting](servers/setup_client.md) - Hosted through the in game client, often hosted in short bursts on a home machine. +2. [Dedicated Server](servers/setup_dedicated.md) - Hosted through a command-line interface, often on another machine that is up for longer periods of time. diff --git a/src/installation.md b/src/installation.md index f0a92d8..11ea01e 100644 --- a/src/installation.md +++ b/src/installation.md @@ -1,4 +1,4 @@ -# Installation +# Client Installation Brickadia has a launcher that will update the game for you, so you'll only need to install it once. @@ -33,10 +33,6 @@ On most distributions, you should be able to open it to install it. If not, run sudo apt install ~/Downloads/brickadia-launcher.deb ``` -### Arch Linux - -Install [`brickadia-launcher`](https://aur.archlinux.org/packages/brickadia-launcher/) from the [AUR](https://wiki.archlinux.org/title/AUR). - ### Other An official package is not available for any other distributions yet, but you can download an archive of the launcher that should work on most Linux distributions, provided that you find the dependencies. diff --git a/src/servers/setup_client.md b/src/servers/setup_client.md new file mode 100644 index 0000000..5284d4e --- /dev/null +++ b/src/servers/setup_client.md @@ -0,0 +1,2 @@ +# Client Hosting Setup + diff --git a/src/servers/setup_dedicated.md b/src/servers/setup_dedicated.md new file mode 100644 index 0000000..b001641 --- /dev/null +++ b/src/servers/setup_dedicated.md @@ -0,0 +1,18 @@ +# Dedicated Server +Brickadia allows you to host a server on a dedicated machine. You may want to do this if: +- You have a VPS/bare metal server spare +- You want to avoid hosting a server on your own machine or home network +- You want to offload the server processing required onto another machine + +## Requirements +Before you start this guide, you will need the following: +1. A machine that is running `Windows` or `Linux` + - For the best reliability, we recommend getting a VPS or a bare metal machine from a server rental company. If you are home hosting off an old laptop, your results may vary. +2. A way to connect to that machine, either through `SSH` or with a keyboard & monitor. + +## Guides +- [Linux Setup](./setup_linux.md) +- [Windows Setup]() + +## Brickadia Community +[Brickadia Community](https://github.com/brickadia-community) contains a collection of tools made for Brickadia by the community, some of which relate to dedicated servers. You may be interested in [omegga](https://github.com/brickadia-community/omegga), as it allows you to create & use plugins to extend Brickadia servers. diff --git a/src/servers/setup_linux.md b/src/servers/setup_linux.md new file mode 100644 index 0000000..0f06704 --- /dev/null +++ b/src/servers/setup_linux.md @@ -0,0 +1,103 @@ +# Linux Setup + +This guide assumes you are hosting a server on a Debian based distro, on a x86-64 CPU[^arm] + +You can use any linux distro you want to host Brickadia, you will just need to adjust the commands to what your distro provides by default. + +## New User + +Its recommend installing Brickadia onto a user that isn't `root`[^root]. + +```sh +sudo adduser brickadia +``` + +After running this command, you will get the following (shortend) output: + +> Creating home directory `/home/brickadia' ... +> +> New password: + +Enter the users new password, and just press 'ENTER' to skip the questions adduser asks you. + +To access the user, you must use the command: + +```sh +su - brickadia +``` + +From now on, this guide will assume you are logged in as `brickadia`. + +## Installation + +Brickadia does not offer a separate binary for servers, instead you are required to download the launcher. + +Head on over to [Brickadia download page](https://brickadia.com/download) and copy the link to `Linux(Other) .tar.xz` archive. + +On your server, donwload the archive with: +```sh +wget https://static.brickadia.com/launcher/[VERSION]/brickadia-launcher.tar.xz +``` + +This will download `brickadia-launcher.tar.xz`. Next you will need to extract the launcher from tar. + +```sh +tar -xf brickadia-launcher.tar.xz && cd brickadia-launcher +``` + +Inside the new `brickadia-launcher`, run the following command to download the game: + +```sh +./brickadia-launcher --server +``` + +
+ Help, I just got a Permission denied error + + If you get the following error: `./brickadia-launcher: Permission denied`, you will need to run: + + ```sh + chmod +x ./brickadia-launcher + ``` +
+ +Once the game has downloaded, the launcher will start the server. You should close the server (ctrl + c) and move onto the next step. + +## Port Forwarding + +Read [portforward.brickadia.dev](https://portforward.brickadia.dev/), as this will always contain the latest ports you will want to port forward. + +We will be using [ufw](https://help.ubuntu.com/community/UFW) to port forward, as most distros tend to include it out of the box. + +```sh +sudo ufw allow 7777/udp +``` + +## Startup + +Brickadia servers require authentication before they can appear on the master list. To do so, you must pass your username and password at least once when launching the server.[^password] + +```sh + ./brickadia-launcher --server -- -User=Username -Password="password" +``` + +After this, you do not need to pass your username or password as the file is cached in `~/.config/Epic/Brickadia/Saved/Auth`. + +Assuming all went well, you should now be able to join your server. You can configure your game once you have joined it, by pressing `Esc` and pressing `Edit Game`. + +## Misc + +Files of importance: +- Configs: `~/.config/Epic/Brickadia/` +- Install: `~/.local/share/brickadia-launcher/` + +Commands: +- `quit` - Quit the game + +---- + +[^arm]: Arm is not supported officially, however [box64](https://github.com/ptitSeb/box64) has been known to work with Brickadia. + +[^root]: Its good practice in linux not to run applications under `root` unless they require that level of access to the system. There is nothing preventing you from doing so. + +[^password]: The command includes a space at the start, as it tells bash to not save it in `~/.bash_history` diff --git a/src/servers/setup_windows.md b/src/servers/setup_windows.md new file mode 100644 index 0000000..3e7d02a --- /dev/null +++ b/src/servers/setup_windows.md @@ -0,0 +1 @@ +# Windows Setup