These instructions will guide you through setting up an OnTime Server on an EC2 instance in AWS. Please note that the server will be publicly accessible and lacks security measures. Proceed with caution.
I typically go through this process for each event I do. Once the event is over, I terminate everything as to not incur any costs between shows.
*Please note: We are not associated with the OnTime team in any way, although we offer suggestions on the development from time to time.*
This repository assumes you have a simple understanding on the EC2 service on AWS, including:
- Understanding of OnTime and how it works.
- EC2 Instance creation and pricing impacts
- Security Group creation and it's impact/implications
- A Key pair. There are a number of guides on the Internet.
You'll need to create a Security Group. This is a virtual firewall that controls inbound and outbound traffic to and from your OnTime server instance, based on defined rules.
Log into your AWS console and visit the EC2 section. Select Security Groups under the Network & Security Section in thethen Create security group and set the minimum settings shown below.
Name: OnTime Security Group, or something memorable.
Inbound rules
Type | Port | Source | Description |
---|---|---|---|
http | 80 | Anywhere-IPv4 (0.0.0.0/0) | Used to see the timer in a browser |
Custom UDP | 8888 | Anywhere-IPv4 (0.0.0.0/0) | OSC input into the app |
Custom UDP | 9999 | Anywhere-IPv4 (0.0.0.0/0) | OSC output from the app |
SSH | 22 | Anywhere-IPv4 (0.0.0.0/0) | Allows you to SSH into your instance |
Inbound rules - Leave as default
Type | Port | Source | Description |
---|---|---|---|
All traffic | All | Anywhere-IPv4 (0.0.0.0/0) | All outbound traffic |
Here is a step by step walk-through that will get an OnTime server up and running on an EC2 instance.
Reminder that Amazon will charge you for all active instances, EBS volumes, etc. so don't forget to terminate things when you're done.
Within the EC2 section of AWS, click the orange Launch instance button then set these settings:
Name: OnTime, or anything you wish.
AMI: Amazon Linux 2023 AMI, 64-bit (x86)
Instance type: t2.micro
Note: I've had success with type: t2.micro (which is free-tier eligible by the way), but if you need more power, up it to t2.medium, t3.medium, or higher.
Key pair name: Your existing key pair
Note: I recommend using an existing key pair that you have the private key for. It just keeps things tidy. See Prerequisites.
Select existing security group: OnTime Security Group.
Note: Choose whatever Security Group you created as part of the Prerequisites.
Leave the default settings. 8GiB gp3 is more than fine.
The meat and potatoes of this section is at User data found by scrolling all the way to the bottom.
Simply copy the contents of the User data content into that field. Here's what it does:
- Installs and runs Docker
- Installs and runs the OnTime container from Docker Hub.
- Creates a docker-compose.yml file with a bunch of settings Docker needs to run the containerized version of OnTime. A few things to consider/change:
- 80:4001/tcp: This configures the public-facing port to 80, allowing you to access the URL without specifying a port number; you can change it to another port if desired, but you’ll need to include the port number in the URL.
- TZ=America/New_York: Set this to the desired timezone.
Here are some other interesting/optional configurations within the Advanced details section. You can generally leave all these settings to default, but here are some of my recommendations. These are based on the idea around that when I stop the instance, I want it to completely disappear...to save on running costs.
Shutdown behavior: Terminate
Stop protection: Disable
After you configure everything above, hit that orange Launch Instance button on the right. You should see the following message:
Success
Successfully initiated launch of instance (i-1234567890)
Now, head over to your EC2 dashboard, copy the public IP address of your instance and paste it into a new browser tab. Be sure to use http and not https.
If you changed the Port to something unique within your Security Group, you might have to add it after the IP address. Something like http://1.2.3.4:8080 or whatever port you chose.
To add that bit of polish, I tend to use No-IP and give it a friendlier name like "timer.example.com". See their website (or any DDNS service for that matter) for details on assigning an IP to a domain name.
Please contact the author.
This project is licensed under the CC0 1.0 Universal Creative Commons License.
Ultimately you are responsible for your actions. We take no claim to any result, even if you follow these instructions perfectly. All fees from Amazon (and all others) are also your responsibility.
- Hat tip to the developers working on OnTime. It's a great app and is by far the best event timing app out there.