How do i get mods?

Hello i have bin looking trying to get mods for my server for about 4 hours now and i still dont know could some body help me?

Of the mods I has, they generally get put into the …/datapack directory for that world n server.

i cant find datapack

This should be in /var/games/minecraft/servers/server name/world named directory/datapack/

found what do i do now?

I’ll try to expand this for clarity of what I know,
you can have 3 types of “mods” (there are more types but abridged what I’m about to explain)

Datapacks : which go in the datapack folder, these require no server restart to install, clients don’t normally need them and they change the game slightly. Very easy install, download the datapack, cram it into the the datapack folder.
A lot can be found at https://vanillatweaks.net/picker/datapacks/ or https://www.planetminecraft.com/data-packs/

Plugins: this folder appears if you run the spigot BuildTools.jar file in your server folder. These are a lot more advanced with game changing/adding mechanics, but still don’t require clients to install. There’s only one place for these.
https://www.spigotmc.org/resources/categories/spigot.4/

Mods: forge is the most common/popular with compatibility, same story as spigot, you need to run the forge installer to create a mods folder. From here you get the most game change, but clients are also reguired to download/run forge and mods as well. So you have to state to anyone connecting to your server, which mods you use, otherwise they cannot play.
With the unfortunate twitch takeover of cursemods, this is still the best place to find them, but there are other sites.
https://www.curseforge.com/minecraft/mc-mods

how can i run the Forge Installer?

  1. Either sftp into /var/games/minecraft/servers/serverName

-ServerName being your servers name if no dir exists in /servers then create one either by sftp or ssh.
Paste the following command in in a ssh terminal…

java -jar forge-x.xx.x-installer.jar nogui --installServer

  1. Or login to webui via https://192.168.X.XX:8443/admin/login.html and go down the following list.

Profiles tab… filter for forge version/jar you want to use and download it
Create New Server tab…fill out relevant info critical stuff is already prefilled, bar the ip field which you have to do.
Server status tab set profile drop down menu on the left to downloaded jar and the runable jar menu on the right to forgeXXXXX-installer.jar

run the server, it will install it for you once it finishes and shutdown then change runable jar to forgexxxx.universal.jar you should now have forge on there.

oh finally got it to work Thanks