0 OpenShift Tutorial (Windows)
Henry edited this page 2022-08-08 00:29:23 +01:00

NOTE: this tutorial hasn't been updated in years and is outdated. It is left here for historical reasons, and to keep around the Putty and FileZilla guides, which are generally useful.

This tutorial let you setup a free website at OpenShift using Windows. The tutorial consists of three major parts:

  1. Generating of your private and public keys, which is like your password for OpenShift.
  2. Creating an OpenShift account and registering an app.
  3. Connecting to your website so you can upload files.

First, download and/or install:

SSH Key Generation

In the following steps, you will generate a "public/private key pair." You give websites your public key but you keep your private key secret. Your private key is like your password.

  1. Open PuTTYgen.

  2. Click Generate.

    Click Generate

  3. Move your mouse around until it finishes.

  4. Save your private key

    Save your private key

  5. Don't save the file with a password.

    Don't save with a password

  6. Save the private key file somewhere safe.

  7. In the main window is your public key. Copy and save it somewhere.

    Public key

At this point, you should have:

  • A private key file
  • A public key (copy and pasted)

Setting Up OpenShift

  1. Go to OpenShift and register an account.

  2. Create a new PHP 5.4 app.

  3. Choose any URL that you want for your website. Leave the source code fields blank.

  4. Wait as OpenShift creates your application/website.

  5. When it's done, you will be asked whether you will be changing the code of your application. Click "Yes" and the paste in your public key that you created earlier.

  6. You should be then given a URL that looks like ssh://USERNAME@HOSTNAME/~/git/etc. Make note of your username and the hostname because you will need them later.

At this point, you should have:

  • A private key file
  • A public key (copy and pasted)
  • Your hostname (SOMETHING_HERE.rhcloud.com)
  • Your username (a bunch of numbers and letters like 6d6354ece40846bf7fca65dfabd5d9d4)

Uploading with Filezilla

  1. Open FileZilla.

  2. Open the Site Manager from the File menu.

  3. Create a new site. Enter the hostname, change the protocol to SFTP, change the logon type to Key file, enter your username, select your private key file from earlier, and then click "Connect."

  4. At this point, you should be connected to your website's files. Only files in a certain folder can be accessed by a web browser though, so browse to the app-root/runtime/repo folder on the right.

  5. Drag files into the (lower) right pane to upload your files. You can also delete the existing files if you want. If you haven't created a modpack, just can upload some test image file for now. If you already generated a modpack with the tools, then you need to upload the contents of your _upload folder (but don't upload the _upload folder itself!).

Visit Your Website

Use the hostname that you recorded earlier and visit it. For example, if your hostname was http://SOMETHING_HERE.rhcloud.com, you would try http://SOMETHING_HERE.rhcloud.com/SOME_FILE.

If you uploaded a generated modpack, then you probably want http://SOMETHING_HERE.rhcloud.com/packages.php.

Downsides with Free

The main downside with OpenShift if you're not paying is that it will temporarily "pause" your website if no one visits it in 24 hours. Once your website is paused, the first time someone visits it again, it may take a few seconds before your website starts working.

If at least one person plays your modpack every day, then this will not be a problem.

Some people work around pausing by using a free "ping" service that periodically pings/visits their OpenShift website, but obviously this is on you.

As of writing, OpenShift is about $15/month for the lowest tier, which is not exorbitant but not particularly cheap. See the Website Hosting page for other options, free or paid.