Deploy secure-energy
Monitor BOCHK appointment availability with a dashboard and email alerts.
Just deployed
/app/data
Deploy and Host a BOCHK Appointment Monitor on Railway
Deploy a Flask dashboard that checks the Bank of China (Hong Kong) appointment system for available dates, records each check, and sends an email notification when a configured date becomes available.
About Hosting the BOCHK Monitor
This template runs the web dashboard and background monitor from one Railway service. The dashboard uses HTTP Basic Authentication, displays the latest result and history, and allows monitoring settings to be saved from the web interface.
A Railway Volume is mounted at /app/data. It stores config.json and daily logs,
so settings and history survive normal redeployments. Email can be sent through
SMTP with optional Resend API fallback.
Why Deploy the Monitor on Railway
- Keep the checker and dashboard online without maintaining a server.
- Persist configuration and daily logs on a Railway Volume.
- Manage email credentials and monitoring intervals through Railway Variables.
- Review service output and HTTP errors in Railway logs.
Common Use Cases
- Monitor a small set of preferred appointment dates.
- Track which dates are available while receiving email only for selected dates.
- Review historical checks from the dashboard and daily log files.
- Use SMTP, an email provider, or Resend for notifications.
Dependencies for BOCHK Monitor Hosting
Deployment Dependencies
- SMTP credentials, or a Resend API key for email delivery.
- A sender address and at least one receiver address.
- A Railway Volume mounted at
/app/data. - A strong dashboard password and Flask session secret.
Required Variables
ADMIN_USERNAME=admin
ADMIN_PASSWORD=replace-with-a-strong-password
FLASK_SECRET_KEY=replace-with-a-random-secret
MAIL_HOST=smtp.example.com
MAIL_PORT=465
MAIL_USER=your-email@example.com
MAIL_PASS=your-smtp-password-or-app-code
SENDER=your-email@example.com
RECEIVERS=receiver1@example.com,receiver2@example.com
Optional monitoring and fallback settings:
RESEND_API_KEY=re_your_resend_key
MONITOR_CHECK_DATES=20260213,20260214
MONITOR_INTERVAL_SECONDS=120
MONITOR_NOTIFY_ON_AVAILABLE=true
MONITOR_ALL_DATES=false
TZ=Asia/Hong_Kong
After Deployment
- Open the Railway domain and sign in with
ADMIN_USERNAMEandADMIN_PASSWORD. - Confirm the SMTP settings and send a test notification if the dashboard provides one.
- Set the dates to monitor and the check interval.
- Confirm that
/app/datais attached to persistent storage. - Add Railway health monitoring and review logs after the first scheduled check.
The monitor only reports availability. It does not reserve or book appointments. Use it in accordance with the bank's terms and do not send excessive requests.
Source
Template Content
TZ
SENDER
MAIL_HOST
MAIL_PASS
MAIL_PORT
MAIL_USER
RECEIVERS
ADMIN_PASSWORD
ADMIN_USERNAME
RESEND_API_KEY
FLASK_SECRET_KEY
MONITOR_ALL_DATES
MONITOR_CHECK_DATES
MONITOR_INTERVAL_SECONDS
MONITOR_NOTIFY_ON_AVAILABLE