Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Wanting to install Mastodon alongside my website

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
DebbieMebbie
Posts: 2
Joined: 2022-11-26 08:41

Wanting to install Mastodon alongside my website

#1 Post by DebbieMebbie »

Hi I want to install a mastodon instance alongside my website

Something like mastodon.mywebsite.com

I was wondering if there were any guides. I've been looking at installs and they seem to use Nginx and postgres database or docker

Would it be possible to install it using Apache?

codejp3
Posts: 24
Joined: 2022-12-28 06:29
Been thanked: 2 times

Re: Wanting to install Mastodon alongside my website

#2 Post by codejp3 »

99% of the people running Mastadon instances are NGINX or pre-configured Docker (still using NGINX).

Everything you have to do setup-wise for NGINX can "translate over" to Apache, but it really comes down to how comfortable you are with Apache config, and understanding the conversion between NGINX/Apache.

Here's a GitHub repo I found that should help get you started. It has some sample code for Mastadon on Apache.
https://github.com/indie/mastodon/blob/ ... AMPLE.conf

It should help greatly with figuring out conversions from the "nginx/site.conf" configuration file over to the "apache/site.conf" file.

As far as I know, PostgreSQL is the only supported DB engine for Mastadon. Maybe you could get MySQL/MariaB to work, but it's another "layer of separation" from the intended install/supported method.

Also, you'd still have to install things such as NodeJS, Ruby on Rails, and Redis.

Point is that there's a lot more at play than just a difference between Apache/NGINX. Many of those things have to be configured to play nicely with eachother for the Mastadon instance to work properly and smoothly.

It is possible, yes. But it is not a simple task, and I'm not sure most web masters out there would be up for the challenge.

Good luck if you pursue it! If you get stuck, you can always reach out and ask questions about specific issue you run into.

codejp3
Posts: 24
Joined: 2022-12-28 06:29
Been thanked: 2 times

Re: Wanting to install Mastodon alongside my website

#3 Post by codejp3 »

I'll add a little more input on this topic as a experienced webmaster and server administrator myself.

Apache & Nginx can both be installed on the same server and work with each other, or independently of each other. I say that because it seems like Nginx is your primary issue with getting Mastadon up and going.

Similarly, MySQL/MariaDB & PostgreSQL can both be installed on the same server and have no effect on each other. That seemed to issue #2 for you.

The determining factor as to whether you can do that or not is your hosting plan. If you're on a shared host without root/admin permissions, forget it. Mastadon will probably quickly exceed your hosting limitations anyways, even if you could change the proper server settings (and you most probably cannot on a shared hosting plan).

If you are on VPS or dedicated server plan (or own your own like me), then you can absolutely run Apache/Nginx PostgreSQL/MySQL all at the same time on a single server. The key difference is going to be how you install PHP. It has to be in FPM mode, which Nginx requires, and Apache handles just fine. Shared listening ports could also pose a problem, but that's easy enough to setup to prevent those issues.

With the right setup, you could comfortably stick to the traditional Apache hosting for your main site that you're used to, and give Mastadon everything it wants as part of the standard install. You may even want to leverage the wonderful proxy capabilities Nginx has within your Apache setup.

Point is, you have options if you're not on an econo-shared-hosting plan with limitations.

If you are on a shared hosting plan, upgrade to a VPS, or look for other hosting options that include everything Mastadon requires. Probably not worth trying to pursue an "Apache alternative" setup when the hosting plan itself has limitations that you'll probably surpass pretty quickly in the first place.

Hope this input helps! Again, good luck!

Post Reply