Smallweb 0.21
by Achille Lacoin
2 min read
Hey! You might have noticed that the pace of smallweb releases has slowed down a bit on january. This is due to multiple reason:
- I've been focused on other open-source projects (ex: sunbeam and tweety)
- I've iterated a lot on smallweb cloud (if you're not already on the waitlist, make sure to signup)
But I'm back with a new release, with small but important improvements!
SSH improvements
Fixed permissions in sftp server
Smallweb bundles an SSH server, allowing you to access the cli and edit your files from anywhere.
smallweb up --ssh-addr :2222
Previously, when using the sftp server (sftp -P 2222 [email protected]
), the working directory was set to the smallweb dir, but you were able to navigate outside of it.
In smallweb 0.21, I have fixed the permissions so that the smallweb dir is the root of the sftp filesystem.
If you access an app using sftp -P 2222 <app>@smallweb.run
, you will only be able to access the app's directory and its subdirectories.
Granular Permissions
In order to interact with the ssh server, your public key needs to be added to the $SMALLWEB_DIR/.smallweb/authorized_keys
file.
This pattern is powerful, since it allows:
- multiple users to access the same smallweb instance
- push files to the server from your CI/CD pipeline
- ...
But previously, there was only one permission level: full access to the smallweb instance.
From now on, you can add a public key to a $SMALLWEB_DIR/<app>/authorized_keys
file to only give write access to a specific app.
Improved handling of SPAs
By default, the smallweb file-server is not suited for Single Page Applications (SPAs) because it does not serve the index.html
file when the requested file is not found.
In smallweb 0.21, you can now fixes the behavior by creating the following _redirects
file at the root of your app:
/* /index.html 200
Removed some core commands
With smallweb support for plugins, I have decided removed a bunch of core commands that were previously available in the CLI.
smallweb service
smallweb sync
smallweb upgrade
smallweb changelog
Most of those commands were just wrappers on top of existing tools (ex: mutagen
, launchctl/systemd
, sops
...).
The smallweb upgrade
command was problematic when you installed smallweb using brew
and I have decided to remove it.
You can easily recreate it by creating the following script at ~/smallweb/.smallweb/plugins/upgrade.sh
:
#!/bin/bash
set -euo pipefail
curl -sSfL https://install.smallweb.run | sh
Community Apps
- smallblog by @tayzendev was updated, with an improved routing system!
- If you're looking to protect your smallweb apps behind github oauth, take a look at @pomdtr/github-auth