Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs #944

Merged
merged 73 commits into from
Dec 2, 2023
Merged

docs #944

Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
0f9b5b2
first docs layout using mkdocs
topi314 Jul 4, 2023
d85b7c5
remove pymdownx.emoji
topi314 Jul 4, 2023
504613e
update requirements.txt
topi314 Jul 4, 2023
202dd0e
fix mkdocs action
topi314 Jul 4, 2023
c3bab03
omg the info plugin I hate you
topi314 Jul 4, 2023
f89efeb
fix burger menu not working on mobile
topi314 Jul 5, 2023
64d4f12
don't rebuild lavalink on docs changes
topi314 Jul 5, 2023
ee2099c
new primary & accent color, some test content & cleanup
topi314 Jul 5, 2023
62c1ee0
update logo wth rounded corners, adjust primary color & add dockerfil…
topi314 Jul 5, 2023
daeaf23
Merge branch 'dev' into docs
topi314 Jul 21, 2023
fe29b3a
Merge branch 'dev' into docs
topi314 Aug 15, 2023
120a33f
remove docs from repository & add to site
topi314 Aug 15, 2023
a9d0553
fix some docs issues
topi314 Aug 15, 2023
960a241
fix configuration button
topi314 Aug 15, 2023
910f887
mention insomnia collection & fix thing
topi314 Aug 15, 2023
f532f57
Merge branch 'dev' into docs
topi314 Aug 15, 2023
68ce7d8
add missing changelog entry
topi314 Aug 15, 2023
40eb68d
fix Insomnia.json location
topi314 Aug 15, 2023
f76366a
add https://github.com/lavalink-devs/Lavalink/commit/9d6f2edb34d1fe5b…
topi314 Aug 15, 2023
8550de9
i woke up in a new buggati (#942)
AADI0009 Aug 15, 2023
9548c1e
update getting started page
topi314 Aug 15, 2023
b8c9246
don't use index.html files as nav
topi314 Aug 15, 2023
c291b31
add page descriptions for social card plugin & fix social card colors
topi314 Aug 15, 2023
acc08aa
don't build mkdocs with --strict
topi314 Aug 15, 2023
abf21fc
fix links & build with --strict
topi314 Aug 15, 2023
09795b6
deploy wiki previews to cf pages
topi314 Aug 15, 2023
c6f6d4b
reformat
topi314 Aug 15, 2023
1a8bb25
use vars.CLOUDFLARE_PROJECT_NAME
topi314 Aug 15, 2023
987b5ca
Merge pull request #943 from lavalink-devs/test/docs
topi314 Aug 15, 2023
f5edb88
fix links
topi314 Aug 15, 2023
ef30c5f
adjust colors
topi314 Aug 15, 2023
2b15e41
add cards on home
topi314 Aug 16, 2023
b0a2b9b
Make the semver url clickable.
vicky5124 Aug 16, 2023
67acb4b
Merge branch 'dev' into docs
topi314 Aug 16, 2023
77f5d9d
fix websocket TOC & update card icons
topi314 Aug 16, 2023
af5b5c1
Make the SemVer URL clickable (#946)
topi314 Aug 16, 2023
195e4c4
add missing changelog entries
topi314 Aug 16, 2023
bfd0681
add links & hover effect for links
topi314 Aug 16, 2023
57d2888
uodate Configuration page header
topi314 Aug 16, 2023
17eb5aa
build outsite prs
topi314 Aug 17, 2023
7edde94
ignore docs-pr changes
topi314 Aug 17, 2023
30c58de
move mkdocs stuff into docs dir
topi314 Aug 18, 2023
93859fd
use pull_request_target
topi314 Aug 18, 2023
b02aed0
use working-directory
topi314 Aug 18, 2023
973a55a
fix missing logo
topi314 Aug 18, 2023
e6c3e3f
use wrangler version 3
topi314 Aug 18, 2023
d0050bb
fix cancelled workflow run
topi314 Aug 19, 2023
8298fcc
update getting started, add faq & markdownextradata plugin
topi314 Aug 21, 2023
98c950c
checkout pr branch
topi314 Aug 21, 2023
ee64e22
Merge branch 'dev' into docs
topi314 Aug 22, 2023
d158f38
remove unused paths-ignore
topi314 Aug 22, 2023
c5a44c8
fix missing application.yml example
topi314 Aug 22, 2023
4a38413
fix weird wrapped cards & add button marging
topi314 Aug 22, 2023
43b57d8
move docker compose comments on seperate lines
topi314 Sep 13, 2023
8018784
Merge branch 'dev' into docs
topi314 Sep 27, 2023
eac0bc0
Update README.md
topi314 Sep 29, 2023
19e4a0f
Update docs/api/index.md
topi314 Sep 29, 2023
c74988e
update copyright
topi314 Sep 29, 2023
454666d
Update docs/stylesheets/neoteroi-cards.css
topi314 Sep 29, 2023
4ea7f18
fix 8px border radius on cards
topi314 Sep 29, 2023
edb9524
Merge branch 'dev' into docs
topi314 Oct 10, 2023
f362f94
Merge branch 'dev' into docs
topi314 Oct 12, 2023
8e0d6c9
Merge branch 'dev' into docs
topi314 Nov 5, 2023
51034ad
update docs changelog
topi314 Nov 5, 2023
dca7409
Merge branch 'dev' into docs
topi314 Nov 5, 2023
74a1bc2
disable strict mode for now
topi314 Nov 5, 2023
de21047
add missing 3.7.9 changelog
topi314 Nov 5, 2023
e38c7e6
fix wrong changelog formatting
topi314 Nov 5, 2023
51021cb
rework some docs pages & homepage
topi314 Nov 18, 2023
041c5ea
add announcement bar
topi314 Dec 2, 2023
f13d8ad
fix broken links
topi314 Dec 2, 2023
07728a4
make lext lighter & make it more clear which tab is selected
topi314 Dec 2, 2023
2f753e2
adjust docs announcement
topi314 Dec 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ name: Build
on:
push:
branches: [ '**' ]
paths-ignore: [ '**.md' ]
paths-ignore:
- '**.md'
- 'docs/**'
- '.github/workflows/docs.yml'
- '.github/workflows/docs-pr.yml'
workflow_call:
secrets:
DOCKER_USERNAME:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Docs PR

on:
pull_request_target:
branches: [ '**' ]
paths:
- 'docs/**'

concurrency:
group: pages
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v3
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install -r requirements.txt
working-directory: docs
- run: mkdocs build --verbose --strict
working-directory: docs
- uses: actions/upload-pages-artifact@v1
with:
path: 'site'
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
directory: site
branch: pr-${{ github.event.pull_request.number }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Docs Push

on:
push:
branches: [ '**' ]
paths:
- 'docs/**'
- '.github/workflows/docs.yml'

concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install -r requirements.txt
working-directory: docs
- run: mkdocs build --verbose --strict
working-directory: docs
- uses: actions/upload-pages-artifact@v1
with:
path: 'site'
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
directory: site
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: '3'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ build/*
gradle.properties
application.yml
LavalinkServer/plugins
.cache/
site/
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ The most noteworthy of these, as well as any features and breaking changes, are
Contributors:
[@topi314](https://github.com/topi314), [@freyacodes](https://github.com/freyacodes), [@DRSchlaubi](https://github.com/DRSchlaubi) and [@melike2d](https://github.com/melike2d)

## 3.7.8
* Fix YouTube 403 errors
* Fix YouTube access token errors

## 3.7.7
* Add JDA-NAS support for musl (`x86-64`, `aarch64`) based systems (most notably `alpine`)

## 3.7.6
* Update Lavaplayer to [`1.4.1`](https://github.com/Walkyst/lavaplayer-fork/releases/tag/1.4.1) & [`1.4.2`](https://github.com/Walkyst/lavaplayer-fork/releases/tag/1.4.2)
* New support for `MUSL` based systems (most notably `alpine`)
Expand Down
241 changes: 6 additions & 235 deletions README.md
topi314 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ A [basic example bot](Testbot) is available.
> [!Warning]
> Lavalink v4 is now in beta! See [here](CHANGELOG.md#400-beta1) for more information.

## Getting started
* Pick one of the [up-to-date clients](https://lavalink.dev/clients). Advanced users can create their own using the [API documentation
](https://lavalink.dev/api/)
* See the [server configuration documentation](https://lavalink.dev/configuration/) for configuring your Lavalink server
* Explore [available plugins](https://lavalink.dev/plugins) for extra features
* See also our [FAQ](https://lavalink.dev/getting-started/faq)
<details>
<summary>Table of Contents</summary>

Expand All @@ -22,12 +28,6 @@ A [basic example bot](Testbot) is available.
- [Hardware Support](#hardware-support)
- [Changelog](#changelog)
- [Versioning policy](#versioning-policy)
- [Client libraries](#client-libraries)
- [Server configuration](#server-configuration)
- [Config](#config)
- [Binary](#binary)
- [Systemd Serivce](#systemd-service)
- [Docker](#docker)

</details>

Expand Down Expand Up @@ -95,234 +95,5 @@ Version numbers can come in different combinations, depending on the release typ
`MAJOR.MINOR.PATCH-PRERELEASE` - Pre-release
`MAJOR.MINOR.PATCH-PRERELEASE+BUILD` - Pre-release additional build metadata

---

## Client libraries:
| Client | Platform | Compatible With | Additional Information |
|------------------------------------------------------------------|--------------|--------------------------------------------|--------------------------------|
| [Lavalink.kt](https://github.com/DRSchlaubi/Lavalink.kt) | Kotlin | Kord/JDA/**Any** | Kotlin Coroutines |
| [DisGoLink](https://github.com/disgoorg/disgolink) | Go | **Any** | |
| [Mafic](https://github.com/ooliver1/mafic) | Python | discord.py **V2**/nextcord/disnake/py-cord | |
| [Moonlink.js](https://github.com/1Lucas1apk/moonlink.js) | Node.js | **Any** | |
| [Magmastream](https://github.com/Blackfort-Hosting/magmastream) | Node.js | **Any** | |
| [Lavacord](https://github.com/lavacord/Lavacord) | Node.js | **Any** | |
| [Shoukaku](https://github.com/Deivu/Shoukaku) | Node.js | **Any** | |
| [Lavalink-Client](https://github.com/tomato6966/Lavalink-Client) | Node.js | **Any** | |
| [FastLink](https://github.com/PerformanC/FastLink) | Node.js | **Any** | |
| [Riffy](https://github.com/riffy-team/riffy) | Node.js | **Any** | |
| [DisCatSharp](https://github.com/Aiko-IT-Systems/DisCatSharp) | .NET | DisCatSharp | v10.4.2+ |
| [Lavalink4NET](https://github.com/angelobreuer/Lavalink4NET) | .NET | Discord.Net/DSharpPlus/Remora | v4+ |
| [Coglink](https://github.com/PerformanC/Coglink) | C | Concord | |
| [lavalink-rs](https://gitlab.com/vicky5124/lavalink-rs) | Rust, Python | **Any** | `tokio`-based, `asyncio`-based |

<details>
<summary>v3.7 supporting Client Libraries</summary>

| Client | Platform | Compatible With | Additional Information |
|---------------------------------------------------------------|----------|--------------------------------------------|---------------------------------|
| [Lavalink.kt](https://github.com/DRSchlaubi/lavalink.kt) | Kotlin | JDA/Kord/**Any** | Kotlin Coroutines |
| [lavaplay.py](https://github.com/HazemMeqdad/lavaplay.py) | Python | **Any\*** | *`asyncio`-based libraries only |
| [Mafic](https://github.com/ooliver1/mafic) | Python | discord.py **V2**/nextcord/disnake/py-cord | |
| [Wavelink](https://github.com/PythonistaGuild/Wavelink) | Python | discord.py **V2** | |
| [Pomice](https://github.com/cloudwithax/pomice) | Python | discord.py **V2** | |
| [Lavacord](https://github.com/lavacord/lavacord) | Node.js | **Any** | |
| [Poru](https://github.com/parasop/poru) | Node.js | **Any** | |
| [Shoukaku](https://github.com/Deivu/Shoukaku) | Node.js | **Any** | |
| [Cosmicord.js](https://github.com/SudhanPlayz/Cosmicord.js) | Node.js | **Any** | |
| [DisCatSharp](https://github.com/Aiko-IT-Systems/DisCatSharp) | .NET | DisCatSharp | Only prior v10.4.1 |
| [Nomia](https://github.com/DHCPCD9/Nomia) | .NET | DSharpPlus | |
| [Lavalink4NET](https://github.com/angelobreuer/Lavalink4NET) | .NET | Discord.Net/DSharpPlus | < v4 |
| [DisGoLink](https://github.com/disgoorg/disgolink) | Go | **Any** | |

</details>

Or alternatively, you can create your own client library, following the [implementation documentation](IMPLEMENTATION.md).
Any client libraries marked with `Unmaintained` have been marked as such as their repositories have not received any commits for at least 1 year since time of checking,
however they are listed as they may still support Lavalink, and/or have not needed maintenance, however keep in mind that compatibility and full feature support is not guaranteed.

## Server configuration

### Config

The server configuration is done in `application.yml`. You can find an example configuration [here](LavalinkServer/application.yml.example).

Alternatively, you can also use environment variables to configure the server. The environment variables are named the same as the keys in the `application.yml` file, but in uppercase and with `.` replaced with `_`. For example, `server.port` becomes `SERVER_PORT`.
For arrays, the index is appended to the key, starting at 0. For example, `LAVALINK_PLUGINS_0_DEPENDENCY` refers to the `dependency` key of the first plugin.

<details>
<summary>List of all env keys</summary>

```env
SERVER_PORT
SERVER_ADDRESS

LAVALINK_PLUGINS_0_DEPENDENCY
LAVALINK_PLUGINS_0_REPOSITORY

LAVALINK_PLUGINS_1_DEPENDENCY
LAVALINK_PLUGINS_1_REPOSITORY

LAVALINK_PLUGINS_DIR

LAVALINK_SERVER_PASSWORD
LAVALINK_SERVER_SOURCES_YOUTUBE
LAVALINK_SERVER_SOURCES_BANDCAMP
LAVALINK_SERVER_SOURCES_SOUNDCLOUD
LAVALINK_SERVER_SOURCES_TWITCH
LAVALINK_SERVER_SOURCES_VIMEO
LAVALINK_SERVER_SOURCES_HTTP
LAVALINK_SERVER_SOURCES_LOCAL

LAVALINK_SERVER_FILTERS_VOLUME
LAVALINK_SERVER_FILTERS_EQUALIZER
LAVALINK_SERVER_FILTERS_KARAOKE
LAVALINK_SERVER_FILTERS_TIMESCALE
LAVALINK_SERVER_FILTERS_TREMOLO
LAVALINK_SERVER_FILTERS_VIBRATO
LAVALINK_SERVER_FILTERS_DISTORTION
LAVALINK_SERVER_FILTERS_ROTATION
LAVALINK_SERVER_FILTERS_CHANNEL_MIX
LAVALINK_SERVER_FILTERS_LOW_PASS

LAVALINK_SERVER_BUFFER_DURATION_MS
LAVALINK_SERVER_FRAME_BUFFER_DURATION_MS
LAVALINK_SERVER_OPUS_ENCODING_QUALITY
LAVALINK_SERVER_RESAMPLING_QUALITY
LAVALINK_SERVER_TRACK_STUCK_THRESHOLD_MS
LAVALINK_SERVER_USE_SEEK_GHOSTING

LAVALINK_SERVER_PLAYER_UPDATE_INTERVAL
LAVALINK_SERVER_YOUTUBE_SEARCH_ENABLED
LAVALINK_SERVER_SOUNDCLOUD_SEARCH_ENABLED

LAVALINK_SERVER_GC_WARNINGS

LAVALINK_SERVER_RATELIMIT_IP_BLOCKS
LAVALINK_SERVER_RATELIMIT_EXCLUDE_IPS
LAVALINK_SERVER_RATELIMIT_STRATEGY
LAVALINK_SERVER_RATELIMIT_SEARCH_TRIGGERS_FAIK
LAVALINK_SERVER_RATELIMIT_RETRY_LIMIT

LAVALINK_SERVER_YOUTUBE_CONFIG_EMAIL
LAVALINK_SERVER_YOUTUBE_CONFIG_PASSWORD

LAVALINK_SERVER_HTTP_CONFIG_PROXY_HOST
LAVALINK_SERVER_HTTP_CONFIG_PROXY_PORT
LAVALINK_SERVER_HTTP_CONFIG_PROXY_USER
LAVALINK_SERVER_HTTP_CONFIG_PROXY_PASSWORD

METRICS_PROMETHEUS_ENABLED
METRICS_PROMETHEUS_ENDPOINT

SENTRY_DSN
SENTRY_ENVIRONMENT
SENTRY_TAGS_SOME_KEY
SENTRY_TAGS_ANOTHER_KEY

LOGGING_FILE_PATH
LOGGING_LEVEL_ROOT
LOGGING_LEVEL_LAVALINK

LOGGING_REQUEST_ENABLED
LOGGING_REQUEST_INCLUDE_CLIENT_INFO
LOGGING_REQUEST_INCLUDE_HEADERS
LOGGING_REQUEST_INCLUDE_QUERY_STRING
LOGGING_REQUEST_INCLUDE_PAYLOAD
LOGGING_REQUEST_MAX_PAYLOAD_LENGTH

LOGGING_LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE
LOGGING_LOGBACK_ROLLINGPOLICY_MAX_HISTORY
```
</details>


### Binary
Download binaries from the [Download Server](https://repo.arbjerg.dev/artifacts/lavalink/), [GitHub releases](https://github.com/lavalink-devs/Lavalink/releases) (specific versions prior to `v3.5` can be found in the [CI Server](https://ci.fredboat.com/viewLog.html?buildId=lastSuccessful&buildTypeId=Lavalink_Build&tab=artifacts&guest=1)) or [GitHub actions](https://github.com/lavalink-devs/Lavalink/actions).

Put an `application.yml` file in your working directory. ([Example here](LavalinkServer/application.yml.example))

Run with `java -jar Lavalink.jar` from the same directory

### Systemd Service

If you're using a Systemd-based Linux distribution you may want to install Lavalink as a background service. You will need to create a `lavalink.service` file inside `/usr/lib/systemd/system`. Create the file with the following template (replacing the values inside the `<>` brackets):
```ini
[Unit]
# Describe the service
Description=Lavalink Service

# Configure service order
After=syslog.target network.target

[Service]
# The user which will run Lavalink
User=<usr>

# The group which will run Lavalink
Group=<usr>

# Where the program should start
WorkingDirectory=</home/usr/lavalink>

# The command to start Lavalink
ExecStart=java -Xmx4G -jar </home/usr/lavalink>/Lavalink.jar

# Restart the service if it crashes
Restart=on-failure

# Delay each restart by 5s
RestartSec=5s

[Install]
# Start this service as part of normal system start-up
WantedBy=multi-user.target
```

To initiate the service, run

```shell
sudo systemctl daemon-reload
sudo systemctl enable lavalink
sudo systemctl start lavalink
```

In addition to the usual log files, you can also view the log with `sudo journalctl -u lavalink`.

### Docker

Docker images can be found under [packages](https://github.com/lavalink-devs/Lavalink/pkgs/container/lavalink) with old builds prior to `v3.7.4` being available on [Docker Hub](https://hub.docker.com/r/fredboat/lavalink/).
There are 2 image variants `Ubuntu` and `Alpine`, the `Alpine` variant is smaller and can be used with the `-alpine` suffix, for example `ghcr.io/lavalink-devs/lavalink:3-alpine`.

Install [Docker](https://docs.docker.com/engine/install/) & [Docker Compose](https://docs.docker.com/compose/install/)

Create a `docker-compose.yml` with the following content:
```yaml
version: "3.8"

services:
lavalink:
image: ghcr.io/lavalink-devs/lavalink:4 # pin the image version to Lavalink v4
container_name: lavalink
restart: unless-stopped
environment:
- _JAVA_OPTIONS=-Xmx6G # set Java options here
- SERVER_PORT=2333 # set lavalink server port
- LAVALINK_SERVER_PASSWORD=youshallnotpass # set password for lavalink
volumes:
- ./application.yml:/opt/Lavalink/application.yml # mount application.yml from the same directory or use environment variables
- ./plugins/:/opt/Lavalink/plugins/ # persist plugins between restarts, make sure to set the correct permissions (user: 322, group: 322)
networks:
- lavalink
expose:
- 2333 # lavalink exposes port 2333 to connect to for other containers (this is for documentation purposes only)
ports:
- 2333:2333 # you only need this if you want to make your lavalink accessible from outside of containers
networks:
lavalink: # create a lavalink network you can add other containers to, to give them access to Lavalink
name: lavalink
```

Run `docker compose up -d`. See [Docker Compose Up](https://docs.docker.com/engine/reference/commandline/compose_up/)

If your bot also runs in a docker container you can make that container join the lavalink network and use `lavalink` (service name) as the hostname to connect.
See [Docker Networking](https://docs.docker.com/network/) & [Docker Compose Networking](https://docs.docker.com/compose/networking/)
Binary file modified branding/lavalink-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading