How can I start a Minecraft server from the web?
How can I start a Minecraft server on a server that has a web server?
For example those control panels that start servers when the server is offline. I know they can execute a shell script but how. If someone could provide me with some example code.
Solution 1:
So, I guess you have a Linux VPS or dedicated server, where you can install whatever you want? Good.
For this, we use the bukkit server.
Here are some instructions:
1. Download CraftBukkit's latest build: CraftBukkit - Recommended Build
2. Put the .jar in a folder, for this example we'll use a generic one: ~/craftbukkit
3. Move to the above directory in terminal with 'cd ~/craftbukkit'
4. Create a new file in the minecraft folder and name it craftbukkit.sh
5. Edit the file and paste this into it:
#!/bin/sh BINDIR=$(dirname "$(readlink -fn "$0")") cd "$BINDIR" java -Xmx1024M -jar craftbukkit.jar -o true
6. Make the file executable, either by running "chmod +x ~/craftbukkit/craftbukkit.sh" in a terminal, or by changing the permissions in the file's properties.
7. Then, in terminal, type '~/craftbukkit/craftbukkit.sh' to run to start the server.
8. When you're done playing around, issue the "stop" command in console.
You can run bukkit like described above, but there are other options - you can run the server permanently with an init script or run it with an ASCII interface
EDIT:
Reread your question, could be that I misunderstood. So here is another link to something that should be what you need - Bukkit Webby
Bukkit Webby is a lightweight web administration that is easy and fast to setup It's made of two components :
WebbyBukkitPlugin is a Bukkit Plugin that interacts with Bukkit, read your server log, find all online users, etc.
WebbyRTK is a RTK module that interacts with RemoteToolkit and run the webserver. Even if Bukkit has been shutdown, the webserver will persists and allow you to restart Bukkit.
Current Features
- Server administration based on Bukkit Remote Toolkit (Start / Stop / Restart / Reload)
- Online configuration files
- Online server log
- Backup management (manual backup, automated restore)
- Easy installation : drop the jars and files as any bukkit plugins, setup port, login and password for webby and RTK, and you are done !
- NO APACHE NEEDED !
There are tons of other bukkit plugins for website administration. If my suggestion is not what you want, you can check the plugins.