You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Forge][forge] has an easy to use installer that can be used to install all of the needed files to run a Forge server.
12
-
To install a version compatible with Minecraft 1.16.4, [download][download] the Forge installer `forge-forge-x.x.x-x.x.x-installer`
13
-
and run the following as the `minecraft` user (`sudo su minecraft`):
11
+
[Forge][forge] has an easy to use installer that can be used to install all of the needed files to run a Forge server. [Download][download] the Forge installer `forge-forge-x.x.x-x.x.x-installer` and run the following as the `minecraft` user (`sudo su minecraft`) (Note: forge for Minecraft 1.16.4 is being used as an example.):
The next steps are divided between _Forge 1.16.5 and before_ and _Forge 1.17.1 and later_. This is because the way that forge-1.17.1 was structered changed because ["it is no longer feasible to provide a single executable jar like was done before."][forge-1.17.1_release_notes]
21
20
22
-
The installer should install the forge server jar to `/opt/mscs/server/forge-1.16.4-35.1.7/forge-1.16.4-35.1.7.jar`
21
+
## Forge 1.16.5 and before
22
+
Please note that forge for Minecraft 1.16.4 will be used in the examples. The installer should install the forge server jar to `/opt/mscs/server/forge-1.16.4-35.1.7/forge-1.16.4-35.1.7.jar`
23
23
and a bunch of library files in `/opt/mscs/server/forge-1.16.4-35.1.7/libraries/`.
24
24
25
25
Create a new server (if necessary):
@@ -96,5 +96,131 @@ Once you are done watching the server boot up, you can press `<Ctrl-C>` to detac
96
96
Simply add mods as you would normally by dragging them into the `/opt/mscs/worlds/forge/mods` folder, assuming `forge`
97
97
is the name of your world.
98
98
99
+
100
+
## Forge 1.17.1 and later
101
+
Please note that forge for Minecraft 1.17.1 will be used in the examples. If you named the server directory `forge-1.17.1` in the first step with the `mkdir` command, the installer should install a bash script to `/opt/mscs/server/forge-1.17.1` and a bunch of library files in `/opt/mscs/server/forge-1.17.1/libraries/`.
102
+
103
+
In the `/opt/mscs/server/forge-1.17.1 directory`, edit `run.sh`.
104
+
105
+
(GNU nano is an easy to use command-line text editor if you plan to edit the file from the terminal. Install it with `sudo apt install nano` if you are using a Debian based distro. In the following instructions, to edit a file with GNU nano, replace `editor` with `nano`.)
106
+
107
+
```bash
108
+
cd /opt/mscs/server/forge-1.17.1
109
+
editor run.sh
110
+
```
111
+
112
+
The original `run.sh` script wil include `java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.17.1-37.1.1/unix_args.txt "$@"`
113
+
114
+
The `@user_jvm_args.txt` and the `@libraries/net/minecraftforge/forge/1.17.1-37.1.1/unix_args.txt` need to be replaced with their full directory path. You should also include `--nogui` at the end **of the same line** before the `"$@"`. The file should now look like this:
115
+
116
+
```ini
117
+
#!/usr/bin/env sh
118
+
# Forge requires a configured set of both JVM and program arguments.
119
+
# Add custom JVM arguments to the user_jvm_args.txt
120
+
# Add custom program arguments {such as nogui} to this file in the next line before the "$@" or
You may also want to increase the initial RAM and possibly even the maximum RAM. To do this, edit the `user_jvm_args.txt` file.
126
+
127
+
```bash
128
+
cd /opt/mscs/server/forge-1.17.1/
129
+
editor user_jvm_args.txt
130
+
```
131
+
132
+
Now add all the java arguments you wish. For example, to allocate a minimum of 4GB and a maximum of 6GB, you would make the `user_jvm_args.txt` file look something like this:
133
+
134
+
```ini
135
+
# Xmx and Xms set the maximum and minimum RAM usage, respectively.
136
+
# They can take any number, followed by an M or a G.
137
+
# M means Megabyte, G means Gigabyte.
138
+
# For example, to set the maximum to 3GB: -Xmx3G
139
+
# To set the minimum to 2.5GB: -Xms2500M
140
+
141
+
# A good default for a modded server is 4GB.
142
+
# Uncomment the next line to set it.
143
+
-Xms4G -Xmx6G
144
+
```
145
+
146
+
Now the `unix_args.txt` file mentioned in `run.sh` needs to be edited as well to include the full directory paths. Change the directory to the one containing the `unix_args.txt` file, create a backup in case you mess up the editing, and then edit the original.
147
+
148
+
```bash
149
+
cd /opt/mscs/server/forge-1.17.1/libraries/net/minecraftforge/forge/1.17.1-37.1.1/
150
+
cp unix_args.txt unix_args_backup.txt
151
+
editor unix_args.txt
152
+
```
153
+
154
+
Every path that includes `libraries/[...]` has to be replaced with their full directory path: `/opt/mscs/server/forge-1.17.1/libraries/[...]`. If your editor of choice is GNU nano, this can be done by pressing `<Ctrl-\>`, typing `libraries` and pressing enter, then typing the full path name. In this case it would be `/opt/mscs/server/forge-1.17.1/libraries`, then press enter, then press `<a>` to replace all.
155
+
156
+
If you mess this up, you can always delete the `unix_args.txt` file and make another one using the backup, and start editing again.
157
+
158
+
```bash
159
+
rm unix_args.txt
160
+
cp unix_args_backup.txt unix_args.txt
161
+
editor unix_args.txt
162
+
```
163
+
164
+
Create a new server (if necessary):
165
+
166
+
```bash
167
+
mscs create forge 25565
168
+
```
169
+
170
+
`forge` can be replaced with any name. Ensure that port `25565` is an unused port, or change it if nessessary.
171
+
172
+
This will create the directory `forge` in `/opt/mscs/worlds` as well as the `server.properties` and `mscs.properties`
173
+
files:
174
+
175
+
Change the directory to the world that was created and modify the `mscs.properties` file.
176
+
177
+
```bash
178
+
cd /opt/mscs/worlds/forge
179
+
editor /opt/mscs/worlds/forge/mscs.properties
180
+
```
181
+
182
+
Add/alter these lines, replacing versions and file paths as needed:
0 commit comments