|
1 | 1 | # Getting Started
|
2 | 2 |
|
| 3 | +Let's create a simple server as an example. |
| 4 | + |
| 5 | +## Initial Setup |
| 6 | + |
| 7 | +Since mcman is git-compatible, you can create a new Github Repository to put your server configuration files in. This is optional but recommended. |
| 8 | + |
| 9 | +Create a new folder (or clone your repository) for your server and `cd` into it. |
| 10 | + |
| 11 | +Then inside your server folder, run [`mcman init`](../commands/init.md) |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +It will interactively allow you to set up a basic **`server.toml`** file. |
| 16 | + |
| 17 | +!!! question "Whats a `server.toml` file????" |
| 18 | + When using mcman, a `server.toml` file is some kind of metadata file containing neccesary information about it. For example, it contains the server name, version, plugins/mods and more. |
| 19 | + |
| 20 | +!!! tip "Want to import from a modpack?" |
| 21 | + mcman supports importing from some modpack formats (`mrpack` and `packwiz`) |
| 22 | + |
| 23 | + See [this section](./importing-modpacks.md) to see how |
| 24 | + |
| 25 | +## Building |
| 26 | + |
| 27 | +Now, lets 'build' and run the server! |
| 28 | + |
| 29 | +- If you want to run it yourself, use [`mcman build`](../commands/build.md) `&& cd server` and run the `start.{bat,sh}` script. |
| 30 | +- Orrr you can just do [`mcman run`](../commands/run.md) which does both for you. |
| 31 | + |
| 32 | +## Bootstrapping |
| 33 | + |
| 34 | +If you open the newly generated `config/server.properties` file, you'll see something like this: |
| 35 | + |
| 36 | +```properties title="config/server.properties" |
| 37 | +server-port=${PORT:25565} |
| 38 | +motd=${SERVER_NAME:A Minecraft Server} |
| 39 | +``` |
| 40 | + |
| 41 | +If you run `mcman build`, you should see a `server.properties` file inside the `server/` folder too. |
| 42 | + |
| 43 | +If you open *that* file, inside `server/`, you'll see that it contains these two lines: |
| 44 | + |
| 45 | +```properties title="server/server.properties" |
| 46 | +server-port=25565 |
| 47 | +motd=mcman-example-quilt |
| 48 | +``` |
| 49 | + |
| 50 | +As you can guess, when running `mcman build`, mcman will process configuration files inside `config/` and copy them over to `server/` alongside downloading the server jar/plugins/mods and such. |
| 51 | + |
| 52 | +For more information, check out the [Variables](./variables.md) section :3 |
| 53 | + |
| 54 | +## Adding Plugins or Mods |
| 55 | + |
| 56 | +For now, you can use the [`mcman import url <URL>`](../commands/import.md#mcman-import-url-url) command to import mods or plugins from URLs. |
| 57 | + |
| 58 | +Or alternatively write and edit the [`server.toml`](../reference/server.toml.md) yourself to add it. You can check out the [reference](../reference/downloadable/index.md) for the Downloadable type which is basically a mod/plugin source. |
0 commit comments