This is a short and simple guide to setting up a Swing Instance on your Truenas (Scale) machine. Since there are no charts specifically for Swing, you would have to create a custom app and straight up the docker image.
Be sure to first pull the image and then create a custom app as sometimes the web interface can land you with errors.
Use the given docker image in the repo ghcr.io/swing-opensource/swingmusic
with the latest
channel.
Set the docker image to the one that you pulled just before with the same tag and set the pull policy to Only pull image if not present on host
Leave container commands empty and create 2 entries for Container Args
:
- Port
-p
: This is the port that swing music will run on inside of the docker container. Note that this is not the same as the port of the webui that you will be accessing later on. This is the port on 0.0.0.0 that will later be binded to another port. Set it as the default-p 1970:1970
- Other Arguments: Also use
--restart unless-stopped
as well.
Here you would need to forward the port that you previously set for swing (1970
). This will then be forwarded to the webui port which will be exposed to the LAN.
- Container Port:
1970
- Node Port: Set it as the web ui port you want swing to be at. Generally Truenas only allows port numbers greater than 9000.
- Protocol: It is recommended to leave this to TCP.
Here we would need to setup 2 Host Path Volumes. Since we didn't mount volumes in the docker arguments, swing would instead use /music
and /config
for music and configuration files respectively.
/music
: Set this to the dataset/location to where your music library is stored. Be sure to use the appropriate permissions. For the current version, you would probably be alright even if you do set this to readonly since swing currently does not have the ability to manipulate or edit your library files./config
: Be careful while chosing the path for this directory as you need to make sure that theapplications
group has the ability to write to the specific directory. If you keep running into trouble with ACLs, you can manually set the permisssions to770
through the root user.
Since we would be using a web portal for this app we can check the "Enable WebUI portal" so we can directly open the app within the truenas app list, in case the ports have been messed up. In case you are using SSL for your containers, you can change the necessary ports to 443 and make required changes as they are pretty straightforward. Since I am only using HTTP, I would just need to set the port as 9069
as I had done in one of the previous image.
That's pretty much it for the setting up. In most cases this should work just fine. But in case you have some other issues you can check the post install section:
Usually this error is seen on first run. You can ignore it and continue with the setup on swing app. Once it is done scanning through your library, restart the pod and it should work like normal.
In case, the error is there and you are not able to see any music files then its very likely the specific folder which you had set /music
to does not allow reading by the applications group. If you resolve that then this should be fixed.