Giter Site home page Giter Site logo

hlavalink's Introduction

HLavalink

Lavalink on Heroku, in a nutshell

Deploy

If you want to run this:

Easy Install

  • Click the button "Deploy to Heroku" above to install

The hard way

  • Create an application on Heroku
  • Add Java to buildpacks
  • Fork this repo and deploy it to Heroku

Important notes:

  • To run this 24/7, you need to make an account on UptimeRobot service, and make HTTP request to your app every 5 minutes. For example, if your app is named test-lavalink then make HTTP request to http://test-lavalink.herokuapp.com
  • Do not forget to edit config file (application.yml)
  • Do not forget to set your password (PASSWORD environment variable)

Advantages

  • Uses latest release of Lavalink on (re)start
  • Free to use
  • Easy setup in 3 clicks

Connecting

  • Lavalink's port will be always 80, DO NOT edit port in application.yml!
  • Password is in PASSWORD environment variable, if variable does not exist, it is youshallnotpass

Examples

Python

discord.py

async def initiate_nodes(self):
    nodes = {"MAIN": 
        {
            "host": "test-lavalink.herokuapp.com",
            "port": 80,
            "rest_url": "http://test-lavalink.herokuapp.com",
            "password": "youshallnotpass",
            "identifier": "MAIN",
            "region": "europe"
        }
    }

    for n in nodes.values():
        # ...
async def initiate_nodes(self):
    self.bot.lavalink = lavalink.Client(
        self.bot.user.id
    )
    
    self.bot.lavalink.add_node(
        "test-lavalink.herokuapp.com", 
        80, 
        "youshallnotpass", 
        "eu", 
        "default-node"
    )  # Host, Port, Password, Region, Name
    # ...

Advanced

If you don't like default Heroku options for Java:

  • You can set custom Java flags in ADDITIONAL_JAVA_OPTIONS variable. They override default config. Do not do this if you don't know what you're doing
  • You can opt out of using developer Lavalink version. To set this, you need to create USE_DEV_LAVALINK variable containing n, no or 0 value

hlavalink's People

Contributors

f4stz4p avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hlavalink's Issues

Unexpected response : 503

Hi, it looks like the Lavalink server isn't starting when deployed.

error
error2

When using the heroku console i can't find the Laravel.jar , maybe it doesn't download it well ?

i'm using discord.js with erela.js

I get error when connecting to lavalink

Error: write EPROTO 10304:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:

That's error i get when i try to connect to the HLavalink in Heroku, can anyone help me?

Getting a problem.

hey, I am trying to use your code for my discord bot, and lavalink seems to be working but when I go to my bot, it says this:

"The remote server returned code 404, the expected code was 101. This usually indicates that the remote server is a webserver and not Lavalink. Check your ports, and try again."

I have changed the host in my lavalink.py file and changed the port to 80, yet it seems to be saying this. Back on the lavalink app it says "Authentication failed from [IP]"

If you could help me, that'd be great.

Not found

Every time I search for a song, I get this:
2020-10-28T19:29:01.958415+00:00 app[web.1]: 2020-10-28 19:29:01.957 INFO 32 --- [ader-2-thread-1] lavalink.server.player.AudioLoader : No matches found
2020-10-28T19:29:01.986346+00:00 heroku[router]: at=info method=GET path="/loadtracks?identifier=ytsearch:chill%20gaming%20beats" host=lavalinkkookies.herokuapp.com request_id=867b3305-23c4-4a60-a625-9c8373f4d800 fwd="" dyno=web.1 connect=1ms service=1938ms status=200 bytes=221 protocol=http
No matches found basically
Also, you said in the README to edit the application file, how and what do you do with it?

Also, uptime monitor is down because of 401 Unauthorized, how do I fix that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.