First, a brief disclaimer
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!
What are the advantages?
- YAMS v2 introduces a new command:
yams upgrade. It allows YAMS to upgrade itself.
- Adding custom containers is now easier. You can find the tutorial here: Add your own containers.
⚠ BACKUP YOUR CONFIGURATION! ⚠
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
git clone --depth 1 https://gitlab.com/rogs/yams.git ~/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
For the purposes of this tutorial:
PGID are both set to
- All the other settings are going to be the defaults set in the installer.
- Your media server name must be in lowercase. Accepted values are:
- The VPN is set to be enabled (
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
# VPN configuration
Setup the YAMS binary
Now it’s time to set up the
yams binary. You need to replace some variables in this command, so proceed with caution:
- For the first line, the format is
/your/install/location/docker-compose.yaml. In this tutorial, the value should be
- For the second line, the format is
/your/install/location/docker-compose.custom.yaml. In this tutorial, the value should be
- For the third line, the format is
/your/install/location. In this tutorial, the value should be
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 "|"
If you have custom containers:
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.
Finish the upgrade
First, you need to stop YAMS. Run:
Copy the files to the correct locations
Now that you have all the changes ready for your setup, you can copy the files to the correct location.
Copying .env.example file
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
cp .env.example /opt/yams/.env
Copying the docker-compose.custom.yaml file
Now, copy the file to the install location. For the purposes of this tutorial, I will copy it to
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 place
This 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)
Run the upgrade!
Now it’s the time to execute the 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
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