Easily deploy a lavalink server on heroku. This is a very elementary and barebones approach, but reliable nonetheless. This branch will automatically download the latest Lavalink jar file.
To update your Lavalink.jar, restart all dynos (faster) or redeploy.
Buildpacks should be added automatically, you may modify the PASS
variable during setup to change the password.
- Create a fork of this repo
- Navigate to your heroku project @dashboard.heroku.com
- Navigate to your project "Settings", click "Reaveal Config Vars", and set a new var called PASS to what you want your lavalink password to be.
- In the same menu, set a new var called JAVA_TOOL_OPTIONS and set it to "-XX:+UseContainerSupport -Xmx500m -Xss256k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8" without the "" , this will set ram to max on a free dyno
- Navigate to the "Deploy" tab
- Find/Click the "Connect to GitHub" section and login if needed
- For the repo name, type "heroku-lavalink" and Click "Search"
- Click "Connect"
- Scroll down and find "Manual Deploy", then switch the branch to auto and "Deploy Branch".
- Download files (Clone or download->Download ZIP).
- Extract files into an empty directory.
- Follow https://devcenter.heroku.com/articles/git. If heroku is unable to automatically configure buildpacks, go to your projects settings on the heroku website and add java and nodejs.
- Go to your project settings->config vars on heroku and set a new var called PASS to what you want your lavalink password to be.
- In the same menu, set a new var called JAVA_TOOL_OPTIONS and set it to "-XX:+UseContainerSupport -Xmx500m -Xss256k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8" without the "" , this will set ram to max on a free dyno
Notes:
- After changing PASS you must redeploy or click the More menu and restart all dynos.
- If heroku is unable to automatically configure buildpacks, go to your projects settings on the heroku website and add java and nodejs.
Please understand your lavalink server will most likely run out of memory on a free dyno. I would recommend upgrading or switching to a lighter alternative. If you do upgrade, you must change -Xmx in the JAVA_TOOL_OPTIONS to your new amount of ram.