Selfhosted Youtube Alternative On Unraid - Part 1
Next day update: I forgot a step and a minor config, sorry to the 2 friends who read this before I edited it.
I finally decided to look for some good video sharing systems that I could selfhost and I found MediaCMS to be the shiniest and prettiest. It's linked on the Awesome-Selfhosted list, and is open source. There are alternatives on that list that may better suit your needs, one I also considered was Peertube but I'm not fully happy with how it looks. I just got MediaCMS working, so I may later decide to switch to another solution but for now lets look at how to get it set up on Unraid.
I like Docker. Fortunately, MediaCMS comes with Docker install instructions! But for... docker-compose. Which Unraid doesn't come with a UI for, despite it being accessible in terminal. If you're like me, terminal stuff is annoying to you, especially remote terminal stuff where you have to send files over and then do things with them. But because the Unraid community is fantastic, there's a WebUI plugin for docker compose - see Ibracorp's great article on it here.
Docker-compose configuration for your server
Once the docker-compose UI is set up, you can just set up a new docker-compose "stack" and then edit the configuration and paste your selected docker-compose file contents into it. For MediaCMS I went with the standard docker-compose, but there are other options if you want to include other components. I have the other necessary components already taken care of with other containers, and did not need those configurations.
Next, you want to update your docker-compose file to work in your environment. I want my files to exist in externally-mounted directories just like the rest of my apps in my appdata directory so the first thing I did was go through and replace all of the volume locations with the external volume /mnt/user/appdata/MediaCMS/
I'm still figuring out how to move the media storage location. I'll figure it out!
Note that all the services seem to want to live in the same directory, except the database (db) container that I would suggest setting to a separate one just for cleanliness. I mounted the db container's volume to appdata/MediaCMS-db/
Set the port on the web container to an unused Unraid port. No custom network configuration is specified, so the web container needs a host port to listen to from its own default port 80.
Now on the migrations container, you want to uncomment out the ADMIN_PASSWORD
environment variable and add your own. This is the password for the admin login on the site, so make a good one.
You don't have to change any container names, the Unraid docker-compose plugin will preface them with the stack name on your container list. Once you're finished with the above, make sure you hit Save Changes. Then hit the Compose Pull button to tell your system to pull down all the images as needed. Once that's finished, hit Compose Up to run all the containers, or Compose Down to shut them all off. If you've used docker-compose before those commands should be familiar.
But before you hit that Compose Up button, there's one more step... The part that I didn't immediately notice is that MediaCMS assumes you have the website's code in the externally mounted volume. As far as I can tell, all you have to do is download or check out the root of the code repo on github into your appdata/MediaCMS/
directory.
Setting up and using your MediaCMS instance
This isn't terribly confusing and is semi covered in the github configuration docs, so I'll be short.
I pointed a reverse proxy to my site before continuing, but that's not necessary for internal LAN-only use and is a separate topic.
In your appdata/MediaCMS/
directory (you may have to give yourself permissions via the Unraid terminal if you access this from another machine), the cms/
directory contains a settings.py
file. This file contains a bunch of config settings for the site. To override them, you copy pieces out of the settings.py
file and insert them into the following file: /MediaCMS/deploy/docker/local_settings.py
I elaborate further on settings and configuration of your MediaCMS instance in my next post - Part 2!
That's all I have for now, comment if you have any questions and maybe I can look into them too!