Use Docker and Nicotine+ to build a righteous music archive
Streaming services have made the good old days of Napster somewhat obsolete, but they do have their downsides. They can cancel your account at any time without reason, losing all your curated playlists in the process. You need to be connected to listen. Your music is centralized on a corporate server while data is collected on your listening habits. They always eventually transition into a social media site instead of just a music service. Sometimes they just disappear completely, or turn into a shittier shadow of their former selves (I'm looking at you Google Play Music => YouTube Music). And they don't have everything, good (obscure) music can be hard to find sometimes. There are many alternatives to the streaming model, and today I'll introduce you to my current favorite. I pursued this option mainly due to the latter reason. So many songs I looked for on streaming were just not available, and the only other option was to pay insane prices for vinyl on eBay or Discogs. With this option I have been able to eventually find everything I've looked for.
You will need a server of some type with optimally 2GB of RAM and at least 8GB of storage (more storage depending on the amount of music you would like to share/download – I'm using a 128GB Debian 11 VM on ProxMox), Docker installed on the server, and a way to provide encryption if accessing outside of your local network (nginx proxy in my case).
We will be using linuxserver.io's Webtop and docker compose to build our environment. Webtop is a nice little package with a desktop OS and browser based VNC client to access it, Apache's Guacamole, rolled into one. Create a folder for Webtop and within it create a docker-compose.yaml file. Mine looks as follows:
version: "2.1" services: webtop: image: lscr.io/linuxserver/webtop:latest container_name: webtop security_opt: - seccomp:unconfined environment: - PUID=1000 - PGID=1000 - TZ=America/Chicago - KEYBOARD=en-us-qwerty - TITLE=Webtop #optional - AUTO_LOGIN=false volumes: - /home/minnix/webtop:/config - /var/run/docker.sock:/var/run/docker.sock ports: - 3000:3000 - 2234:2234 devices: - /dev/dri:/dev/dri shm_size: "1gb" restart: unless-stopped
A few things of note here,
image is the version you would like to run.
latest is the default which is Alpine with XFCE as the desktop. On the Webtop page there are a long list of tags depending on the image you would like to use.
environment variables to suit your use case, most notably TZ, KEYBOARD, and I added AUTO_LOGIN to false as well so that login is required to access the machine. Make sure your config under
volumes is in the correct location according to your setup.
For ports, besides 3000 for access to the GUI, you will need 2234 forwarded as well for Nicotine+. This port needs to be forwarded in your router too for Nicotine+ to connect to the network. The last thing I added to the default yaml is
restart: unless stopped at the end to restart the container automatically on reboot.
Save and close the file then issue
docker compose up -d and you should be up and running. Before accessing Webtop, change the password to one of your choosing using
docker exec -it webtop passwd abc.
You can access Webtop via your browser at
http://yourhost:3000/ or you can proxy it and add SSL (which I recommend). Encryption is beyond the scope of this article.
Once you're in Webtop, install Nicotine+ and go through the registration process to connect to the soulseek network. In Alpine, the package name is
nicotine-plus. Docs for Nicotine+ can be found here. If you're new to Nicotine+, it is a client for the soulseek sharing network, which has been around forever. Everything is explained in the docs regarding usage. One thing you will probably want to do first though is go to the main nicotine chat and issue the command
portscan to make sure 2234 is correctly configured.
Since you are running a full desktop OS, I recommend installing MusicBrainz Picard as well. Probably my favorite music tagging application.
Keep in mind, using Nicotine+ and the soulseek network exposes your IP address. You may want to use a VPN or find other ways to obfuscate your IP. Just a warning.
Why do I do it this way? Several reasons. I have a dedicated server separate from everything else in my network just for this purpose. I can access the server from any location as long as I have access to a browser, say if someone suggests an artist to me and I'd like to add them to my Funkwhale server for immediate listening. The server is always running unlike my laptop which is very handy for queuing long downloads or allowing access to my files for friends. Plus, it's just cool!