Create a Cheap Server Using the Regular Snow Leopard Install
Posted 12/23/2009 at 2:32pm
| by Cory Bohon
Setting up a Jabber Chat Server
A Jabber server will allow you to chat just like AIM, but you’ll be routing through your own secure server and connection. To create our very own Jabber Server, we’ll be using the open-source application Openfire Server.

You can download this server for free from the Openfire website. When you install the application, it will install a preference pane that’s accessible from within System Preferences.

To configure the initial settings for the server, open System Preferences and click Openfire. Once there, click the Open Admin Console button. This will launch a webpage that will prompt you to select your language; do this and click Continue.

The next screen will prompt you to specify the server settings for Openfire. If you are running on a local network, the default domain will work. If you want to make the Jabber server open to the Internet, you’ll need to change this later once you setup DynDNS (in a later step). You won’t need to change the Admin Console Port or Secure Admin Console Port, so click Continue. Remember to make note of the Domain you're using, as you'll need this information later.

On the next screen, you’ll be asked to specify your database settings for Openfire. For this how-to, we’ll use the Embedded Database option as it will provide a faster setup for Jabber; however, if you plan to setup a large Jabber network, you’ll want to select Standard Database Connection and be prepared to input settings for an external database connection (It will accept MySQL). Click Continue.

On the next screen, you’ll set up the profile settings. Select Default for the simplest setup and click Continue. If you know what you’re doing you could setup LDAP or Clearspace Integration.

The next screen asks you to provide details for an administrator account. Enter you email address, username, and password. If you choose to skip this step, the default username and password combination will be "admin" / "admin." Click Continue.
Note: The admin user name will still be "admin" after you create a new password and input an email address.

You’ve now setup your Jabber server. As soon as you log in to the console, you can add and manage users for your Jabber chat system. If you didn’t change the ports for the console, you can always login to the console by opening your favorite web browser and go to http://localhost:9090
Let’s set up the accounts in iChat so you can get chatting on your local network!

Open iChat and open the preferences by going to iChat > Preferences. Click the Accounts tab and then select the plus sign (+) at the bottom of the window.
In the Account Type drop-down menu, select Jabber. Under Account Name, fill out your username followed by an @ and the domain that you entered (or that was entered for you) during setup. Type in your password in the next field.
Click the triangle next to Server Options and make sure Server and Port both say "Auto" (nothing entered in those fields), and ensure that the Use SSL and User Kerberos v5 for authentication boxes are both unchecked, then click Done.

After a few seconds, depending on whether or not your Mac is connected to the Internet, iChat will connect to the server and authenticate you as a user. You’ll then see a new buddy list popup, allowing you to add friends using the same username@domain naming scheme.
Setting up a VPN (Virtual Private Network) Server
A simple VPN (or Virtual Private Network) lets you setup a computer at a physical location (say your house or company) and allows you to login from your remote Mac/PC/iPhone and use resources from that physical location (i.e. Internet access). This type of connection adds a layer of security to your remote devices, since they won’t be using the Wi-Fi hotspot or a 3G connection to browse the Internet, but rather, routing the traffic through your physical location’s Internet access remotely and securely.
Setting up a VPN on your old Mac server is easy to do and can provide you additional security for remote devices like your iPhone.
TinyApps.org has a simple and easy to use VPN Server application for your Mac. You can download and install it using the instructions on their website. Their website also include details on how to setup the VPN access on your iPhone, PC, or Mac.
Setup a free CalDAV Server
A CalDAV server gives you Microsoft Exchange-like features using free, open source software that Apple provides via the free Apple Darwin Calendar Server (DCS). The DCS keeps you in sync with your calendars through iCal. You need to have the Apple Developer Tools installed on your Mac (Install XCode, available on the Snow Leopard Install Disk in the "Optional Installs" folder.), and posess some knowledge of the Mac OS X command line interface.
After you install the Developer Tools, open Terminal (found in Applications > Utilities) and type in each of the following commands followed by enter:
svn checkout http://svn.calendarserver.org/repository/calendarserver/CalendarServer/trunk /CalendarServer
This command will download the files from Apple's project website and store them on your local machine. Next, type in the following commands followed by enter:
cd /CalendarServer
./run –s
Run the following commands to create a file we need and remove one that we don't:
cp ./conf/caldavd-test.plist ./conf/caldavd-dev.plist
rm ./conf/caldavd.plist
Now, you'll need to add the user information. For this part, you'll need to open a Finder window and navigate to your local hard drive then to /CalendarServer/conf/auth/. Once there, locate the accounts.xml file. This is where all of the user accounts information is stored. Right-click on that file and select Open With > TextEdit. You should now see the file opened inside of TextEdit. You can leave the included users in, or remove them at your discretion.
To add a new user to the file, copy/paste the following bit of code and enter the appropriate information for the user you're adding:
<user>
<uid>shortname</uid>
<guid>shortname</guid>
<password>password</password>
<name>Full Name</name>
<cuaddr>mailto:user@domain.com</cuaddr>
</user>
Make sure that this information is entered between the opening <accounts realm="Test Realm"> tag and the closing </accounts> tag. Save the file when you've finished adding users.
Next, locate the file caldavd-test.plist in /CalendarServer/conf/ and open it with TextEdit the same way you did the previous file.
Locate the text "<string>localhost</string>" under the key "ServerHostName." Change the text from "localhost" to your computer's local IP Address. If you dont' have a static IP Address, skip down to the section on "Getting Your Server Online," set up your computer's manually configured IP Address, then come back here and type it in.
You'll need to determine if you want to have encrypted or unencrypted access to. First, find the section of the file that contains the following lines:
<!-- HTTP port [0 = disable HTTP] -->
<key>HTTPPort</key>
<integer>8008</integer>
<!-- SSL port [0 = disable HTTPS] -->
<key>SSLPort</key>
<integer>8443</integer>
If you want unencrypted access, replace 8443 with a 0 in the second section; for encrypted access, replace 8008 with a 0 in the top section.
Next, locate the key BindAddresses, then underneath it, locate the line that says "<string>127.0.0.1</string>." Leave this line alone, but create a second line that is identical, but contains the computers acutal static IP Address instead of the localhost address of 127.0.0.1. Save the file and then close out of TextEdit.
Return to Terminal and type in the following commands:
./run -d

Your CalDAV server is now up and running. You can connect to it in iCal by going to Preferences > Accounts > Add. Select CalDAV from the drop-down menu, type in your username/password/IP Address of the server and click Create. Remember that the IP Address should be XXX.XXX.X.XX:8008 if it's unencrypted or XXX.XXX.X.XX:8443 if it's encrypted.
You'll need to enter the
./run -d
command each time the machine starts to start the CalDAV server.
NEXT: Get Your Server Online