Categories
Uncategorized

Nextcloud on TrueNAS

Since I started messing around with OpenMediaVault and TrueNAS Scale I have been experimenting with using containerized applications running on them. Some at easy to install and configure and some… are not. It’s also been really interesting to see the difference between how OpenMediaVault and TrueNAS handle them. OMV is more like “paste docker compose file here and edit it” and TrueNAS is more “here’s a long web page form, select things, fill things out and submit it” and both have pros and cons, but I’m here today to talk about Nextcloud on TrueNAS.

I should note my environment, even though it may not have a huge impact on things. Still, it’s worth a mention because every install is different. I use Nginx Proxy Manager to be able to use some of my hosted services on my home network outside of my own network. So while Nextcloud might be at 192.168.1.105 at my house, I might want to visit it at nextcloud.example.com from elsewhere in the world. (Assuming I have control over nextcloud.example.com, which I do not, because it’s just an example.)

Anyway, I used the TrueNAS “app store” to install Nextcloud. I had to fill out the form a few times to get things right. I made sure I noted any passwords I typed into the form. Eventually I got the form to submit and Nextcloud was deployed! I tried to visit 192.168.1.105:30085 in my browser (TrueNAS gives every containerized application a high port number, above 30000 so as not to conflict with anything else I guess) but it did not work. That’s okay…

One of the neat things about TrueNAS is that the web interface have a system shell built into a web page in the admin where you can type commands and do whatever shell stuff you need to.

Since I logged into the TrueNAS web admin as tnsadmin I was put into the shell as the user tnsadmin which can use the sudo command. So I had to edit the file Nextcloud config file found at /mnt/.ix-apps/app_mounts/nextcloud/html/config/config.php.

The config file has a line with 'overwriteprotocol' => 'https', which tries to force HTTPS. Since i was running on am IP address on my local network using 192.168.1.105 that caused issue because there is no cert for that. You can try to set it to use the TrueNAS certificate but that did not work and just kicked me from Nextcloud to TrueNAS in my browser… maybe because of the port number? I don’t know. I changed from HTTPS to HTTP with this 'overwriteprotocol' => 'http',

There is also this whole section on trusted_proxies I tried to mess with since I did plan on using a proxy. I ended up deleting everything I added there, and what you see below seems to be the default from the file before I made any edits. I don’t know if that is a default or was generated by my system. It didn’t seem to matter.

'trusted_proxies' =>
array (
0 => '127.0.0.1',
1 => '192.168.0.0/16',
2 => '172.16.0.0/12',
3 => '10.0.0.0/8',
),

Next up was trusted_domains which I did change.

'trusted_domains' =>
array (
0 => '127.0.0.1',
1 => '192.168.1.105',
2 => 'localhost',
3 => 'nextcloud.example.com',
4 => 'nextcloud',
),

The 192.168.1.105 is the IP address of the server, and nextcloud.example.com is the domain I’ll use with the Nginx Proxy Manager. After all this nonsense… it worked! (Again, replace nextcloud.example.com with whatever you might be using.)

Well, it worked as in I could get my web browser to the Nextcloud login page. I could not login though. I tried all sorts of usernames and passwords and searched for Nextcloud default passwords and that all failed.

I finally found this form thread Logging into Nextcloud App for the first time – Cannot log in as specified user with the solution. Back to the browser-based shell in TrueNAS to type this command:

sudo docker exec -it -u 33 ix-nextcloud-nextcloud-1 php -f /var/www/html/occ user:resetpassword ncadmin

I don’t know if it needs to be ncadmin but that was what I was trying to login with based on a different post I read. Luckily it asked me for a new password (twice) right on the command line, so I type a new password (twice) and after that I was able to log into Nextcloud.

That login became the admin user since it was the first to login so I made a user account for myself and was up and running with Nextcloud.

Oh, I should also note that while I changed the config from using HTTPS to HTTP, my proxy server has a certificate (from Let’s Encrypt) so when I visit outside my network using nextcloud.example.com https works as the reverse proxy handles the https part of things.

I should add one thing! It’s important! Everything above is about Nextcloud in the browser. It works for me in a desktop browser and in a mobile browser but not in the mobile application (yet!) I’ve got a list of posts and notes to follow up to get that part to work.

I have also not been able to get all of the Nextcloud “apps” (add-ons within Nextcloud) installed and configured yet. It’s… a journey I guess. Sigh…

Categories
Uncategorized

Diversity, Equity, and Inclusion at Gallery 69

A two color relief print with a blue and pink rainbow roll

I meant to post this back in February but things have been hectic. You may know I run a Free Little Art Gallery called Gallery 69 where we (surprise!) give away art for free. Well, it’s mostly been my art because I’ve made a lot and have it on hand. If you scroll through old posts though you will find other artists who have contributed.

But here’s the thing… now more than ever, we need more diversity.

I’d like to help curate a gallery that includes artists who may currently be underrepresented. Listen, I’m an old, white, straight man. I want to help share art from those who are not old, white, straight because face it, we’ve had it pretty good for nearly, well… forever.

It’s not much, but we’ve all gotta do whatever we can. I will write blog post about the art and artist, put the art in the gallery, and try to pay some cash to artists.

Thanks to a (small) budget from a few friends I have a little bit of money to do this, and I started talking to one artist but they never got around to sending me any art. I had offered money and even offered to make physical prints of their digital work, but hey, sometimes email go unanswered, people get busy… I get it.

So I’m about to email a friend, and I’ve written this post to help hold me accountable.

Finger crossed this works… I’d like to help where I can, and this seems like a simple thing, so let’s do it!

(And if you want to help support this effort, get in touch with me!)

Categories
Uncategorized

HP Z420 RAM…

When I got the HP Z420 Workstation it had 4 sticks of RAM for a total of 16GB, except it got an error booting up and removing one stick seemed to fix it, though being down to 12GB seemed a little low since I plan to run a number of applications via containers. I took a gamble and ordered more RAM. I got these A-Tech 8GB PC3-12800E ECC sticks from eBay for $20.

As I’ve previously mentioned I’ve never built a PC, and my experience working on computers is (mostly) in the Apple world. I learned about ECC (Error Correction Circuitry) RAM and I did some reading on A-Tech. Consensus seemed to be that A-Tech RAM is cheap because they are most likely rebranded sticks from well-known brand name RAM manufacturers that may have failed one of their quality control tests. Eh, I figured I’d give it a try.

I added the two 8GB sticks in, and actually put all the RAM in the slots in the order specified for the machine. Things ran okay for a day but when using the system through the web interface it locked up… I had to hard reboot it, something I haven’t had to do at all since I got it running. I figured maybe the new RAM was the issue but the RAM testing stuff I looked up was for Windows… I didn’t know how to do the test with TrueNAS, which isn’t very supportive of just installing random command line stuff.

Folks recommended MemTest86+ which boots right into the testing application. Nice!

The MemTest86+ ISO was tiny, under 7MB! It flashed to a thumb drive almost instantly and I booted up to the testing. I had pulled out all the ram except the two new 8GB sticks and tested for hours. It passed everything. I rebooted, ran everything again for a few hours and all tests seemed good. I then rebooted back into TrueNAS and it’s been running without issue for a day now… but I will keep doing some testing to be sure.

There is a chance that the difference between the 8GB and 4GB sticks is causing issues, so I am hesitant to add the smaller ones back in… I will probably just run with the new 16GB total for now and if needed I could always get two more and kick it up to 32GB total.

Oh! I learned one more thing about TrueNAS. I guess it will use most of the “free” RAM for the ZFS cache but that will drop down as applications need the RAM. This is much different from my OpenMediaVault NAS which has 16GB of RAM and shows 12.91GB of free RAM…

Categories
Uncategorized

HP Z420 Progress…

Hey, I don’t know anything about computers! Just kidding, but when it comes to “PC hardware” it sometimes feels like it. We got past the previous setbacks and progress is being made. One thing I forgot to mention in the last post is that I could not get all six drives to mount. I thought it was a bad SATA cable so I ordered three more.

About those SATA cables… The computer had four, I ordered three more, and I had that crappy one that destroyed the SSD which I could not use, so I thought there was a bad one but it turned out there was not! No matter, I needed the right angle ones anyway. (So now I have 6 brand new ones along with the four that came with the computer. Good to have spares I guess.)

So what happened was that I did not realized the computer actually had 10 SATA ports! Yeah, not 6, but 10. Though there only seems to be power supply connections for 6 drives, so… But here’s the thing, two of them do not seem to work. So while I thought I had a bad SATA cable, or a misbehaving drive, two of the ports do not work. (The two bottom white ones.) I switched to the two block ones slight above the white ones and all six drives showed up!

Now there only seem to be six power connectors so six drives connected make sense, but there might be a way to use more of them. Also, I’ve read that the ones that do not work might be disabled in the BIOS, so that’s something to look into. Oh, I guess the SATA ports are a variety of different speeds as well? So I also need to figure that out to use the faster ones…

But hey, I’ve got six drives mounted and used by TrueNAS right now. The front (external?) bay is still a mess, but I’ll work on building something there to hold the drives now that everything actually works. (Well, more or less.)

Huzzah! Six drives. And yes, I did replace the SSD that got destroyed. Ended up with a 128GB since that is still plenty for the TrueNAS system to live on. I’ve got another post coming to talk about using TrueNAS and how it’s going on the software front.

Categories
Uncategorized

HP Z420 Setbacks…

I found some 3D models for hard drive caddies and one was not great and the second was not great but okay so I tweaked it a bit. Still not perfect, but good enough for now.

I was able to get the three large hard drives in place and connected. Not bad.

I put the smaller drives into the large front-accessible bay and things looked pretty good…

I figured I would deal with the large front-accessible bay next, eventually building something to properly hold the drives…

And then I noticed the top piece had two little caddies for small drives so I put the boot SSD in there along with another drive.

That’s when the bad happened.

I had this straight (not right angle) SATA cable in my cable bin and maybe it was too stiff, or maybe I pulled to hard on something, but whatever, the SSD I got less than two months ago had the plastic connector housing torn off, and stuck inside the cable end.

I tried to reinsert things and reconnect, but after a half dozen attempts it was pretty clear it wasn’t going to boot.

I’m a bit bummed about the destruction of a brand new SSD. (It was only $20 but hey, $20 is $20.) I have a super-cheap SSD I pulled from the dead OptiPlex that I’ll use for a replacement until I get a new one. (I looked up the brand for the super-cheap SSD and all I could find was comments saying it’s garbage hardware to avoid.)

Anyway, this is just a minor setback, and a small increase in the price of this build. I think we’ll still be pretty close to my original estimate for three 4TB drives in this TrueNAS box for under $180 USD.