Local cameras and US weather in one dashboard, with saved places, official weather alerts, and embeddable weather widgets.
Demo at localsky.formable.app
Built with Payload CMS and Next.js.
Use transformable.app to start your own self hosted cloud and install your own intances of LocalSky in minutes.
- Local cameras – Reviewed YouTube feeds with attribution, source links, and availability states.
- US weather – National Weather Service observations, hourly forecasts, day/night forecasts, and official alerts.
- Two-hour outlook – Open-Meteo forecasts in 15-minute intervals, with precipitation and conditions.
- Radar – NOAA/NWS observations, with an Iowa Environmental Mesonet backup for the contiguous US and two-hour playback.
- Place discovery – City and ZIP code search, nearby places, and location submissions for administrator review.
- Saved places – Browser favorites and accounts with up to 20 ordered places, a default place, preferred cameras, and display preferences.
- Weather alerts – Official NWS warnings, watches, and advisories delivered through confirmed email or ntfy subscriptions.
- Weather widgets – A public builder with Compact, Card, Forecast, and Live stream layouts, plus appearance and unit controls.
- Administration – Place management, camera moderation, site configuration, and alert delivery records.
Camera imagery and weather measurements come from separate sources. Missing or stale weather data has explicit labels.
-
Clone the repository:
git clone https://github.com/transformable-app/localsky.git cd localsky -
Create the environment file:
cp .env.example .env
-
Configure these values in
.env:Variable Purpose PAYLOAD_SECRETA unique secret for Payload authentication NEXT_PUBLIC_SERVER_URLThe public origin, without a trailing slash. Use http://localhost:30000for ComposeCRON_SECRETA secret for the jobs endpoint PREVIEW_SECRETA secret for preview requests MONGO_INITDB_ROOT_PASSWORDA unique MongoDB root password for Compose -
Start the app and MongoDB with Docker Compose:
docker compose up -d
-
Open the admin panel and create the first administrator.
-
Review the eight automatically seeded Explore US places and their cameras.
The public dashboard is at http://localhost:30000. Compose maps host port 30000 to container port 3000.
The seed preserves existing records and administrator edits. Camera playback requires separate review.
For a local server without Docker, see Development. For optional Compose environment values, see Docker.
Places for public discovery, account preferences, and weather requests.
- Name, Slug, State, Region – Place identity and public URL.
- Coordinates / Time Zone – Longitude, latitude, and IANA time zone.
- Status –
draft,pending,published, orrejected. - Discovery – Nearby discovery and fallback eligibility.
- Forecast Zone / County Zone – References for official alert matching.
- Submission details – Submitter, weather verification time, and private review notes.
Published places appear publicly. Personal places remain available to associated accounts, the submitting guest browser, and administrators until publication.
Reviewed video feeds associated with a place.
- Name / Location – Camera label and associated place.
- Video ID – A YouTube video ID or HTTPS URL, normalized on save.
- Source URL / Attribution – Provider link and camera credit.
- Approval –
draft,approved,rejected, ordisabled. - Availability –
live,offline,ended,unavailable, orunknown. - Enabled / Priority – Visibility and camera selection order.
- Review details – Reviewer, review date, rights notes, and availability dates.
Public camera access requires approval, an enabled camera, and a published place. The same video can belong to multiple places. Each place and video pair must be unique.
The administrator review queue for submitted videos.
- Video / Location – Proposed video and associated place.
- Submitter / Attribution – Submission details and source credit.
- Review –
pending,approved, orrejected. - Shared Camera – The camera record created or updated by approval.
- Rights / Review Notes – Internal details for the review.
Approval adds the video to shared cameras for that place. Automated camera discovery and availability checks remain future work.
Account-owned dashboard preferences.
- Places – Up to 20 ordered places, with preferred cameras or personal YouTube videos.
- Default Location – A place from the saved list.
- Units – Fahrenheit or Celsius, plus mph or km/h.
- Appearance / Motion – Weather or neutral appearance and optional motion.
Browser favorites require an explicit merge after login. Personal videos also enter the shared review queue.
Account-owned preferences for official NWS alerts.
- Locations / Events – Selected places and Warning, Watch, or Advisory categories.
- Email – Separate consent, address confirmation, and unsubscribe controls.
- Ntfy – A full server/channel URL, such as
https://ntfy.sh/my-private-channel.
Email and ntfy delivery operate independently. Email confirmation requires an explicit button press.
Internal records for official alerts and delivery attempts.
- Alert Events (
alert-events) – NWS source IDs, alert versions, affected areas, validity times, and instructions. - Email Deliveries (
email-deliveries) – Delivery records for both email and ntfy, including attempts, status, and errors. - Email Tokens (
email-tokens) – Internal confirmation and unsubscribe tokens. - Rate Limits (
rate-limits) – Internal request limits.
Delivery status includes pending, claimed, sent, failed, suppressed, and uncertain.
An uncertain delivery requires provider review before a retry. The provider can receive a message before the worker records success.
Payload authentication accounts with Admin or LocalSkyViewer roles.
The first administrator registration seeds the baseline places and cameras. Existing accounts without a role retain administrative access.
Viewers manage their profile, saved places, and subscriptions through the public account drawer.
Public site configuration with administrator-only updates:
- Brand Name / Tagline – Site identity.
- Enable weather widgets – Enables the builder, embeds, and refresh endpoint. The default is disabled.
- Discovery – Nearby radius, expanded radius, and result limit.
- Email Notice – Alert information for viewers.
- About / Privacy / Terms – Site information shown in the public interface.
LOCALSKY_WIDGETS_ENABLED=false forces widgets off. An unset variable leaves control with the admin configuration.
See Weather widgets for embed instructions and proxy requirements.
The internal localsky-jobs-state global stores job state. The inherited RSS Settings global remains hidden and administrator-only.
- Guests – Read published places, approved public cameras, public site configuration, and enabled weather widgets. Access personal places through their browser cookie.
- Viewers – Access their account, preferences, subscriptions, and associated personal places.
- Administrators – Manage places, cameras, moderation, accounts, site configuration, and operational records.
- Jobs – Require an administrator session or the correct
CRON_SECRETbearer token.
Viewer accounts cannot open the admin panel or run maintenance jobs. Public responses exclude private review and delivery details. Inherited RSS collections remain intact, hidden, and administrator-only. Their custom endpoints and automatic schedules are disabled.
Both LocalSky tasks use the localsky-alerts queue and run every minute (* * * * *):
- localsky-ingest-alerts – Fetches active NWS alerts, matches subscribed places, records events, and queues channel deliveries.
- localsky-deliver-alerts – Sends pending email and ntfy messages, rechecks subscriptions and alert validity, and records outcomes.
Known delivery failures retry with bounded exponential backoff. Uncertain provider outcomes remain available for administrator review.
Enable the in-process worker with this environment configuration:
PAYLOAD_JOBS_AUTORUN=true
PAYLOAD_JOBS_AUTORUN_CRON=* * * * *The Docker image enables these values by default. For multiple replicas, enable the in-process worker on one instance.
Alternatively, run scripts/run-payload-jobs-every-minute.sh continuously or call the jobs endpoint on a schedule:
curl --fail \
-H "Authorization: Bearer ${CRON_SECRET}" \
'http://localhost:30000/api/jobs/run?allQueues=true'The endpoint handles schedules and runs due jobs. A scheduled job can become due on the next minute tick.
Deployment build changes reset the queue. The jobs runner also recovers stale processing jobs.
The administrator-only POST /api/jobs/reset endpoint provides a manual full reset.
Use a Node.js version permitted by package.json and pnpm 11.7.0.
-
Copy
.env.exampleto.env. -
Set
DATABASE_URLto a local MongoDB database, such asmongodb://127.0.0.1/localsky. -
Set
PAYLOAD_SECRET,CRON_SECRET, andPREVIEW_SECRETto unique values. -
Set
NEXT_PUBLIC_SERVER_URL=http://localhost:3000. -
Set
NWS_USER_AGENTto the application name and a real contact address. -
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
-
Create the first administrator at http://localhost:3000/admin.
The dashboard runs at http://localhost:3000.
After administrator setup, set LOCALSKY_SIGNUP_ENABLED=true and restart the server to permit viewer registration.
Common commands:
| Command | Purpose |
|---|---|
pnpm dev |
Start the development server |
pnpm build |
Create the production build |
pnpm start |
Start the production server |
pnpm generate:types |
Regenerate Payload types after schema changes |
pnpm generate:importmap |
Regenerate the import map after admin component changes |
pnpm exec tsc --noEmit |
Validate TypeScript |
pnpm test:localsky |
Run LocalSky normalization and access tests |
pnpm test:int |
Run the integration suite |
pnpm test:e2e |
Run Playwright browser tests |
The LocalSky access tests use a separate MongoDB database and delete that test database afterward.
| Variable | Purpose |
|---|---|
NWS_USER_AGENT |
Identifies the application and contact address in NWS requests |
OPEN_METEO_API_KEY |
Selects customer endpoints for geocoding and 15-minute forecasts |
NEXT_PUBLIC_MAP_TILE_URL |
Selects an alternative OSM-derived basemap tile service |
LOCALSKY_SIGNUP_ENABLED |
Enables viewer registration after administrator setup |
LOCALSKY_WIDGETS_ENABLED |
Forces widgets off when false |
SMTP_URL |
Enables account recovery, email confirmation, and alert email |
SMTP_FROM / SMTP_FROM_NAME |
Sets the verified email sender |
NTFY_URL |
Sets the fallback server for legacy topics and the shared authentication scope |
NTFY_TOKEN |
Authenticates delivery only to the configured ntfy server and base path |
The free hosted Open-Meteo API is for noncommercial use. Commercial deployments use OPEN_METEO_API_KEY for customer endpoints.
OpenStreetMap attribution remains visible for OSM-derived basemaps.
Without SMTP_URL, email sends fail. Viewers supply full ntfy server/channel URLs.
Custom ntfy servers require public addresses unless the administrator explicitly configures a private server through NTFY_URL.
docker-compose.yml runs the published app image and MongoDB 7 with a persistent mongo_data volume.
The default image is ghcr.io/transformable-app/localsky:latest. LOCALSKY_IMAGE selects another image or tag.
docker compose up -dCompose passes only the environment values listed in its environment block. Other .env entries do not automatically enter the app container.
For additional LocalSky values, create docker-compose.override.yml:
services:
app:
environment:
NWS_USER_AGENT: ${NWS_USER_AGENT:?set NWS_USER_AGENT}
LOCALSKY_SIGNUP_ENABLED: ${LOCALSKY_SIGNUP_ENABLED:-false}
OPEN_METEO_API_KEY: ${OPEN_METEO_API_KEY:-}
SMTP_FROM: ${SMTP_FROM:-noreply@example.com}
SMTP_FROM_NAME: ${SMTP_FROM_NAME:-LocalSky}
NTFY_URL: ${NTFY_URL:-https://ntfy.sh}
NTFY_TOKEN: ${NTFY_TOKEN:-}For email delivery, set a verified SMTP_FROM address and configure SMTP_URL in .env.
After environment changes, recreate the app container with docker compose up -d.
The publish workflow targets ghcr.io/transformable-app/localsky for AMD64 and ARM64.
Run the image with an existing MongoDB server:
docker run -d --name localsky -p 30000:3000 \
-e DATABASE_URL='mongodb://<host>/localsky' \
-e PAYLOAD_SECRET='<secret>' \
-e NEXT_PUBLIC_SERVER_URL='https://your-domain.example' \
-e CRON_SECRET='<cron-secret>' \
-e PREVIEW_SECRET='<preview-secret>' \
-e NWS_USER_AGENT='LocalSky (admin@your-domain.example)' \
ghcr.io/transformable-app/localsky:latestBuild a local image from the included Dockerfile:
docker build -t localsky:local .- Configure MongoDB, unique secrets, and the canonical HTTPS origin in
NEXT_PUBLIC_SERVER_URL. - Configure the NWS contact address and the weather providers for the deployment.
- Build the app with
pnpm build, then start it withpnpm start, or deploy the Docker image. - Create the first administrator and review the seeded places and cameras.
- Enable viewer registration after administrator setup.
- Configure SMTP and ntfy delivery for the required channels.
- Enable one jobs runner or schedule authenticated requests to
/api/jobs/run. - If widgets are required, enable them in LocalSky Settings.
- Verify camera playback, alert delivery, job execution, and widget embeds through the deployed proxy.
Multiple app instances require a shared weather cache. Widget embeds require the proxy to permit framing on /embed/weather/[slug].
For existing installations, restore missing baseline records with pnpm payload run scripts/localsky-seed.ts.
For databases with the former global video uniqueness indexes, run pnpm payload run scripts/localsky-video-location-indexes.ts after deployment.
The index script preserves camera records.
See LocalSky setup and implementation status and Weather widgets for additional operational details. The implementation plan contains the product requirements.
For Payload CMS: Discord or GitHub discussions.
