-
Notifications
You must be signed in to change notification settings - Fork 1
Setup & Installation
Caution
Please do not self host this unless you really need to. The initial sync downloads about ~8GB at the time of writing this, which can cause issues and downtime for SFH. This is the whole reason this project exists. Thank you for understanding.
- The Rust toolchain
-
sqlx
: install usingcargo install sqlx-cli
Before you can build the project, you have to create the database. You only need to do this once:
Copy .env.example
to .env
and adjust the values to your needs.
Then run:
sqlx db create
sqlx mig run
Important
This server does NOT host song files, it just downloads them to the songs
directory.
You'll have to set up a seperate webserver that serves the contents of that directory.
I am using an nginx server
for that, however the setup should be similar on other server softwares too.
You should also run this project behind a reverse proxy.
-
cargo b -r
will compile the project, the target binary will be put into./target/release/sfh-mirror
.
- execute
./target/release/sfh-mirror
. If you're running for the first time, it'll perform the initial sync, where it downloads ALL SONGS from Song File Hub.
Tip
run the program using something like screen
to make it run in the background.
- once it's running, the server will listen on
0.0.0.0
port58532
. - Sample
screen
command:screen -S sfh-mirror ./target/release/sfh-mirror