Move from Val Town
Move vals to Spacefast before Val Town closes. HTTP vals become Functions routes and scheduled vals become crons
Val Town closes on January 10, 2027, and code on Val Town becomes read-only on December 10, 2026 (Val Town’s announcement, checked 2026-11-14). Get your code out first, then have your AI move it to Spacefast.
Move your vals
Get the code
Copy your vals and the vals they import into a folder. Val Town’s migration guides cover exporting to GitHub.
Ask your AI
Connect Spacefast to your agent (Agents lists the ways), open the folder, and send:
Publish Val Town vals on Spacefast.
Set the secrets
Set each environment variable your vals read on the Space, with sf env set or sf env import. See Environment variables.
Choose who can open it
A team’s new Spaces start private unless the team changed its default. Make the Space public or create a share link in Spacefast Share once it works.
Where each kind of val goes
| On Val Town | On Spacefast |
|---|---|
| HTTP val | A Functions route. A module in functions/ exports a handler per HTTP method, or a root handler.ts default-exports { fetch } and answers the whole Space |
| Scheduled val | A cron in sf.jsonc: a scheduled GET against a Functions route on your own Space |
| SQLite tables | The Space’s database, through the D1-shaped env.DB binding |
| Environment variables | Environment variables on the Space, read from the handler’s env argument |
| Static pages | Published files. See the plain HTML recipe |
Handlers take a standard Request and return a standard Response, which is the shape HTTP vals use too.
What to check
- Imports and runtime calls. Replace
esm.townimports with local files or npm packages, and replaceDeno.env.getwith the handler’senvargument. The Functions page lists the supported module types. - SQL. Queries move from SQLite to the Space’s database through
env.DB. Check SQLite-specific syntax, and load existing rows through the SQL console. - Schedules. A five-field crontab schedule is an advanced cron, which comes with Boost. For now every crontab runs at its closest simple schedule until advanced scheduling is enabled, and a Space can declare at most 8 crons. A cron runs approximately on schedule, with no retries. See Crons.
- Outbound requests. A worker’s
fetch()reaches any public host once the Space is claimed. See Functions outbound HTTP.