AutomationProjects

shotdeck-box — a used laptop that cuts and posts clips overnight

One old laptop that leaves me with only the editing. Voiceover, rendering, checks, posting, comment replies and self-repair carry on by themselves while I sleep or travel.

12 min read

A 2017 laptop sits at home in Bangkok, always on. It makes short clips, renders them, checks them, and posts to 5 platforms on its own schedule. I can give it orders from my phone anywhere, and travel without the work stopping.

Ubuntu Serversystemd timersTailscaleRemotionfaster-whisperClaude CodeBunadb
Empathize · Define

Most of clip work isn't editing

One short sales clip comes with a dozen surrounding tasks, and many of them have to happen at 3 a.m.

ShotDeck web app home on the box: clip format menu, cards for streak length, days missed and the next queue; page stats cards are blurred
ShotDeck home, filled in by the system every day — editing is just one of dozens of tasks (page and revenue numbers blurred)

I only want to be in the editing step. The system handles the rest: voiceover, rendering, checks, scheduling, posting, replying to comments, and a summary to read in the morning.

— The starting brief

Everything was tied to my work Mac

Before the move, 12 scheduled jobs ran on the Mac. Close the lid or take it out of the house, and the night jobs didn't happen.

Jobs that run while nobody is awake

Product clips at 3 a.m., backups at 4 a.m., comment replies at 11:30 p.m. If something broke halfway, nobody saw it until morning.

No control once I left the house

I wanted to travel without the channels going quiet, but everything lived on a machine at home, and opening ports straight to the internet isn't safe.

Posting to 5 platforms by hand, every day

Each one uploads differently, some only accept posts from a phone, and links have to go in a pinned comment. Doing it by hand every day is slow and easy to get wrong.


Ideate

A dedicated machine at home beats renting cloud and beats keeping the Mac awake

The real constraints: it needs a GPU, a browser that stays logged in, and a port for a real Android phone.

Terminal showing the machine specs: i7-7700HQ, GTX 1050 Ti 4GB, 15Gi RAM, 3 disks and 2 weeks of uptime
Real specs of the 2017 laptop used as the server — up for more than 2 weeks straight
OptionWhat you getCostWhy rejected / chosen
Rent a cloud VPS Always on, no hardware to maintain Monthly GPU machines cost too much for this job, and you can't plug in a real Android phone over USB to post
Keep the Mac awake Nothing new to set up None The Mac is my work machine and leaves the house, so night jobs depended on whether it was home that day
A used laptop as a home server Chosen GPU, several disks, phone plugs in One-time purchase An i7-7700HQ, 16GB RAM and GTX 1050 Ti are enough for rendering and transcription. It can stay on at home all day, and the Mac goes back to being just a work machine
One rule since Sep 30

All work happens on this machine over ssh. No editing a copy on the Mac and pushing it up later. With two copies of the code, sooner or later you lose track of which one is real. On Sep 29 I moved the 12 jobs off the Mac, and on Oct 6 the other always-on services followed, such as the backend for the ESP32 display on my desk, so the Mac could actually sleep.


Prototype

One machine, four layers

The top layer is where I give orders, the bottom is where the files live. Every layer talks over a private network, with no ports open straight to the internet.

Terminal showing the long-running services: web app, Claude Code in tmux, virtual display, scrcpy and VNC
Services running on the real machine; each layer in the diagram is its own systemd service
iPhone and Mac — from anywhere
Mobile web appWeb terminalType box on the MacTelegram
↕
shotdeck-box — Ubuntu 24.04
systemd user timersBun server + SSEClaude Code in tmuxRemotionfaster-whisper on GPU
↕
Posting channels
Logged-in Chrome on a virtual displayAPIs only where safeAndroid phone via adb
↕
Three disks
SSD for work in progressHDD for nightly backups1 TB archive of posted clips

Prototype

Control from anywhere without exposing the machine

Tailscale is the backbone, and SSH accepts keys only. The rest is screens designed to actually work on a phone.

ShotDeck mobile web app, travel mode: pick the dates you're away, then queue everything in advance ShotDeck mobile web app home with status cards; page stats are blurred
The mobile web app — travel mode queues the whole trip in advance (page and revenue numbers blurred)
  • Type box on the Mac to ssh into a tmux session where Claude Code is waiting. Close the window and come back later; nothing is lost.
  • A web app for iPhone A Bun server pushes live status over SSE. Bottom sheets instead of stacked windows, usable with one thumb, reachable only on the private network.
  • A web terminal ttyd connects to the tmux where Claude runs, so when I'm out I can type plain-language instructions from my phone.
  • A hidden virtual display The bot's Chrome runs logged in on Xvfb, because platforms detect headless mode. When I want to see what it's doing, I open it over VNC.
  • View-only Android screen scrcpy mirrors the phone so I can check how far a mobile post has got, without accidentally tapping anything.
  • Only one public entry point Tailscale Funnel exposes a single HTTPS endpoint guarded by a key, because some devices, like the ESP32 display, aren't on the private network.

Prototype

Voiceover clips — I edit, the machine does the rest

Clips with a voiceover still need a person to decide on the visuals. I do that part; every step after it runs by itself through to posting.

Remotion Studio on the box with a 56-second vertical 1080x1920 voiceover clip and Thai subtitles over the footage
Laying out a voiceover clip in Remotion Studio on the box — previewable from a phone, not rendered until I say so
01

Write the script, drop the footage on the Mac

Files sync to the box with rsync, no uploading through a web page

02

Thai voiceover line by line, then transcribed back to check

faster-whisper large-v3 on the GPU transcribes it for comparison with the script, a pronunciation dictionary fixes readings, and every line is leveled to −16 LUFS

03

Lay out in Remotion Studio

Preview only; nothing renders until I say it's good

04

Render

A ~73-second clip takes about 8 minutes. Upgrading Remotion made renders 15–21% faster

05

Check before release

preflight checks the file, audio and dimensions before it enters the queue

06

Schedule and post automatically

Fixed slots: 18:30 on weekdays, 12:30 on weekends

Prototype

Product clips — no human touch from start to post

These clips have no voiceover, so people can be removed entirely, with automated checks instead of human eyes.

Affiliate products page in ShotDeck: the next 7 days of queue on the left, the Shopee product catalog with images on the right
Affiliate products page — the system queues the next 7 days of product clips from the catalog
01

Pick products

Ranked from an affiliate catalog of about 2,450 items

02

Remove the product photo background

rembg cuts out just the product

03

AI draws the scene

Uses the weekly quota of a plan I already pay for, no extra API cost

04

Rotate clip formulas

Cycles through 5 formulas so the feed doesn't look the same every day, assembled from Remotion templates

05

Automated motion checks

Detects flicker and checks that text stays inside each platform's safe area

06

Post without waiting for approval

Pass the checks and it posts; fail and it doesn't


Prototype

A day in the machine's life

Every job is its own systemd user timer, so one failure doesn't drag the others down

Output of systemctl --user list-timers showing 24 shotdeck timers with their next run times
Real timers on the machine — one per job, so one failure doesn't take down the rest
Automated product clips
03:00
From picking products to the posting queue
Back up to HDD
04:00
Nightly rsync; deleted files are kept for another 14 days
Analyze reference clips and archive them
04:40
Works out what each sample clip does, then moves it to the archive disk
Reach report
08:00
A summary to read in the morning
Reply to comments
12:00 · 22:00 · 23:30
Claude drafts replies based on that clip's context
Learn from stats
19:30
Pulls out what worked and what didn't, and writes it up as lessons for the next round
Plan tomorrow, ask for approval
20:00
Sends topics to Telegram with buttons; 15 minutes of silence counts as approval
Queue posts
21:00
Books the next day's posting slots
Full-system check
22:30
Checks that everything marked as posted was really posted
Daily report
23:45
Summary to Telegram
Weekly stats and a Remotion release summary
Sun · Mon
Reports what's new but doesn't upgrade itself

Prototype

Posting to 5 platforms, each a different way

Not the slickest method, but the one each platform doesn't penalize.

ShotDeck posting calendar with a dot for each clip posted per day in October 2026
Posting calendar — each dot is a clip posted or a slot already booked
  • Facebook Reels via the API or the browser post composer; Instagram uses the composer only
  • YouTube Shorts through the browser Not the API, because clips uploaded by an app that hasn't passed audit get locked to private
  • TikTok and Shopee Video through a real Android phone Driven by adb over a powered USB hub, so the phone doesn't run out of battery overnight
  • Affiliate links go in the pinned first comment never in the post itself
  • Several guards against double posts Before trying a fallback, the system opens the real page to see whether the clip is already up, instead of trusting the status it remembers

Test

Three layers of self-repair before it wakes me

When I'm away, every alert means stopping my trip, so alerts reach me as late as possible.

ShotDeck log page listing what the system did on its own, with times and success status
A log of everything the system does on its own — who triggered it, what it did, whether it worked; 4,000 entries of history
Layer 1 · scripts for known failures
Every 5 min
Reads the error code and applies the known fix, such as restarting Xvfb, rerunning the job or re-rendering
Layer 2 · hand the symptoms to Claude on the box
Max 6 times/day
Pastes the error into the tmux where Claude runs and lets it trace the cause. The cap stops it from looping on fixes forever
Layer 3 · Telegram me
When the first two fail
Reaching this point means it's genuinely new and a person should look

Test & Iterate

Problems I hit with the real thing running

Almost none of these happen on a Mac, and nobody warned me about them.

Terminal showing 300,957 Suspending lines in the previous boot, plus HandleLidSwitch=ignore and a masked sleep.target
300,957 “Suspending” lines from the previous boot, and the settings that stopped it sleeping when the lid closes

The BIOS refused almost every USB stick, and after installing it showed No Bootable Device

Flash drives written the usual way didn't show up in the boot menu. Once the install did go through, the machine couldn't find the new system on reboot.

Fix: a FAT32 MBR flash drive with the ISO extracted straight onto it, then adding shimx64.efi as a trusted file in the BIOS. Only then would it boot into Ubuntu.

Closing the lid put it in a sleep-wake loop, leaving 300,000 "Suspending…" lines in the log

Laptops are set to sleep when the lid closes, so a machine meant to stay on kept trying to sleep all night.

Fix: set logind to ignore the lid switch. Now it can sit closed without sleeping.

The first night 5 of 6 posts failed because select-all used the wrong OS shortcut

The script was written on a Mac and cleared text fields with Meta+A. On Linux that doesn't select all, so old text stayed in the field.

Fix: switched to ControlOrMeta+A so it uses the right key for whichever OS it runs on. The same script now runs on both machines.

rembg used 8.9 GB of memory and crashed the pre-dawn jobs

It reloaded the model for every image. With 16GB of RAM, nothing was left for the jobs running alongside it.

Fix: one session kept open and reused. Peak memory dropped to 0.82 GB.

Platforms detected headless Chrome

A browser without a real display leaves different traces from a normal user, so posting through the website failed.

Fix: run full Chrome on an Xvfb virtual display, kept logged in, and view it over VNC when needed.

Tailscale Funnel didn't send the header that marks a request as coming through Funnel

The public endpoint was meant to check that requests came through Funnel, but that header never reached the server.

Fix: check that the Host is the .ts.net domain, together with the key, so requests from anywhere else are rejected.

The GPU sat idle for days after the move

I chose a machine with a graphics card, but the early jobs only used the CPU, so the card was paid for and unused.

Fix: moved the voiceover check transcription to faster-whisper large-v3 on the GPU, for a more accurate audio check without a long wait.

Test

The numbers that show it's worth it

115 clips in the first 3 weeks: 38 automated product clips, 21 voiceover clips, 42 still/info cards and 14 comparison clips

ShotDeck all-content page: 267 items in the system, 47 scripted, 46 voiced, 127 rendered, with the queue list
All-content page — numbers read from the real files, not typed in by hand
115
clips in the first 3 weeks (Sep 29 – Oct 20)
289
clips queued through year-end
38
automated product clips in the first 3 weeks
21
voiceover clips in the first 3 weeks
12
scheduled jobs moved off the Mac
5
platforms posted to on schedule
0.82
GB peak rembg memory, down from 8.9
0
baht spent on extra image-generation API

Define

Lines I chose not to cross

A system that runs all night unwatched needs lines it won't cross on its own.

A desk at night: laptop screen off, lamp on, city view through the window
A system that works all night unwatched needs lines it won't cross — photo: Avtar Singh / Unsplash
  • No automatic Remotion upgrades Every Monday it summarizes what's in the new version, and I decide when to upgrade, because every template depends on it
  • Voiceover clips don't render until I say so Remotion Studio is for previews. A render ties up the machine for almost 10 minutes and shouldn't be spent on a clip that isn't approved
  • No links in the post body Links go only in the pinned first comment
  • No APIs that get clips locked YouTube posts go through the browser instead, even though it needs more upkeep
  • Claude gets at most 6 repair attempts a day The cap stops it looping on the same problem all night; past that, a person decides
  • No editing copies on the Mac Everything is edited on the real machine over ssh; there is only one real copy

Tan · Natpakan Sirirat

Product Designer & AI Builder — designing user experiences and building AI tools that actually work.

0%