Publishing a site.
Take a folder of pages from an in-game computer and put it on the network, where anyone on any server can visit.
Before you start
You need an advanced computer with a wired or wireless modem, and HTTP enabled in the server config. Run lantern version to check the program is installed.
- A site key from your dashboard.
- A folder with at least an
index.luapage. - About two minutes.
Write a page
Pages are small Lua files that return a page object. Start with a heading, a line of text and a guestbook so visitors can say hello.
Publish it
From the folder above site, run the publish command with your key. Lantern uploads every page, checks it, and prints the address when it is live.
Anyone with the key can overwrite your site. Store it in a settings file, not in index.lua.
Useful flags
--draftuploads without making the site public.--watchrepublishes whenever a file changes.--quietprints only the final address.
Next steps
Your site is live. Add a guestbook, set up a turtle relay for servers without HTTP, or read the Lua API to build something stranger.