💾 Archived View for capsule.town › start.gmi captured on 2022-06-03 at 22:55:25. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
🚀 We're excited for you to join capsule.town!
🚧 Please note that this service is currently in early beta. Please get in touch if you have any feedback, bug reports, or would like to contribute.
Publishing your capsule is handled through a HTTP API, however we recommend most people make use of our official wrapper client, which is described below.
🗒 Note: whilst we encourage use of the Gemini protocol for publishing and consuming text content, we do use HTTPS for our management API. The HTTP/S protocol offers the useful tooling required for such management, and it's more about using the right tool for the job 🙂
We recommend most people download and make use of the capsule.town client, called `captown`, for publishing their capsule. However, if you'd rather use your own tooling (cURL, or something else) you can interface directly with the service using HTTPS (documentation for this is coming soon).
The current version of the client is: 0.1. Replace the version numbers in commands below to get the latest version.
You can use CURL to get the client, as described below.
For Linux:
➡️ curl -O https://download.capsule.town/captown-linux-0.1
For Mac:
➡️ curl -O https://download.capsule.town/captown-mac-0.1
ℹ️ The Windows client is coming soon (contributions welcome).
Once downloaded:
1. Mark the binary as executable: `chmod +x captown-mac-0.1`
2. Move the binary to a location of your choosing: e.g. `mv captown-mac-0.1 /usr/local/bin/captown`.
The rest of this guide assumes the binary is somewhere on your `PATH` and can be invoked using `captown` (as above).
🗒 Note: the source code of the binary can be examined. Please find a link to the source from the project homepage.
You can now create a new capsule. To do so, create a new project directory (e.g. `~/projects/my_capsule`) and change into it:
➡️ mkdir -p ~/projects/my_capsule ➡️ cd ~/projects/my_capsule
Now create a `capsule/` directory inside this project - this is where your Gemini files will be stored. The client looks for a `capsule/` directory when publishing your capsule:
➡️ mkdir capsule
Create a new file called `capsule/index.gmi` and write a welcome message inside:
➡️ echo "# Hello, world" > capsule/index.gmi
By creating and publishing your capsule on capsule.town, you agree to the capsule.town rules.
The next step is to create your new capsule on capsule.town. To do so, run:
➡️ captown create
The client will ask for a few details:
Once done, your capsule will be created and the access key will be written to `~/.capsules.yaml`.
⚠️ **IMPORTANT: Please remember to backup this file (e.g. to your password manager). If you lose your access keys you will not be able to publish any new updates.**
Finally, you can publish your capsule.
Run `captown publish` inside your project directory. The program will ask for your capsule name to create the deployment.
Alternatively you can run the following to publish your capsule non-interactively:
➡️ captown publish -c mycapsule
Whichever route you choose, if all goes well you'll then be able to visit `gemini://<name>.capsule.town` using your Gemini client to view your new capsule.
🗒 Note: the `publish` command must be run from the root of your project (i.e. the directory containing the `capsule/` sub-directory).
When you've made updates that you want to publish, simply run `captown publish` again to make them live.
Side note: we recommend committing your capsule project directory to source control as you would for any other project.