Uniport WebServer: Host a Website on Your Minecraft Server

Uniport WebServer: Host a Website Directly on Your Minecraft Server Port Running a Minecraft server often means juggling multiple ports for different services. If your hosting provider only gave you a single port and you still want to serve a website alongside your game world, Uniport WebServer i...

Download webbukkit only for Minecraft 1.8.1, 1.7.2

Original name: webbukkit only

Minecraft: 1.7.2, 1.8.1

FileVersionLoaderSize
webbukkit_only_1.7.zip——8 КБDownload
UniportWebserver_PHP_1.7.x_and_1.8.x.jar1.7.2—11.0 МБDownload
webbukkit_1.7.x_und_1.8.x.zip1.8.1—29 КБDownload
UniportWebserver_lite_1.7.x_and_1.8.x.zip1.8.1—38 КБDownload
UniportWebserver_PHP_1.7.x_and_1.8.x.zip1.8.1—11.0 МБDownload

Uniport WebServer: Host a Website Directly on Your Minecraft Server Port

Running a Minecraft server often means juggling multiple ports for different services. If your hosting provider only gave you a single port and you still want to serve a website alongside your game world, Uniport WebServer is the elegant solution. This clever Bukkit plugin transforms your Minecraft server into a dual-purpose machine — handling both game traffic and HTTP requests on the very same port. Whether you need a simple status page, a custom web dashboard, or a full-blown information site, Uniport WebServer makes it possible without any extra network configuration.

How It Works

Uniport WebServer acts as a lightweight HTML web server embedded directly into your CraftBukkit or Spigot server. When a client connects to your server’s port, the plugin inspects the incoming data. If it detects a standard HTTP request, it serves the appropriate file from a dedicated folder. If the connection is a regular Minecraft client, the server continues to handle gameplay as usual. This intelligent switching means you can access your website simply by pointing a browser to your server’s IP address and port, exactly the same way players join the game.

Key Features at a Glance

  • Single port for game and web: No need to open additional ports or configure complex proxies.
  • Full HTML, CSS, and JavaScript support: Serve static websites with ease, including images and downloadable files.
  • PHP-like data handling: Access request headers and parameters through $_REQUEST, $_GET, and $_POST variables.
  • Download trigger: Append ?download to any file URL to force a download instead of displaying it in the browser.
  • Event API for developers: Advanced users can intercept and customize every HTTP request programmatically.
  • Metrics integration: Lightweight usage statistics via MCStats help the developer improve the plugin.

Installation and Setup

Getting Uniport WebServer running is straightforward, but it requires a small manual step to merge core files into your server JAR. First, make sure you are using CraftBukkit 1.7.x or 1.8.x. Open your bukkit.jar (or craftbukkit.jar) with an archive tool like 7-Zip or WinRAR — a JAR file is just a renamed ZIP. Then extract the contents of the plugin’s ZIP archive directly into the root of that JAR, overwriting any existing files. This injects the necessary web server components. Next, place the UniportWebserver.jar (or the lite version) into your server’s plugins folder and restart the server.

Once the server is back online, a new folder called UniportWebserver will appear in your server directory. This is where you place all your website files — HTML pages, CSS stylesheets, images, and scripts. The plugin automatically serves index.html when someone visits the root path. For those who prefer a more streamlined mod management experience, you can install Uniport WebServer directly through the foxygame.net launcher — a convenient, flexible, and modern Minecraft launcher that lets you download mods right from the menu without digging through file systems.

Configuration Options

The plugin keeps things simple with just one configuration entry: logMissingPages. Set it to true if you want the server console to log every time a requested file is not found. This is especially useful during development to catch broken links or missing assets. There are no commands or permissions to manage, so once installed, the plugin works silently in the background.

Special Features and PHP Data

Uniport WebServer includes a basic PHP-like interpreter that allows dynamic content. While it doesn’t support full PHP functions like date(), you can use Quercus/Java expressions for server-side logic (refer to the Quercus documentation for available functions). The plugin provides three superglobal arrays:

  • $_REQUEST: Contains all HTTP headers such as Host, Accept-Language, and User-Agent.
  • $_GET and $_POST: Both hold request parameters, so a URL like ?v=Video123 becomes accessible via $_GET['v'] or $_POST['v'].

To trigger a file download rather than displaying it inline, simply add ?download to the file’s URL. For example, <a href="/manual.pdf?download">Download Manual</a> will prompt the browser to save the file instead of opening it. This works for any file type, making it easy to share resource packs, plugins, or documentation.

Handling HTTP Requests with the Event API

For server owners who want fine-grained control, Uniport WebServer fires an HTTPRequestEvent that you can listen to in your own plugin. This allows you to modify responses, serve dynamic content from a database, or implement custom routing. Here is a basic example of how to intercept requests and serve files from your plugin’s data folder:

@EventHandler
public void onHTTPRequest(HTTPRequestEvent event){
String req = event.getRequest().split(" ")[1];
if(req.equals("/")) req = "/index.html";
File f = new File(getDataFolder(), req);
if(f.isDirectory()) f = new File(f, "index.html");
if(f.exists() && !f.isDirectory()){
try {
event.setImage(IOUtils.toByteArray(new FileInputStream(f)));
if(!f.getName().endsWith(".html")) event.setContentType("*/*");
} catch (IOException e) { e.printStackTrace(); }
}
}

The raw request string contains the full HTTP/1.1 line, though the IP and port details might not always be accurate. You can parse it further to extract headers and build more sophisticated web applications directly inside Minecraft.

Known Limitations and Workarounds

Uniport WebServer is designed for lightweight websites, so it comes with a 256 kB file size limit. If a file exceeds this size — especially on version 1.7.2 — the server may crash because the packet handler times out. On 1.8.x, the download simply stops without a crash. To avoid this, split large HTML, CSS, or JavaScript files into smaller chunks. For big background images or binary downloads like ZIPs and JARs, host them externally on a free image hosting service or a cloud storage platform, and link to them from your pages. This keeps your server responsive and within the plugin’s limits.

Conclusion

Uniport WebServer is a brilliant tool for Minecraft server administrators who need a simple, no-fuss way to host a website on the same port as their game. It eliminates the headache of port forwarding and proxy configurations while giving you enough flexibility to create dynamic content through its PHP-like data handling and event API. The installation process, though slightly unconventional, is a one-time effort that pays off with seamless web integration. Whether you want to display server rules, player stats, or a download portal, this plugin delivers a compact and reliable solution. Just remember to keep your files lean, leverage external hosting for large assets, and explore the developer API if you need advanced functionality. With Uniport WebServer, your Minecraft server can truly become a one-stop digital hub.