This plugin allows for automatic opening of user-selectable ports on supported routers. This is accomplished via the UPnP Protocol. The plugin will automatically open the server port, and additional ports can be added in the config for things like dynmap. You can also choose whether the plugin automatically closes the ports when the server closes.
UPnP is intended to be as lightweight and simple as possible, and only has four dependencies, used for logging, access to the spigot api, and bstats. Overall, UPnP is written in 896 lines of code.
This mod is licensed under the GNU Lesser General Public License v3.0 only (LGPL-3.0-only).
- You may use this mod in modpacks (including commercial modpacks).
- You may run this mod on servers, including paid or hosted servers.
- Other mods may depend on or integrate with this mod under any license.
- Closed-source mods and launchers may link against this mod.
- If you modify this mod’s source code, you must release those modifications under the same LGPL-3.0-only license.
- You must allow users to replace or update this mod independently (e.g., by distributing it as a normal JAR).
- You do NOT have to open-source your entire mod, server, or modpack.
- You do NOT have to publish server source code just because players connect.
- You do NOT have to license your project under LGPL if you merely depend on this mod.
Versions released prior to January 3rd 2026 were licensed under AGPL-3.0-only. You can read more about the change here.
Versions released on or after January 3rd 2026 are licensed under LGPL-3.0-only.
For the full license text, see the LICENSE file.