Anyone have suggestions to install Discourse forum software in FreeNAS?

kingtj

Dabbler
Joined
Jun 21, 2011
Messages
26
I finally got NextCloud up and running, and configured how I want it, on my FreeNAS box. But now, I'm really interested in trying to set up a copy of Discourse, to act as message forum software for my NextCloud users. (NextCloud has an authentication plug-in that seamlessly passes NextCloud user credentials to Discourse, to make the two packages feel integrated together.)

I seem to be stuck on this one? The Discourse web site speaks of having everything packaged into a Docker file (Ruby on Rails properly configured and so forth), which they recommend using.

If I set up Rancher on my FreeNAS 11.2-U5 system and go to its web admin screen? I see where I can go under its "Admin" menu and "Settings" and add a custom catalog source. If I add their specified URL: https://github.com/discourse/discourse_docker.git

I just get "There are no compatible templates"when I try to select it under the "Catalog" menu to view it.

Am I going about this all wrong? I found a couple of message threads with a little bit of info about Discourse under FreeNAS but it sounds like they installed a full Ubuntu Linux install under a virtual machine and installed it through that? If you're still setting up docker/rancher inside that just to pull down and install Discourse, isn't that just duplicating what FreeNAS already does for you when you tell it you're creating a new Docker session as the VM type?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Set up a VM of your preferred flavor of Linux (probably Ubuntu Server), and within that VM, follow the instructions for the "official" Docker method.

Edit to clarify: The only way FreeNAS supports Docker (or has ever supported Docker) is by running it under Linux in a VM. The "Docker" VM template installs a preconfigured version of RancherOS, a specialized Linux distro for container management. And though I'm sure it would be possible to get Discourse running that way, you'd be working against the design of their system. Their design is to run under Docker, but for the installation scripts to be run on a general-purpose Linux distro. Thus, if you're going to be running a Linux VM anyway (and you are), just do a base Ubuntu Server 18.04 install and follow the instructions I linked above. If you really want to make it work under RancherOS, you'd probably be better raising the question over on meta.discourse.org.

Note, if you have a different hypervisor (ESXi, Proxmox, Xen/xcp-ng) available, you'd probably find it preferable to install your VM there.

Now, with all of that said, all of the underlying software will run under FreeBSD, and thus I'm sure it's theoretically possible to make Discourse run in a jail without the intermediate level of a Linux VM and Docker--but I think it'd be a lot of work for no good reason.
 
Last edited:

kingtj

Dabbler
Joined
Jun 21, 2011
Messages
26
Got it! I was a little confused about the "Docker" VM template and its purpose, I guess. After setting that up with RancherOS and poking around at it a while, it looks to me like it's something I'd never need for my purposes. (Though when I browse its "master catalog" of downloadable apps in containers, there's a lot of specialized stuff that I'm sure is useful for some people.)

I went ahead and selected "Virtual Machine" and installed Ubuntu Linux from a standard ISO image, and was able to get Discourse installed, following their instructions.

Only challenge I'm facing now? I only have one IP address from my broadband provider, and I have a Dynamic DNS host name registered to direct people to it. NextCloud, running in an iocage jail, is handling the web requests on ports 80 and 443 right now. So I wanted this VM with Discourse to be "integrated" so NextCloud can sign in to it via its Discourse SSO add-on and present its forum pages seamlessly to my NextCloud users.

It doesn't look like Discourse officially supports telling it to use non-standard ports, though. So not sure how to make this work? (I read where someone modified it to listen on a non-standard port like 8888 and redirect that to 80 -- but Discourse didn't obey that. Clicking the link to finish creating an admin user account, for example, wouldn't work properly.)


Set up a VM of your preferred flavor of Linux (probably Ubuntu Server), and within that VM, follow the instructions for the "official" Docker method.

Edit to clarify: The only way FreeNAS supports Docker (or has ever supported Docker) is by running it under Linux in a VM. The "Docker" VM template installs a preconfigured version of RancherOS, a specialized Linux distro for container management. And though I'm sure it would be possible to get Discourse running that way, you'd be working against the design of their system. Their design is to run under Docker, but for the installation scripts to be run on a general-purpose Linux distro. Thus, if you're going to be running a Linux VM anyway (and you are), just do a base Ubuntu Server 18.04 install and follow the instructions I linked above. If you really want to make it work under RancherOS, you'd probably be better raising the question over on meta.discourse.org.

Note, if you have a different hypervisor (ESXi, Proxmox, Xen/xcp-ng) available, you'd probably find it preferable to install your VM there.

Now, with all of that said, all of the underlying software will run under FreeBSD, and thus I'm sure it's theoretically possible to make Discourse run in a jail without the intermediate level of a Linux VM and Docker--but I think it'd be a lot of work for no good reason.
 
Top