I want to make this very clear: This is entirely optional! I will continue to support YAMS v1 as well as YAMS v2.
If you are completely happy with YAMS v1, or have a heavily modified setup, you can skip this tutorial!
yams upgrade
. It allows YAMS to upgrade itself.Some of these operations MIGHT BE DESTRUCTIVE! Ensure you have everything backed up before making any changes.
First, clone the YAMS repository in any directory (do NOT use your installation directory!). For the purposes of this tutorial, I’ll use ~/yams_upgrade
.
git clone --depth 1 https://gitlab.com/rogs/yams.git ~/yams_upgrade
cd ~/yams_upgrade
Begin by opening the .env.example
file. Add your correct information to the file. All this information is currently available in your YAMS v1 docker-compose.yaml
file.
For the purposes of this tutorial:
PUID
and PGID
are both set to 1000
.jellyfin
, emby
, and plex
.y
) and configured to use Mullvad. If you are not using a VPN, leave the VPN configuration empty.Here’s how it should look:
# Base configuration
PUID=1000
PGID=1000
MEDIA_DIRECTORY=/srv/media
INSTALL_DIRECTORY=/opt/yams
MEDIA_SERVICE=jellyfin
# VPN configuration
VPN_ENABLED=y
VPN_SERVICE=mullvad
VPN_USER=12345678901234567890
VPN_PASSWORD=12345678901234567890
Now it’s time to set up the yams
binary. You need to replace some variables in this command, so proceed with caution:
/your/install/location/docker-compose.yaml
. In this tutorial, the value should be /opt/yams/docker-compose.yaml
./your/install/location/docker-compose.custom.yaml
. In this tutorial, the value should be /opt/yams/docker-compose.custom.yaml
./your/install/location
. In this tutorial, the value should be /opt/yams
.Run each of the sed
commands separately!
sed -i -e "s|<filename>|/opt/yams/docker-compose.yaml|g" yams
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ REPLACE THE FIRST LINE HERE BETWEEN THE "|"
sed -i -e "s|<custom_file_filename>|/opt/yams/docker-compose.custom.yaml|g" yams
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ REPLACE THE SECOND LINE HERE BETWEEN THE "|"
sed -i -e "s|<install_DIRECTORY>|/opt/yams|g" yams
# ^^^^^^^^^ REPLACE THE THIRD LINE HERE BETWEEN THE "|"
Move your custom containers to docker-compose.custom.yaml
. If you need help, you can use this tutorial from the “Adding a container” section: Add your own containers - Adding a container.
First, you need to stop YAMS. Run:
yams stop
Now that you have all the changes ready for your setup, you can copy the files to the correct location.
You need to copy the .env.example
file to the correct location. For the purposes of this tutorial, I will copy it to /opt/yams/
and rename it to .env
:
cp .env.example /opt/yams/.env
Now, copy the file to the install location. For the purposes of this tutorial, I will copy it to /opt/yams/
:
cp docker-compose.custom.yaml /opt/yams/
Let’s also backup your current docker-compose.yaml
configuration for safekeeping:
cp /your/install/location/docker-compose.yaml docker-compose.yaml.backup
yams
binary to the right placeThis command will copy the current yams
binary for backup and copy the new yams
binary to the right place:
cp $(which yams) yams-old
sudo cp yams $(which yams)
Now it’s the time to execute the update!
yams update
Everything should be up and running!
YAMS should start back up again, and everything should be working as expected with the difference that now YAMS can be upgraded by using yams upgrade
.
If you have any issues upgrading from v1 to v2, you can create a new post in our forum: YAMS Forum: Upgrading YAMS from v1 to v2