Hi, I'm currently trying to set up Forumify on a friend's dedicated server running Windows Server 2022. Unfortunately Docker is not an option for us because we run several game servers and in my experience Hyper-V would degrade the performance of the machine. I have Apache 2.4 set up with PHP installed and we already have MariaDB running for MySQL. I don't necessarily need a step-by-step guide, but I'm completely lost as to what I need to download and put where to start setting up Forumify. I've been looking through your GitHub repos and I don't know which one has the production-ready files. I have some experience configuring Apache, but I've never worked with PHP before, so perhaps that's why I don't know what I'm looking for in the repos. I'm also wondering if Node.JS is required for production use, as I saw npm commands in a few of the files in the repos. If someone could point me in the right direction as to what needs to be installed it would be greatly appreciated. Thank you.
4 Jan 2025 at 11:34 PM
Edited on 4 Jan 2025 at 11:46 PM by jannes
Hi @Drift_91 ,
Before proceeding, I do need to give a huge disclaimer. We highly discourage hosting on Windows (outside of Docker or a Linux VM). Updating and installing plugins from the admin panel will not work,.. Not running in a virtual environment can also put the host at risk for vulnerabilities. While Microsoft's HyperV documentation claims degraded performance, in reality, anecdotal evidence with gaming setups says otherwise and it seems like MS is just covering their bases...
That being said, if you accept those limitations and risks,...
I personally do not have any experience hosting on Windows except for using XAMPP/WAMP or, yknow, using Docker. So below are the steps to get all the files and where to point the webserver (Apache, NGINX, IIS, whatever flavor you prefer).
You will need:
PHP 8.2 or above
Composer
Node (and NPM)
Git (optional)
Start by cloning the repository somewhere (or download the repository as a ZIP if you don't have Git)
The rest of the commands are all ran inside of the directory.
Then inside of there, use composer to install dependencies. It will install and prepare all the files for you.
$ composer install
Now install the frontend dependencies and build.
$ npm install --force
$ npm run build
Create a file `.env.local`, and inside of it, place the environment vars from the self hosting guide. You'll have to figure out the mailer part on Windows, never had to do this myself haha.
Now you should have all the files required to run forumify.
Create the database:
$ php bin/console doctrine:database:create
Install the schema:
$ php bin/console doctrine:migrations:migrate
Now everything should be set up on the application's end, just need to configure Apache..
The webserver needs to serve all files from the /public directory. Anything outside of /public should not be accessible at all. I don't actually know how this part goes on Windows, you'll have to check out some Apache guides on how to set up rewrites to /public/index.php.
Just want to re-emphasize the dangers of doing this. If you want to self-host to suppress costs, you can get a Linux VPS from reputable vendors like AWS, DigitalOcean, OVH,.. starting at like $5, but they usually don't have great performance and very limited storage capacity. Not to toot our own horn, forumify cloud is also always an option and provides a great package for the price without all the hassle :)
4 Jan 2025 at 11:58 PM
Edited on 5 Jan 2025 at 10:42 AM by jannes
Also, you need to run the message queue workers. They run scheduled jobs and asynchronous background tasks so the user is not waiting for an email to be sent etc.
In our docker image, we have 1 task worker, and 2 message queue workers. You'd have to translate this from supervisor to whatever the Windows equivalent is:
Hi, I appreciate the detailed rundown on how to set things up. However I think I'm going to heed your advice about hosting it on Windows, as it's clearly not meant to be run in such an environment. I'll have to test out the Hyper-V performance, as even WSL2 runs on a stripped-down version of Hyper-V that still breaks any type-2 hypervisors. My only experience with Hyper-V was on my personal desktop system, where everything just generally felt far less responsive, especially games. I'm not sure how Linux handles type-1 hypervisors, but Windows runs the OS kernel itself within the hypervisor, as if the host OS were a guest. Anyway, thank you for the help.
Hi, I'm currently trying to set up Forumify on a friend's dedicated server running Windows Server 2022. Unfortunately Docker is not an option for us because we run several game servers and in my experience Hyper-V would degrade the performance of the machine. I have Apache 2.4 set up with PHP installed and we already have MariaDB running for MySQL. I don't necessarily need a step-by-step guide, but I'm completely lost as to what I need to download and put where to start setting up Forumify. I've been looking through your GitHub repos and I don't know which one has the production-ready files. I have some experience configuring Apache, but I've never worked with PHP before, so perhaps that's why I don't know what I'm looking for in the repos. I'm also wondering if Node.JS is required for production use, as I saw npm commands in a few of the files in the repos. If someone could point me in the right direction as to what needs to be installed it would be greatly appreciated. Thank you.
Hi @Drift_91 ,
Before proceeding, I do need to give a huge disclaimer. We highly discourage hosting on Windows (outside of Docker or a Linux VM). Updating and installing plugins from the admin panel will not work,.. Not running in a virtual environment can also put the host at risk for vulnerabilities. While Microsoft's HyperV documentation claims degraded performance, in reality, anecdotal evidence with gaming setups says otherwise and it seems like MS is just covering their bases...
What about using WSL as the backend for Docker instead of HyperV?
That being said, if you accept those limitations and risks,...
I personally do not have any experience hosting on Windows except for using XAMPP/WAMP or, yknow, using Docker. So below are the steps to get all the files and where to point the webserver (Apache, NGINX, IIS, whatever flavor you prefer).
You will need:
Start by cloning the repository somewhere (or download the repository as a ZIP if you don't have Git)
The rest of the commands are all ran inside of the directory.
Then inside of there, use composer to install dependencies. It will install and prepare all the files for you.
Now install the frontend dependencies and build.
Create a file `.env.local`, and inside of it, place the environment vars from the self hosting guide. You'll have to figure out the mailer part on Windows, never had to do this myself haha.
Now you should have all the files required to run forumify.
Create the database:
Install the schema:
Now everything should be set up on the application's end, just need to configure Apache..
The webserver needs to serve all files from the /public directory. Anything outside of /public should not be accessible at all. I don't actually know how this part goes on Windows, you'll have to check out some Apache guides on how to set up rewrites to /public/index.php.
Just want to re-emphasize the dangers of doing this. If you want to self-host to suppress costs, you can get a Linux VPS from reputable vendors like AWS, DigitalOcean, OVH,.. starting at like $5, but they usually don't have great performance and very limited storage capacity. Not to toot our own horn, forumify cloud is also always an option and provides a great package for the price without all the hassle :)
Also, you need to run the message queue workers. They run scheduled jobs and asynchronous background tasks so the user is not waiting for an email to be sent etc.
In our docker image, we have 1 task worker, and 2 message queue workers. You'd have to translate this from supervisor to whatever the Windows equivalent is:
https://github.com/forumify/forumify-docker/blob/master/supervisor/conf.d/message_consumers.conf
Hi, I appreciate the detailed rundown on how to set things up. However I think I'm going to heed your advice about hosting it on Windows, as it's clearly not meant to be run in such an environment. I'll have to test out the Hyper-V performance, as even WSL2 runs on a stripped-down version of Hyper-V that still breaks any type-2 hypervisors. My only experience with Hyper-V was on my personal desktop system, where everything just generally felt far less responsive, especially games. I'm not sure how Linux handles type-1 hypervisors, but Windows runs the OS kernel itself within the hypervisor, as if the host OS were a guest. Anyway, thank you for the help.