Need support from web server and MySQL and ...

Hello Community,
my current QNAP NAS is outdated and no longer receives updates. Therefore, I decided to go for a new NAS—one that I built myself this time.

The motherboard is a J5040-ITX with 8GB RAM, a 1TB SSD, and 2 x 8TB HDDs (configured in RAID as 8TB total storage).

I already have some experience with Linux, so I chose TrueNAS Scale as the base system.

Now, TrueNAS is running, and Nextcloud is also operational. I’ve installed collabora as well (it was recommended in various forums when setting up Nextcloud). However, when I access the web portal, it asks for a username and password. Unfortunately, the credentials are not accepted, even though I entered them correctly. It’s not a big deal so far, as Nextcloud is running fine, and I don’t currently miss collabora.

The problem is that I’m not making any further progress with my installation. On my QNAP, I had multiple websites and MySQL databases set up. For two weeks now, I’ve been going around in circles—installing and deleting—and I’m just not getting anywhere. I can’t get TrueNAS to work as a web server or MySQL server.

Using FileZilla, I can transfer my HTML/PHP files into the /var/www/html/ folder, but I still can’t access the content in a web browser.

As for MySQL and phpMyAdmin, I’m completely stuck.

Since my English is poor, I’m also struggling to make sense of information in English-language forums.

Could you please give me some tips on how to set up my server for the following purposes:

  1. Web server (HTML/PHP)
  2. MySQL server (or MariaDB as an alternative)
  3. Nextcloud
  4. Data storage (NAS)
    Later, I might also want to:
  5. Use it as storage for my surveillance camera
  6. Set up a photo viewer

Yes, it’s quite a wish list, but I had all of this running reliably on my QNAP.

I’d greatly appreciate any suggestions or links to resources on this topic. I’ve already experimented with AI but unfortunately haven’t made any progress either.

Thank you in advance for your support!

Best regards, Robert

  1. Base system looks OK except that you will need more memory (1GB should be sufficient - but more would be better) if you are running apps, and you really need another small SSD for your boot drive (because a 1TB SSD for boot is a waste of almost 1TB), and then you can use the 1TB SSD for an apps pool (and replicate it to SSD as a backup).

  2. If you are running Core or Scale Dragonfish, you should be starting with ElectricEel.

  3. You should NOT put anything in your boot drive (and /var/www/html is). And the web server that comes with TrueNAS (on port 80) is only for the TrueNAS UI.

    So I think you need to create a dataset on your SSD apps-pool to hold your web site(s), and you will need to set your apps pool as the location for your apps, and install a Docker apps or a Docker compose file for a web server / reverse proxy, for php, for mysql etc. i.e. whatever you need for your web site.

Thanks for the quick reaction.
The hard drive is an M.2 SSD 980 PCIe, mounted in a PCI Express bus controller.
So far, I have only installed the TrueNAS image in the fastest and simplest way, without paying any attention to the partitioning of the drive. Proper partitioning of the hard drive would, of course, result in a significant performance gain.
It’s possible that I may have overbuilt my system a bit, but with this new setup, I wanted to ensure it would be future-proof.
Now, regarding the installation:
During my research, I frequently came across Docker and Jails. However, I haven’t learned much about them, and even less about their installation. Both are essentially types of containers where I can install specific apps. I found a fairly detailed guide for setting up a web server in a Jail, but it’s based on TrueNAS Core. Due to my limited but still existent Linux knowledge, I opted for TrueNAS Scale.
I’ve also experimented with OMV (OpenMediaVault) but found the system relatively buggy and unstable. That’s why I returned to TrueNAS.
As a pure NAS machine, TrueNAS impresses me greatly, but for extended use cases, the system is not beginner-friendly at all.
I do a lot of programming and am fairly familiar with hardware. I would rate my knowledge somewhere between beginner and moderately proficient. What I lack is experience with containers (Docker, Jails). Moreover, Linux in TrueNAS is very stripped down. My first step would be to install Midnight Commander (mc), but that’s not easily possible on this system.
I simply need to read up on Docker/Jails, and eventually, the installation will surely work out.

You can partition your boot drive and make use of the rest of it but…

  1. You can do this only when you install TrueNAS. You boot the install stick, drop into command line and make a small edit to the install script, then you continue the install as usual.

  2. This configuration is not supported by iX - but I did it with my server and it works fine and every normal version upgrade I have done worked just fine too. The only issue is that if you need to reinstall then you have to be very very careful that you don’t reinitialise the whole drive and lose your apps pool.

  3. As far as a web instance is concerned a Docker LAMP image is a pretty common requirement so someone will have done it before - a bit of research might be a good way to go. One source you might want to look at are PHP or Spin docker images by Server Side Up (not used these myself but I have been watching them with interest). But a google search for “Docker LAMP” will bring up quite a few solutions too.