Change Sponge Plugins Directory: Step-by-Step
This guide explains how to change the directory where Sponge plugins are stored on a SpongeForge or SpongeVanilla server. By default, plugins go into the mods/ folder (SpongeForge) or plugins/ folder (SpongeVanilla), but you can redirect them to a custom location, which is useful for organizing multiple servers or separating plugins from mods. You’ll need access to your server’s files (FTP, file manager, or console) and the ability to edit the Sponge global configuration file.
What You’ll Need
- A running Sponge server (SpongeForge or SpongeVanilla) that you can stop and restart.
- File access to the server directory (via FTP, SFTP, or a hosting control panel).
- A text editor (Notepad++, VS Code, or even the built-in editor in your control panel).
Step-by-Step
- Stop the server – Always stop the server before editing configuration files. This prevents the server from overwriting your changes when it shuts down.
- Locate the Sponge global configuration file – In the server directory, look for a folder named
config. Inside it, you should see a file namedspongeorglobal.conf(the exact name may vary by Sponge version). If you don’t see it, start the server once to generate the default config, then stop it again. - Open the configuration file – Use your text editor to open
global.conf. It uses the HOCON format (similar to JSON but with comments). - Find the plugins directory setting – Look for a section that mentions
pluginsorplugin-dir. In many versions, it appears undersponge {orplugins {. It may look like:sponge { plugins { # The directory for plugins # dir = "mods/sponge" } }If the line is commented out (starts with
#), you’ll need to uncomment it by removing the#. - Set your desired directory – Change the value to the path you want, relative to the server root. For example, to use a folder named
sponge-pluginsin the server root, set it to:dir = "sponge-plugins"
You can also use absolute paths like
/home/user/minecraft/sponge-pluginson Linux, but relative paths are more portable. - Save the file – Save your changes and exit the editor.
- Create the new directory – If the folder doesn’t exist, create it in the server root (or at the absolute path you specified).
- Move your existing plugins – If you have any plugins already, move them from the old location (e.g.,
mods/orplugins/) to the new directory. Make sure to move the.jarfiles, not the config folders. - Start the server – Start the server and watch the console logs. You should see a message indicating that Sponge is loading plugins from the new directory. If you see errors, check the Troubleshooting section below.
Common Mistakes
- Editing the wrong file – SpongeForge and SpongeVanilla use different config paths. Make sure you’re editing
config/sponge/global.conf(or similar) and not a mod-specific config. - Forgetting to uncomment – If the
dirline is still commented out, your change won’t take effect. - Using an absolute path with spaces – If your path contains spaces, you need to quote it (e.g.,
dir = "my plugins"). HOCON requires quotes around paths with spaces. - Not moving plugins – If you change the directory but leave plugins in the old location, they won’t load.
- Changing the directory while the server is running – The server reads the config at startup. You must restart the server for changes to take effect.
Tips
- Use a relative path like
sponge-pluginsinstead of an absolute path. This makes it easier to move the server folder to another machine. - Keep the new directory outside the
modsfolder for SpongeForge. If you place it insidemods, the mod loader might try to load plugin jars as mods, causing errors. - Test with a single plugin first to confirm the new directory works before moving everything.
- Make a backup of the
global.confbefore editing, so you can revert if something goes wrong. - If you use a hosting panel, check if it has a file editor with syntax highlighting for HOCON; it helps avoid syntax errors.
Troubleshooting
- Plugins not loading after change – Check the console for errors like “Could not find plugin directory” or “Invalid plugin directory”. Verify the path is correct and the folder exists. Also ensure the
dirline is uncommented and properly formatted. - Server fails to start – If the server crashes, the config might have a syntax error. Open
global.confand check for missing quotes, braces, or commas. Compare it to the default generated file if needed. - Plugins load from both old and new directories – This can happen if you didn’t remove the plugins from the old directory. Move all plugin jars out of the old directory.
- Sponge can’t find the config file – If you don’t see
global.conf, it might be named differently (e.g.,sponge.conf). Search theconfigfolder for any file containing “sponge”. If you still can’t find it, start the server once to generate defaults. - Permission denied when creating directory – On Linux, ensure the server user has write permissions to the server root. Use
chmodor your file manager to grant permissions. - Changes revert after restart – The server might be running under a different working directory. Use an absolute path to avoid confusion, or check that you’re editing the correct
global.conf(there could be multiple copies).
Frequently Asked Questions
Can I use a path outside the server folder?
Yes, you can use an absolute path like C:\sponge-plugins (Windows) or /home/user/plugins (Linux). Make sure the server process has read/write access to that location.
Does this work for both SpongeForge and SpongeVanilla?
Yes, the setting is in the same global.conf for both, though the default directory differs. The steps are identical.
Will my plugin configs be lost when I move plugins?
No, plugin configs are stored in the config folder, not in the plugin directory. Moving the plugin jars won’t affect your settings.
Can I set different directories for different plugins?
No, the dir setting applies to all plugins globally. Sponge does not support per-plugin directories.
Is there a way to change the directory via console commands?
No, the plugin directory is only set in the configuration file. There is no in-game command to change it.
What happens if I set the directory to a folder that doesn’t exist?
Sponge will attempt to create the folder automatically at startup. If it can’t (due to permissions), it will log an error and fall back to the default directory.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.