• Stars
    star
    337
  • Rank 124,957 (Top 3 %)
  • Language Vue
  • License
    GNU General Publi...
  • Created almost 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Self-hosted, music streaming platform
Forte Logo

Forte

Quote

Self-hosted, music streaming platform
Open the Web Player Β»

GitHub Repo stars GitHub commit activity GitHub issues License Website
Report Bug Β· Request Feature


Get it on Google Play
GitHub release (latest by date)
Table of Contents
  1. About the project
  2. Features
  3. Built with
  4. Documentation
  5. Usage
  6. Keyboard Shortcuts
  7. Logging in
  8. Creating your own server
  9. Changing covers
  10. Forte Dashboard
  11. Supported Formats
  12. License
  13. Contact
  14. Acknowledgements

image_1

More screenshots


About the project

forte is a self-hosted music platform. You can either connect to a forte server or create your own server for your friends & family. However, it is also very convenient to use forte on your local machine as a stand-alone music player. Follow this guide to learn how to connect and how to build your own forte server.


Features

  • Add tracks and albums to your queue
  • Mark your favorite tracks, albums, artists, playlists
  • Endless listening with radio feature
  • Create playlists
  • Desktop / Mobile Player
  • Listen to TuneIn stations
  • Specialized context menus
  • Make fuzzy searches
  • Add friends
  • Playing controls
  • Keyboard shortcuts
  • Lyrics support
  • MediaSession API
  • Progressive Web App
  • Group Sessions
  • Admin dashboard
  • User profiles
  • Last.fm Scrobbling
  • Dark mode
  • Federation

Built with

  • Vue.js
  • Node.js
  • Express.js
  • PostgreSQL
  • Bootstrap
  • PeerJS
  • howler.js
  • hammer.js
  • Anime.js
  • Greenlock

Documentation

  • Click here for the API documentation.

Usage

If you know a forte server and just want to connect to use the service, go to https://forte.buzl.uk. The webpage is hosted with GitHub pages and uses the latest forte version. Therefore, this is the recommended way to access forte services.

If you want to use forte on your mobile device, we suggest using the PWA version of the application. You can access the PWA version by going to https://forte.buzl.uk on your mobile device and clicking on the Add to Home Screen button.

However, Forte works best with the Chrome browser on your mobile device.


Keyboard Shortcuts

Search

Left Arrow Space Right Arrow

Group Session Lyrics Mute Queue


Logging in

Once you go to the website, you will be prompted with this dialog:

image_4

Here's an explanation for the fields:

Forte server: The public address of the forte server.
Username    : The username given to you by the server.
Token       : The token given to you by the server.

If you are wondering about how to create accounts, this will be explained in the Creating your own server section.

Here's an example for the authorization:

image_5

If you log in successfully, you will see the homepage of the application, where some track recommendations can be found. Now you can use the application and listen to some music.

Once you log in, your authorization parameters will be saved on the local session of your browser. However, if you ever want to reset these information, you can right click on the Profile button on the top right of the screen, you will see an option to Reset. This will clear the local storage along with your session storage.


Creating your own server

To build and host your own server you need a decent computer as we will be dealing with multiple users and streaming audio files to them. In the remaining of this section, we will be going over the steps of building the server.

Forte uses docker to build the server. Therefore, you need to have docker installed on your machine. You can find the installation instructions for your operating system here.


Building the server

To run the docker container, you need to have the docker-compose.yml file. Download the file here:

docker-compose.yml

Before running the file, you need to edit some fields:

app:
    environment:
        NODE_ENV: production     # Set Node Environment
        POSTGRES_HOST: postgres  # Postgres Host/IP
        POSTGRES_PORT: 5432      # Postgres Database Port
        POSTGRES_DB: forte       # Set Postgres Database Name
        POSTGRES_USER: forte     # Set Postgres Username
        POSTGRES_PASSWORD: forte # Set Postgres Password
    volumes:
        - <library>:/library   # The path to your music library
  
 postgres:
    environment:
        POSTGRES_DB: forte          # Forte Database name
        POSTGRES_USER: forte        # Forte postgres username
        POSTGRES_PASSWORD: forte    # Forte postgres password

Here's an example for the docker-compose.yml file:

version: '3'
services:
    app:
        image: kaangiray26/forte:2.7
        restart: on-failure
        ports:
            - "3000:3000"
        depends_on:
            postgres:
                condition: service_healthy
        environment:
            mode: public
            port: 3000
            NODE_ENV: production     # Set Node Environment
            POSTGRES_HOST: postgres  # Postgres Host/IP
            POSTGRES_PORT: 5432      # Postgres Database Port
            POSTGRES_DB: forte       # Set Postgres Database Name
            POSTGRES_USER: forte     # Set Postgres Username
            POSTGRES_PASSWORD: forte # Set Postgres Password
        volumes:
            - /home/forte/music:/library
    postgres:
        image: kaangiray26/postgres:2.0
        restart: always
        environment:
            POSTGRES_DB: forte       # Set Postgres Database Name
            POSTGRES_USER: forte     # Set Postgres Username
            POSTGRES_PASSWORD: forte # Set Postgres Password
        volumes:
            - db-data:/var/lib/postgresql/data
        healthcheck:
            test: [ "CMD-SHELL", "pg_isready -U forte" ]
            interval: 10s
            timeout: 5s
            retries: 5
volumes:
    db-data:

Using publicly

If you want to use the server publically, you can edit the docker-compose.yml file and change the mode field to public. This setting wil host the server at 0.0.0.0:3000, which will be accessible from outside the network if you forward your port 3000. Follow the next section to configure a reverse proxy with nginx. If you don't want to use a reverse proxy, you can use the server publically with the following command:

docker-compose up -d

Using Nginx as a reverse proxy with SSL

If you want to use the server publically with a SSL certificate, you can use Nginx as a reverse proxy. Here are some example configurations for Nginx:

Let's put an example html file in /var/www/html/index.html:

/var/www/html/index.html

<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

We will be using the following nginx configuration as an example:

/etc/nginx/nginx.conf

worker_processes auto;
worker_cpu_affinity auto;

events {
    multi_accept on;
    worker_connections 1024;
}

http {
    charset utf-8;
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    server_tokens off;
    log_not_found off;
    types_hash_max_size 4096;
    client_max_body_size 16M;

    # MIME
    include mime.types;
    default_type application/octet-stream;

    # logging
    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log warn;

    # load configs
    include /etc/nginx/conf.d/*.conf;
}

Now we will be using certbot to generate a SSL certificate. You can find the installation instructions for your operating system here.

Before certbot

We create a new configuration file for nginx in /etc/nginx/conf.d/forte.conf. Don't forget to change the example.com and www.example.com fields to your domain name.

/etc/nginx/conf.d/forte.conf

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    root /var/www/html;
    server_name example.com www.example.com;
}

Restart nginx

Now, we can test the configuration and restart nginx:

sudo nginx -t && sudo nginx -s reload

Running certbot

Now, we can run certbot to generate a SSL certificate:

sudo certbot --nginx -d example.com -d www.example.com

After certbot and editing the file

After running certbot, it will edit the /etc/nginx/conf.d/forte.conf file to include the SSL certificate. With some minor changes, we have the following configuration at the end:

/etc/nginx/conf.d/forte.conf

server {
    root /var/www/html;
    server_name example.com www.example.com;

    listen [::]:443 ssl ipv6only=on;                                         # managed by Certbot
    listen 443 ssl;                                                          # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/www.example.com/fullchain.pem;     # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/www.example.com/privkey.pem;   # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf;                         # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;                           # managed by Certbot

	location / {
		proxy_pass http://localhost:3000;
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
	    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto https;
	    proxy_redirect off;
	}
}

Restarting Nginx

With everything set up, we can restart nginx to apply the changes:

sudo systemctl restart nginx

Running the server

Finally, we can run forte with the following command:

sudo docker-compose up -d

Directory Structure for the Music Library

  • Default structure: /library/Artist/Album/Track

Here's an example:

/library/
└── Antimatter/
   β”œβ”€β”€ Leaving Eden/
   |   β”œβ”€β”€ 01 - Redemption.flac
   |   β”œβ”€β”€ 02 - Another Face in a Window.flac
   |   ...
   |   └── cover.jpg # Cover for the album
   |
   └── cover.jpg # Cover for the artist

Here are two examples for multi-disc albums:

/library/
└── Ayreon/
    └── 01011001/
        β”œβ”€β”€ 101 - Age Of Shadows_We Are Forever.flac
        β”œβ”€β”€ 102 - Comatose.flac
        ...
        β”œβ”€β”€ 201 - The Fifth Extinction.flac
        β”œβ”€β”€ 202 - Waking Dreams.flac
        ...
/library/
└── Ayreon/
    └── 01011001/
        β”œβ”€β”€ CD1/
        |   β”œβ”€β”€ 01 - Age Of Shadows_We Are Forever.flac
        β”‚   β”œβ”€β”€ 02 - Comatose.flac
        β”‚   ...
        β”‚
        └── CD2/
           β”œβ”€β”€ 01 - The Fifth Extinction.flac
           β”œβ”€β”€ 02 - Waking Dreams.flac
           ...
  • Artist folders under library directory.
  • Album folders under Artists.
  • Tracks under Albums.
  • For each track, follow the format INDEX - TRACK_TITLE.FORMAT
  • To set cover for the album, put a cover.* file inside the album folder.
  • To set cover for the artist, put a cover.* file inside the artist folder.
  • To use multi-disc albums, you can both use CD directories or just tracks with CD indexes.
  • Artist folders can be empty.
  • Album folders can be empty.

Changing covers

On each restart of the server, artists and albums with no covers will be found and covers for them will be retrieved. If you want to use your own cover file for an artist or an album, just place the cover file as cover.* (cover.jpg, cover.png, etc.) inside the folder respectively.

To use an external resource as a cover for an artist or an album, go to the Forte dashboard, find the item using the search bar, change the URL of the image and update.


Forte Dashboard

You can access the forte dashboard by going to http://localhost:3000. The default login credentials are: forte and alternative.

While in dashboard, don't forget to change the genius_token, lastfm_api_key, lastfm_api_secret fields in the Config tab for genius and lastfm extensions.

Also, please change the default password from the Password tab.


Supported Formats

  • Audio: mp3, m4a, ogg, flac, wav, aac
  • Image: jpg, jpeg, png, gif, bmp, tiff, svg

License

Distributed under the GPL-3.0 License. See LICENSE for more information.


Contact

Kaan Giray Buzluk - @kaangiray26 - kaangiray26 (at) protonmail.com


Acknowledgements

Check out the following list of resources that I've used to build forte.


More Repositories

1

geddit-app

Geddit is an open-source, Reddit client for Android without using their API
Vue
848
star
2

endless

Unifying the social media experience
JavaScript
95
star
3

geddit

Reddit's public API without authentication
JavaScript
33
star
4

noauth

Spotify's public API without authentication
JavaScript
23
star
5

tunein-cli

Browse and listen to TuneIn stations from the command line
Python
13
star
6

share

A Web App for P2P File Sharing
Vue
10
star
7

nocturne

Open-source client-side PDF editor with configurable pipelines
Vue
6
star
8

deezer-plus

Alternative Deezer Web Player with extra features
Vue
6
star
9

deadswitch

My Dead Man's Switch
Python
4
star
10

pages

Serve web pages directly from your browser
Vue
4
star
11

whatsbomb

Whatsapp Message Flood
Python
3
star
12

capisce

The Open-Source API Testing Tool
HTML
3
star
13

pyunzip

Exploit decrypted zip files to reveal filenames
Python
3
star
14

tatava

Tatava!: A P2P Mobile Party Game
Vue
3
star
15

pet

Interactive Audio Metadata Editor
Python
2
star
16

capture

Web Camera App
2
star
17

pyunlock

Unlock Your Mac Using A USB Device
Python
2
star
18

games

Curation Of Online Party Games
Vue
2
star
19

sync-everything

A Firefox Extension to synchronize video playback between P2P devices
JavaScript
2
star
20

chat

A P2P Web Application for Messaging
2
star
21

easy-click

Use Your Keyboard To Simulate Mouse Clicks
Python
2
star
22

fakeai

Imitating Human Responses
2
star
23

shack

Portable P2P Chatrooms
Vue
2
star
24

phantom

Secure instant messaging app using sockets, written in python
2
star
25

window.chat

window.chat Source Code
JavaScript
2
star
26

tracker.fm

See what your Last.fm friends are listening to in real-time.
2
star
27

sourtimes

The Python Eksisozluk API Wrapper
Python
2
star
28

forte-app

The Official Forte Android App
Vue
2
star
29

kaangiray26.github.io

Redirecting to buzl.uk
HTML
2
star
30

sync

A P2P Synchronized Media Player
Vue
2
star
31

squawk

Breaking the ice on your inbox
Vue
2
star
32

kgbdns-pub

Free self-hosted DDNS service
Python
2
star
33

messenger

An open-source end-to-end encrypted P2P Messenger
Vue
2
star
34

shortcut

Serverless URL Redirector
2
star
35

commitment

Configure git commit messages individually
Shell
1
star
36

snippets_python

Snippets to use with python
1
star
37

magiccube

Create Randomized Encryption Key Sequences
Python
1
star
38

deezer-plus-mobile

A Progressive Web App for Deezer+
1
star
39

forte-js

A JavaScript wrapper for the Forte API
JavaScript
1
star
40

stream

Streaming Web App using WebTorrent
1
star
41

vuejs-template

Template Workspace for Vue.js
JavaScript
1
star
42

ait

Advanced Internet Technology
1
star
43

moodle-tools

Firefox Extension Including Various Tools for Interacting with Moodle Content
1
star
44

mic

Mic,tap writing.
Python
1
star
45

fritzbox

Fritzbox
1
star
46

cadence

Some CSS rules
1
star
47

satoolkit

The Boolean Satisfiability Problem Toolkit (SAT)
1
star
48

sh

Serverless URL Shortener
1
star
49

snippets_java

Snippets to use with java
1
star
50

billiardaachen

Billiard Aachen Website
HTML
1
star
51

allesgut

Alles gut?
Vue
1
star
52

whatsfollow

Records status changes of a friend in whatsapp
Python
1
star
53

pfa

Python Framework of Automation
Python
1
star
54

drifter-gtk

Another GTK Client for Reddit
CSS
1
star
55

together

Vue
1
star
56

wallpapers

Wallpapers from various distros
1
star
57

pydeck

Python YGOPRODeck API Wrapper
Python
1
star
58

webtech

WebTech Offener Fragenkatalog
1
star
59

msg

A P2P Messaging App
1
star
60

gitlounge

Social Networking off GitHub
1
star
61

rwth-aachen-app

1
star
62

it

Italian Notes
1
star
63

poet

Write poems using autocomplete function in textedit
Python
1
star
64

buzl.uk

My Personal Website
Vue
1
star
65

kgbapi

A Little Resource Provider
Python
1
star
66

pitch-perfect

One Time Pad Implementation with a GUI
Python
1
star
67

ventura

Social media platform
1
star
68

kaangiray26

My Profile
1
star
69

sudoku

A Sudoku Web App
Vue
1
star
70

reddet

A Repost Detecting Bot for Reddit
1
star
71

xchain-pub

Encrypt Files with Shared Keys
CSS
1
star
72

notes

A Web Application for Synchronized Note Taking
1
star
73

hashdiff

Compare multiple folders and try to analyze common files
Python
1
star
74

tuneout

The Open-Source Music Sharing Tool
Python
1
star
75

radyo-eksen-playlist

Automated Spotify Playlist Generator for Radyo Eksen
JavaScript
1
star
76

reddown

Client-side Reddit Media Downloader
1
star
77

archive

Archive
1
star
78

pages-template

A template to serve web pages directly from your browser
1
star
79

otp-go

Go
1
star
80

totp

A Time-based one-time password (TOTP) implementation
Vue
1
star
81

otp

Everything One-time Pad
1
star
82

cinevision-pub

Match Movies with your Friends
HTML
1
star