UltraStar Web Server is a web application that provides an interface for browsing, searching, and playing songs from the popular karaoke game UltraStar Deluxe. It is written in Python using the Flask framework and SQLAlchemy for database management.
- Browse, search, and play songs from your UltraStar Deluxe library
- View song metadata such as artist, title, language, and year
- Sort songs by artist, title, year or times played
- Access your UltraStar Deluxe library from any device on your local network
- Install Poetry if you haven't already.
- Clone this repository:
git clone https://github.com/your_username/ultrastar-web-server.git
- Navigate to the project directory:
cd ultrastar-web-server
- Run
poetry install
to install all dependencies.
-
Create a
.env
file in the project directory and add the following variables:QR_URL=http://your_local_ip_address:5000 SONGFOLDER=path_to_your_songs_directory SONG_DB=sqlite:///path_to_your_songs.db_file ULTRASTAR_DB=sqlite:///path_to_your_ultrastar_database_file
Replace
your_local_ip_address
with your computer's local IP address,path_to_your_songs_directory
with the path to your UltraStar Deluxe songs folder, andpath_to_your_songs.db_file
andpath_to_your_ultrastar_database_file
with the paths to your desired SQLite database files.
- Run poetry run python
index.py
to load your songs into the SQLite database. - This will create a file called songs.db in the specified path from your
.env
This file is used by the server to serve your songs.
the Server
- Run
poetry run flask run --host=0.0.0.0
in the project directory. - This will start the server on port 5000 and make it accessible from any device on your local network.
- Build Docker image using
docker build -t ultrastar-webserver .
- Create your .env file like so:
QR_URL=http://127.0.0.1:5000
SONGFOLDER =/usdx/songs/
SONG_DB=sqlite:////usdx/songs.db
ULTRASTAR_DB=sqlite:////usdx/Ultrastar.db
- Run index script
docker run --rm -v ./.env:/ultrastar/.env -v ~/.var/app/eu.usdx.UltraStarDeluxe/.ultrastardx:/usdx --entrypoint poetry -it ultrastar-webserver run python index.py
Replace ~/.var/app/eu.usdx.UltraStarDeluxe/.ultrastardx
with the folder that contains your Ultrastar.db. If you're using flatpak, the given path is fine.
4. Start the Webserver:
docker run --rm -v ./.env:/ultrastar/.env -v ~/.var/app/eu.usdx.UltraStarDeluxe/.ultrastardx:/usdx -p 5000:5000 -it ultrastar-webserver
Replace ~/.var/app/eu.usdx.UltraStarDeluxe/.ultrastardx
with the folder you used above. You may also change the first 5000
of the port definition to a port of your desire.
If you use a rootless container environment (e.g. Podman) and use SELinux you'll have to add :z
at the end of the volume definitions.
Pull requests are welcome! If you have any ideas for new features or improvements, feel free to submit a pull request or open an issue.
- Add a Dockerfile
- Make SONGFOLDER configurable
- Add a config file
- Pack as an executable
- Add a "Star" feature
- Add a "Recently Played" feature
- Add a "Recently Added" feature
- Support for remote control or integration with UltraStar Deluxe game client
- Improve database indexing performance and error handling
- Optimize server performance and resource usage
- Refactor codebase for better maintainability and extensibility
- Create detailed documentation on installation, configuration, and usage
- Write a better and more extensive Readme (Done)