Category: CasaOS

CasaOS – Upgrading Containers

Update: As of the latest iteration CasaOS has an option to “Check and then update.” However, when I ran it against PiHole, which needed an update, it came back claiming current. So… these instructions still stand for the moment.

As of the current iteration of CasaOS, there’s no way to one-click yourself an upgrade on a container. Or, rather, there is, but only sort of. It’s all about how the container installed initially.

To check, pull a config file from the container in question:

  1. Settings > choose Export ComposeFile
  2. Open the file in your text editor of choice and search for the image: line. If it says something like “latest” or “develop” you’re good to go:
  3. In this instance, all you need to do is click Save in CasaOS and the latest image will be pulled down and installed. But wait! Keep reading before you do so! If nothing else, jump down to step 7.
  4. If the image has a hard coded version number, you’re going to need to change it to “latest” and save the YAML (as a different name, or take note of the version number, just in case you find you need to revert):
  5. In the event you’ve had to  update your compose file, now comes the sweaty bit. You need to uninstall the app from CasaOS. If you’ve mapped all your data volumes correctly, this should be fine. Just remember to uncheck Delete userdata when prompted:
  6. Once uninstalled, reinstall the app:
    1. Select App Store, then Custom Install
    2. Select the Import icon on the top right and select your YAML file.
    3. All the settings will be loaded in – confirm them and let ‘er rip.
  7. Now, if you’re making a big upgrade, or an upgrade to a big app, things can get pinchy here for a bit. For instance, I upgraded Navidrome, my music server, and CasaOS barfed a message at me saying something akin to the container being unwell. I run PiHole in the same CasaOS instance, and I noticed that my browsing/DNS resolving had become profoundly slow. CasaOS’s nifty little stats didn’t show anything exciting insofar as resource utilization, but the CasaOS page was also profoundly slow and sluggish. I pulled up the terminal for Navidrome and discovered this:
  8. Now, I have a lot of music. A LOT. So I SSH’ed into my device running CasaOS and navigated to the data directory for Navidrome to discover this:
  9. Navidrome was indeed hard at work upgrading its ridiculously large database – as I refreshed I the timestamp on the db-wal file would continue to iterate.
  10. Eventually the database upgrade finished, Navidrome loaded, and the container was healthy and upgraded.

The moral of the story is, be patient! Don’t freak out if CasaOS delivers some kind of ominous warning – dig deeper before doing  something drastic, like killing a running container in the midst of upgrading a critical database. I suppose you could be double safe by making a backup of your apps data directories before attempting an upgrade. I live on the edge. I recommend going through all your containers and updating all of the ones using hard-coded versions with something like ‘latest.’

Jellyfin – Migrating Users

I’m moving from a Windows based instance of Jellyfin to a containerized instance within CasaOS, and I wanted to preserve user data (including view history). Here’s how I did it:

  • Confirm both your source and destination Jellyfin are the same version
  • Export the UserDatas table from library.db for your source instance. You can use DB Browser for SQLite to achieve this – remember to check “Column names in first line”
  • On your destination server, make a backup of library.db and jellyfin.db
  • Again using DB Browser, open the library.db of your destination server. Drop the UserDatas table and import csv created in the prior step to recreate the table (remember to check that the first line contains the column names)
  • Copy jellyfin.db from your source server and overwrite the db from the destination with it. This is important, as this file contains user history data
  • Fire your new Jellyfin instance up and attempt to log in with an existing user


CasaOS and LinkDing

Giving LinkDing a whirl. It isn’t featured in any of the stores I’ve found, so I rolled my own. Here’s a sample YAML:

Once it’s up, hit the terminal and create a user with:

From there it will prompt for a password.

Persistent Windows SMB mount in Raspbian via CIFS

I’m using Navidrome in CasaOS on a Pi for music right now and I like it quite a bit. The one thing irking me was that the network storage mounts you can define within CasaOS (Files > Location > Connect network storage) don’t persist. At least they don’t for me – every reboot or update and they’re gone.

I’ve gotten around this by creating a persistent mount within Raspbian utilizing CIFS.

SSH into your Pi, and go ahead and

to avoid having to sudo every line you input. First, make sure cifs-utils are installed (they should be, but still):

Now create a credentials file for your mount to access using nano:

Populate the credfile with the credentials necessary to access your Windows share:

Save it, then set the appropriate permissions to keep it safe from prying eyes:

Create a mount directory on your Pi to link the share to:

Now open fstab:

Add your mount to the bottom of the file, changing the first path to the Windows share and the second to the mount path you created previously:

Finally, reload the daemon:

And mount the share using the details you defined in fstab:

To confirm, cd to the share and confirm you can see the contents.

Calibre Web in a Container, and Credentials

My Calibre Web installed via container in CasaOS decided to lose its admin account creds. To reset, access the container terminal from within CasaOS, navigate to:

and enter:

Where password is your updated passy. If you try to use ‘password’ you’ll probably be kicked back for it not meeting complexity requirements.

CasaOS and Caddy

Briefly – Caddy wouldn’t work out of the box for me on CasaOS. In this build, the default container path for the caddyfile is incorrect. Change the container path from


Also, don’t forget to adjust ports, our you’ll inevitably be running into CasaOS itself. I changed my HTTP ports to 85:

Then you can SSH into your CasaOS Pi, head to /DATA/AppData/caddy/caddyfile, create your Caddyfile, er, file, and populate it appropriately. If you’ve been running Caddy elsewhere, I recommend running the below to confirm your file’s format:

CasaOS and bash in Docker

I installed ArchiveBox on CasaOS and came upon a problem – I couldn’t figure out what the default credentials are, or even if there were any, and I didn’t know how to generate them from the command line. ArchiveBox told me to create a new superuser by running

From the command line, but doing so within the container terminal resulted in this:

But I found my way into the container bash thusly:

  • SSH into your pi running CasaOS
  • search for your ArchiveBox container ID:
  • You’ll see a path in your return with a long, long directory name, something like
  • This is your container ID. CD to /var/lib/docker/containers/and run the following, where containerID is the above ID:
  • This will invoke a bash within that container. From within it, run:
  • And follow the prompts to create a superuser for ArchiveBox. To drop out of bash, just input exit.