The most well supported library for Ethereum currently is probably web3.js. Note: version 1 is still in beta so make sure you use v0.20.1, which is still the most well documented.
Then you'll need to run a server-side node which will support IPC connections (you could use HTTP RPC, but IPC is a little more secure). Geth and Parity will both do the job, but you only need one. Another note: you'll need to ensure you enable the personal IPC API if it's not on by default.
After that, you can generate accounts using web3:
const Web3 = require('web3')
const web3 = new Web3(new Web3.providers.IpcProvider('/PATH/TO/IPC', require('net')
// make a new account, you can do this in a loop for all your users
let newAccount = web3.personal.newAccount("SOME_PASSWORD")
Footnote
This is pretty dangerous. Networks like Ethereum are fun because when you hold the private key to an easily-generatable account, you own all the assets in that account. When you put a bunch of private keys in one place, you create an attractive target for a hack. Be careful when handling lots of private keys, and ensure only the necessary people have access to them. Practise good opsec.