Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to run instances without deep system changes and external dependencies #9488

Open
MirceaKitsune opened this issue Dec 10, 2018 · 7 comments
Labels
suggestion Feature suggestion

Comments

@MirceaKitsune
Copy link

I've wanted to bring this up for a while, as I consider it a major limitation for people wanting to set up their own Mastodon instance. I took a look at the instructions which can be found over at:

https://github.com/tootsuite/documentation#running-mastodon

As a software developer and long time Linux user, even I had to make an immediate remark: The required steps are very complex! Not only that, but they require access to some deep system functions... such as a custom system user, and most of all custom systemd services which are a very high level thing that no casual application should ever need to touch. I believe the complex and intrusive requirements pose a barrier and make it harder for more people to create instances.

For this reason I wanted to propose a long term but noble goal: Cutting down on all the complex requirements, until eventually Mastodon can be bundled into one app that people can download and run. This does not mean the existing way of running an instance should change, my suggestion could exist as an alternative download. I only believe we should have something among the lines of "download this zip archive and unpack it, configure your instance by editing config.cfg, then start mastodon.exe and let it run in the background"... no extra dependencies, no customized users and systemd services, no other daemons having to run on the system, all self contained and ready to run at once.

Obviously this does not include things the user will have to do manually, such as opening the right ports in the firewall or getting a domain name registered with a DNS host of choice. It only refers to the possibility of running Mastodon without having to configure other system components separately.

@MirceaKitsune MirceaKitsune changed the title Ability to run an instance without deep system changes and external dependencies Ability to run instances without deep system changes and external dependencies Dec 10, 2018
@danhunsaker
Copy link
Contributor

Most OSes don't allow programs to listen on port 1023 or lower without system level permissions on the user starting them. That means both 80 and 443, the ports used for web servers. As to the complexity of setting up a web server - yes, it's a lot of work, because there are a lot of moving parts involved. Running a web site isn't actually all that simple. Doing it on Windows is an exercise in insanity (topic for another time and place, though).

If you really need simple, check out the alternative deploy strategies, such as Heroku or Nanobox. Either will automate the setup for you, even locally (though of course there are some hoops to jump through to get that visible to the Fediverse). Ultimately, web applications like Mastodon aren't intended for use on your desktop in the first place, so it will never be as simple as "run in background" on your regular system.

@MirceaKitsune
Copy link
Author

From what I'm aware, any application can listen on any port. If that weren't the case even setting up a game server would require deep level system changes. The only thing you indeed need to do is open those ports in both your firewall and your router, which is a more common procedure.

The rest depends on how one sees the process of being a server admin. Indeed most people who are serious about setting up a website need to configure a special machine for this purpose. But there are also those who set up casual servers, as is often the case for gaming (different subject though). Accessibility would be greatly improved if a download-and-run bundle was also available.

I noticed there are a few different ways of running a Mastodon instance. From what I saw, all of them involve relatively complex steps and also require root system changes. It's still not something the more casuals users have as an accessible option.

@danhunsaker
Copy link
Contributor

danhunsaker commented Dec 11, 2018

Most userspace servers use ports well above 1023 - the max is 65535, so there's a good deal of space.

Otherwise, you must be talking about Windows, because Unix/Linux have never allowed unprivileged users to listen on the lower ports - and even macOS is Unix at its core.

But, again, web servers are always going to be more complex than drag and drop, and the sites that run on them even more so. This simply isn't a "casual" piece of software.

@twome
Copy link

twome commented Dec 12, 2018

Making the installation process automatable and as hassle-free as possible - i.e., focusing on the UX of administrators as well as users - will be vital in the long-term for the federated ecosystem to blossom and, in return, for the userbase to grow. Good UX doesn't need the unhelpful "serious/casual" dichotomy; automation doesn't necessitate a "black box"-style removal of control or customisation.

Indeed, almost every single line of the current installation guide is a CLI command or some textual configuration, which currently must be manually copied & pasted by sysadmins. Basically, the whole thing could be automated, right now, with a careful & interactive Bash script that has root privilege. All users should need is a fresh Ubuntu VM. I'm not great with Bash but would be happy to work on a pkg'd Node interactive installer (internally running child processes that execute Bash shell commands) that guides users through what it's doing, and can optionally do everything from a single config file. Let me know if this is something the Mastodon team/community would approve of.

@MirceaKitsune
Copy link
Author

Another point I'd like to focus on is the ability to run Mastodon without having to make root system changes, nor create another system username: Do it all from your normal user account. Apart from having to open ports in the firewall or allow higher ports in the system, can this be achieved?

@deutrino
Copy link

deutrino commented Jan 4, 2019

Something like Docker is a far more realistic solution to the problem of deploying a giant hydra of a Rails app with over 9000 dependencies.

@MirceaKitsune
Copy link
Author

I hear Mastodon can be ran on Docker, which I'm still in the process of getting more familiar with. Maybe at least the Docker version can benefit from ease of use? So if you have Docker running you can simply deploy Mastodon on it, adjust its settings in one place, and it works.

@Gargron Gargron added the suggestion Feature suggestion label Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Feature suggestion
Projects
None yet
Development

No branches or pull requests

5 participants