ISP in a box v2

Please note that this information is no longer up to date. The content of this site has moved to a new domain DIYMacServer.com which is kept up to date. Apologies for the inconvienince.

This is a complete installation and configuration guide for changing your Mac mini (or any other Mac) into a full blown internet connected server to be used for all your needs at home for yourself, friends and family. When finished it will be your web, mail and more server which you can connect to the internet at home using your broadband connection or have it located in a hosting datacenter like macminicolo.net.a Mac mini

You could compare it to the “ISP in a box article” on Mundy.org’s Nerd Vittles but I think this one is better. Why ? Because my setup will allow you to setup virtual domains for the web and mail. This will mean you can become the family and friends mail and webspace provider. Host their sites and provide them with e-mail services like a proper ISP.

If you follow these documented steps you’ll end up with a Mac which you can use to host your and your friends websites by using an Apache2 based webserver which uses PHP 5 and can talk with a MySQL 5 database. This means you can install most PHP/MySQL based applications like for instance blogs or forums like WordPress and phpbb. You are also able to provide mail services for them with unlimited mailboxes, domains and web-based email services using Roundcube.

The pages will guide you through the basic setup, the blog posts are more about little tweaks to configurations, updates and extra’s.

Note: If you just want to host one website and receive just your own mail you’re better off with Mundy.org’s Nerd Vittles setup because that setup is a simpler. You, for instance, don’t need any UNIX skills and type difficult commands in the Terminal.

Before you get started this is what you need to have.

First up the MAMP application stack:

Next the mail server:

For some easy web based administration of your mailserver:

And last but not least a spamfilter to root out those viagra ads you don’t need:

If you need webmail you might like roundcube.net’s webmail software, I’ve blogged about it several times, on installing and upgrading. Just look at the posts in the Roundcube categorie. Please note that this software is still in beta.

If you liked this documentation and used it to your advantage I would be very pleased if you would express it and supported this site. All donations will only be used to support this site and not for personal gain.

22 Responses to “ISP in a box v2”

  1. mullzk Says:

    as this is my first comment here, let me first congratulate and thank you for your work – really just great.
    regarding the title “ISP in a box”: in my opinion ISP is used more often in the area of Internet Access Providers, even if this is a historical misconception. At least in Switzerland, the provider of Web-Space, eMail, Database etc. is refered normaly as Hosting Provider, although this isn’t really accurate as well.
    So I would rather go for a MiniHost in a box or something else in this direction. I like the “in a box”-thingy, but ISP remainds me of Modem, PSTN etcetc.

    But once again: Thanx for your articles, I’m preparing to rebuild my Public Server (on a cube instead of a mini) in the next weeks and already know that I will happily follow much of your tips, especially regarding postfix…

  2. Ryan Says:

    I agree with what mullzk says. You are not building an ISP. What you are doing is considered a “hosting provider”. ISP has traditionally been internet access. IE: The people who provide YOU with internet access.

  3. Derek Says:

    Going to have to concur with these other guys. Stop tossing around the stupid term Web 2.0. Stop talking about how awesome AJAX is. Stop calling webhosts ISPs. Stop the fucking hype.

    A webserver that ‘understands PHP5′? That doesn’t even make any sense. You configure it so that php pages are executed/compiled by PHP, whether in standalone or mod_php form. Stop making up stupid terms for things you barely understand, and use the proper nomenclature so that people with a genuine want of knowledge can seek it effectively instead of finding pages like this that are full of catchphrases and manager-speak. All you’re doing is confusing a process already documented much better elsewhere. Good day.

  4. Richard5 Says:

    Ryan, I agree with you totally. It’s not the best description but somehow most people understand the meaning of it. I didn’t start using the phrase “ISP in a box” others did that (like Ward Mundy) and used it for the same thing as I do. If you have a better (better than “hosting provider”) catch phrase, that I can use I’m willing to change.

    Derek, I’ve read the page over and over but I can’t find the phrases AJAX and Web 2.0 anywhere. I agree on the PHP5, understands is not the best term. But as an excuse, I’m not a native English speaker so I will write things down in a less than perfect manner. I’ve changed understands into uses, hope you can live with that. The documentation is and was targeted at non expert, if you are an expert on using this stuff there are other websites better suited to help you out. Just wanted to present a simple setup and explanation for people to get started.

  5. Tobias Says:

    Thanks for the post. I’ve been thinking about building a personal webserver and installing wordpress for some time now. I just read about MAMP and this post is a great little guide when I’m ready to start to build.
    I’m not too sure where Derek’s hostility comes from. Perhaps instead of belittling he might try to educate, provide links to more complete information, etc. But with that being said he does remind me that I need to learn more about the relationship between each piece of software if for no other reason than system and network security.
    Thanks for the post.

  6. jlandau Says:

    People, chill out! If you don’t like what this author HAS FREELY PROVIDED TO YOU, then don’t read it. Just move on to someplace else.

    I myself really enjoyed the first version of “ISP in a Box” and I’m curious to see how version 2 will shape up.

    It’s easier to critique than to create. If you believe somebody’s content is inadequate, prove it by creating something better. Until then…

  7. Michael Says:

    Derek’s hostility probably comes from being called “Derek”. See, nobody’s called “Derek” any more.

    “Hi. What’s your name?”
    “Derek.”
    “WHOOOOOOO-hoooooooo heeeeeeaaaahhhahaaaROTFL”

    It probably gets old very fast. Poor, poor Derek.

    As for ISP-in-a-box: excellent. Thank you.

  8. Cass Says:

    Michael (perhaps not to be confused with “Mike”? (grin)) — Great post. Good to see you have not only thick enough skin to be posting on the web, but a good sense of humor as well. Ditto to what jlandau says…

  9. Cass Says:

    OK, so Michael’s not the author (too many tabs open in Firefox (smiling again)… but Richard, take note of Michael’s post for future reference. Some of these folks need to get a life… Keep posting great things!

  10. Richard5 Says:

    Everybody, thanks for the heart-warming comments.

  11. rashantha Says:

    it would be great if spam assassin and clam was added to this instruction set.

    i will attempt this my self.

  12. Thom Says:

    I found this information to be awesome. Thanks. But where do you suggest we go for help? It would be super if you had a forum for this. The reason is, I am having mail problems and don’t know if it is Postfix, Imap, Courier…. and don’t know where to start.

    Keep up the great work…
    Thom

    Richard: Check the menu at the top for the forum or go to http://forum.richard5.net/

  13. Gary Says:

    Nice article. Shame about the pedantics squabbling about the terminology. I’m setting uo a server for mostly Windows users on my mac. I found your site very very helpful.
    Esp. as you are a none English speaker. My apologies on behalf of the english speaking world. I know what it is like to speak two languages.
    Cheers

  14. Dave Says:

    Okay. I think i got now everything up and running, even with ssl encryption. i just discovered one very strange behaviour…. courier-imap seems to handle “trash” a bit different.. at least i am not able to access my “trash-can” with apple mail like it was possible before using a lame windows imap server :-)

  15. Jeff Says:

    Richard:

    Really good set of articles and advice…There are a lot of us doing the same things and wrestling with the same issues, and the experience you provide here is invaluable.

    One question: You give some instructions for launching mail services at start-up (automatically) and a few other related items. Are these instructions applicable to 10.3 or 10.4, since the start-up model changed drastically in 10.4?

    I’ll also add a comment here on my experience which I think differs from yours. There is really no need to compile Apache, MySQL and PHP to so what you are trying to accomplish (and what I and others are trying to accomplish).

    If you use the Apple-shipped Apache and PHP, they will do everything you need. (I know – they did for me for a long time). If you feel the need to upgrade PHP (a good idea), you can use Marc Liyanage’s package (currently 5.2.0) which works perfectly well, and is configured for the Mac environment (and comes in a Mac-style installer). Marc also distributes Apache2 binaries.

    MySQL works better when it’s installed using the mac installer from mysql.com. I don’t know if your configuration works better, but I have found no limitations to the standard mac version – have you?

    You do, however, need to re-compile postfix for MySQL support – I haven’t seen anyone who provides a package, and Apple does not provide that support. For anyone running a multiple-domain server in any model, this seems necessary.

    However, you also note (in an old post) that postfix as provided by Apple does not support virtual domains. It does. It works fine for me based solely on the recipie in the postfix.com docs. However, UW-POP and UW-IMAP don’t out of the box – they require reconfiguration to do so, and the only configuration they accept is at compile time – there is no run-time configuration.

    So I agree with your postfix/courier choice…and I thank you again for all the expertise and experience you are sharing with the mac community!

    Oh, yea, the questions I had (buried in that tome):

    1) are you start-up instructions applicable to 10.4+
    2) have you found any limitations to the apache (apple provided), MySQL (mysql.com provided) and PHP (Marc Liyanage provided) that caused you to re-complile yourself?

    Thanks!!

  16. michael Says:

    Has anyone had any experience with a heavy load? Digg or Slashdot effect? I’m curious to see how the mac mini holds up. Granted, it depends a lot on your connection.

  17. Joe Wagner Says:

    Hi folks,
    I came across this website from recommendations from the Stalker.com’s SIMS mailing list. Just wanted to clarify that, at least as far as U.S.A. law goes, “ISP in a box” is accurate, in as much as it enables you to become a Provider of Internet Access Services. That, for example lets you sue under the Federal (“Yes, you”) CAN-SPAM Act of 2003.

    Specifically, in CAN-SPAM an Internet Access Service is defined by the act as:
    “INTERNET ACCESS SERVICE- The term ‘Internet access service’ has the meaning given that term in section 231(e)(4) of the Communications Act of 1934 (47 U.S.C. 231(e)(4)).” (15 U.S.C. § 7702(11))”

    So, turning to Section of 231(e)(4) of the Communications Act of 1934 we find it in turn provides a broadly inclusive definition of Internet Access Service:

    “The term ‘Internet access service’ means a service that enables users to access content, information, electronic mail, or other services offered over the Internet, and may also include access to proprietary content, information, and other services as part of a package of services offered to consumers. Such term does not include telecommunications services.” (47 U.S.C. 231(e)(4))”

    Hypertouch owns and operates mail servers, web servers, and DNS (Domain Name Service) servers that are connected to and accessed over the Internet, so we qualify under CAN-SPAM. We now even have case law to prove it: in Hypertouch v. Kennedy-Western University, the court finally put to rest the spammers often asserted false claim that you have to be AOL or Earthlink with huge modem banks to qualify as an ISP. See http://spamlaws.com/cases/hypertouch-kwu.shtml.

    IANAL, but have sued a number of spammers…

  18. macmend Says:

    Hi i have had such problems with my hosts for macmend.com, which is currently down, I was very interested by your site. I have a couple of basic questions

    1. How is anti- hacking and security maintained

    2. I am used to cpanel on a *NIX box what is the back end of this set up that you recommend like for ease of use and control once its installed

  19. Richard5 Says:

    Here are my answers:

    1- it depends on your requirements, you’ve got a good firewall in OS X so use that. Postfix is configured to be safe and there are some measures to enhance security on SSH. OS X is pretty secure by itself. I’ve had no real issues after I secured SSH.

    2- I haven’t tried cpanel but I know several people used webmin succesfully. I use postfix admin and the terminal sessions myself…

  20. Frank Muller Says:

    Diversity of opinion is fine – personal attacks and indignation is not.

  21. PR Says:

    Hi,

    Came across your excellent post! Couple of questions,

    1. Have you tried running Mac OS X “server” on Macbook?
    2. Any thoughts on performance, server on Macbook vc Mac mini?

    Thanks.

  22. Richard5 Says:

    No I haven’t tried it on a MacBook as I haven’t got one. Sorry. But the performance between a mini and a macbook depends on CPU speed and memory. If they are the same the difference is minimal.

    The mailserver performance requirments are minimal, I’ve got users running it on very old G4′s without any problem. The webserver is different, requirements here depend on the load.

    Hope this helps…