Support Home
Support Blog

Where and How can I Host Training Videos? Can Fieldpine be a simple web server?

This retailer is creating a number of training videos for other franchisee members. They would like to know where they can place these for other store owners to watch on demand. They are expecting around 80 video clips, ranging in size from 30 seconds to 30 minutes. The videos aren't intended for general public so they would prefer the public cannot easy see them, but isnt a large risk if they should be seen.

In this diary note we will cover the specific requirement around video streaming, but also touch on other ways your Fieldpine Store Controller can act as a general purpose (low volume!) web server. This is often needed for short term hosting of resources.

As these video clips need to be private, using youtube or vimeo etc is not suitable.

Using Fieldpine as a General Purpose Web Server

If your store controller is released after 1 Dec 2022 then you can enable a special web server only mode. When operating in this mode the server will only serve files from a specific folder and will not allow any access to retail functionality. You cannot use Fieldpine Online as a general web server, this document only applies for instore Fieldpine installations.

Step 1 - Register your domain and configure DNS entries.

If you are using Cloudflare and already have a tunnel configured to your store, then you can allocate a new subdomain and create a DNS CNAME entry pointing to the same address as your current CF tunnel. For example, if your current Cloudflare name for Fieldpine directly is

CNAME newyork.example.com  » fe37603-382747-c385632gf.cfargortunnel.com
            
And you wish to create public.example.com then simply add a DNS entry
CNAME public.example.com  » fe37603-382747-c385632gf.cfargortunnel.com
            
If you are registering a completely different domain ( eg hidden.we827hfg.xyz ) you can still point directly to the same tunnel, if both domains are using the same Cloudflare account
CNAME hidden.we827hfg.xyz  » fe37603-382747-c385632gf.cfargortunnel.com
            

Step 2 - Configure Host

  1. In the \Fieldpine\Gds folder, use a text editor (such as notepad) to edit the file gds.ctl insert the following lines
    -----------------------------------
    host public.example.com
    type=webserver
    root=C:\MyHostNameXyzFiles
    -------------------------------------
    
    This should be placed after the header (ie not at the very top.) The lines with "------" indicate blocks of commands, so place it after any other block.
  2. Change "public.example.com" to be your hostname
  3. Change the root path to be where files are stored
  4. Restart the Gds2 (or GlobalData) service in Windows services
  5. Place a file in this folder you wish to serve.
  6. You should be able to view https://myhostname.xyz/myfilename in a browser. Note, you may not be able to view it in your store if you are using direct IP address, and opening router ports. Not all routers are able to trombone route correctly. If you are using Cloudflare (recommended) then this will not be an issue.

Notes

When using Fieldpine in this manner there are several restrictions.

Hosting Video

If you are only serving a few small videos, then you can put them in this folder and it will work. However, if you are hosting a lot of traffic then you probably want to place the video files themselves on a different host and have the index/navigation pages in the folder served by Fieldpine

Cloudflare Stream

The simplest for serving video is probably to use Cloudflare stream. This is a paid service based on minutes stored and minutes viewed. However using stream is easy and offloads your need to create and support many different client formats.

  1. Login to your Cloudflare account and enable streams
  2. You can upload video using a drag/drop interface
  3. Cloudflare documentation explains various options to embed players in web pages.
  4. If you want an index page for available videos, create a menu.htm and serve it from your machine as described above. Stream only works with video streaming, not standard HTML pages. Other options are using cloudflare pages, or any other web server you have access too.

An example index page when using Cloudflare stream might be as follows. The IFRAME html was copied from the Cloudflare Stream management pages


<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>My Help Page</title>
</head>
<body>

Create New Customer and Account
<div style="position: relative; padding-top: 56.25%;width:30em">
<iframe src="https://customer-YOURKEY.cloudflarestream.com/eff89282273bfef5e3d4e5c6409282837263/iframe?poster=https%3A%2F%2Fcustomer-YOURKEY.cloudflarestream.com%2Fef727373ef5e3d4e5c6438374673t%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600" 
    style="border: none; position: absolute; top: 0; left: 0; " 
    allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" 
    allowfullscreen="true">
</iframe></div>

</body>
</html>

Not using Cloudflare

If you aren't using Cloudflare stream, then you will need to locate a suitable web hosting service. There are many available, but be careful to read the terms and conditions, several prohibit video streaming. You can also use your Fieldpine server (described above), it will stream video fine, but is not its primary design focus (and support cannot assist with general web serving or client issues)

An example index page when using a direct web server might be as follows.


<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>My Help Page</title>
</head>
<body>

Create New Customer and Account
<video src="Create New Customer and Accounts.mp4" width="500px" controls autoplay="1"></video>

</body>
</html>