Files
GeyserWebsite/docs/geyser/creating-a-startup-script.md
T

47 lines
1.7 KiB
Markdown
Raw Normal View History

2021-12-12 14:20:23 +00:00
---
title: Creating a Startup Script
---
2023-07-23 18:08:38 +01:00
# Creating a Startup Script for Geyser-Standalone
2023-11-07 20:24:02 -06:00
:::caution
In order for this to work, you MUST have Java 16 (or higher) installed!
:::
2021-12-12 14:20:23 +00:00
Once you have downloaded and placed Geyser into its own folder, you will need to create a startup script; similar to how you'd run a Bukkit/Spigot/Paper server.
2021-12-12 14:20:23 +00:00
### Windows
* Create a new text file in the same location as the Geyser-Standalone jar file, and call it `run.bat`. Open this with a text editor (preferably Notepad++), and insert the text below:
2023-11-07 20:24:02 -06:00
```batch title="run.bat"
2021-12-12 14:20:23 +00:00
@echo off
java -Xms1024M -jar Geyser-Standalone.jar
2021-12-12 14:20:23 +00:00
pause
```
2023-11-07 20:24:02 -06:00
* Double-click the **run.bat**, and Geyser should start up. Geyser will generate all the needed files.
2021-12-12 14:20:23 +00:00
### macOS
* Create a text file called **run.command**, and open it with a text editor such as TextEdit or TextMate. Type the text below into the **run.command** file:
2023-11-07 20:24:02 -06:00
```sh title="run.command"
2021-12-12 14:20:23 +00:00
#!/bin/bash
cd "$( dirname "$0" )"
java -Xms1024M -jar Geyser-Standalone.jar
2021-12-12 14:20:23 +00:00
```
2023-11-07 20:24:02 -06:00
2021-12-12 14:20:23 +00:00
* Open Terminal, and type in `chmod a+x` **(Do NOT press return!)**, and drag your *run.command* file into the Terminal.
* Press return on your keyboard, and Geyser will start up. Geyser will generate all the needed files.
### Linux
* Create a file called *run.sh*, and open it with a text editor. Type the text below into your `run.sh` file:
2023-11-07 20:24:02 -06:00
```sh title="run.sh"
2021-12-12 14:20:23 +00:00
#!/bin/sh
cd "$( dirname "$0" )"
java -Xms1024M -jar Geyser-Standalone.jar
2021-12-12 14:20:23 +00:00
```
* In your default terminal application, make the file executable by running `chmod +x ~(dir)/run.sh` where `dir` is the name of the folder Geyser is in, or by changing the file permissions;
* Open your default terminal application, and type `./run.sh` to run Geyser. Geyser will generate all the needed files.