You can create a Bitswan workspace and run Bitswan automations anywhere whether in a VPS on your favorite cloud provider or on your environment locally! This post will run you through the process of setting up a Bitswan workspace complete with an IDE for building your automations and and a runtime system where you can deploy them with the click of a button.
Prerequisities
git
,linux/macos
environment,docker
, andbitswan-workspace-cli
Tutorial
- Install Bitswan Workspace CLI
Linux / WSL
LATEST_VERSION=$(curl -s https://api.github.com/repos/bitswan-space/bitswan-workspaces/releases/latest | grep -Po '"tag_name": "\K.*?(?=")')
curl -L "https://github.com/bitswan-space/bitswan-workspaces/releases/download/${LATEST_VERSION}/bitswan-workspaces_${LATEST_VERSION}_linux_amd64.tar.gz" | tar -xz
You can find the installation instructions and command for MacOS here
- Setup DNS
Setup your DNS to have a domain test.io
for example and a subdomain for your workspace workspace.test.io
and a wildcard for subdomains *.workspace.test.io
.
- Create a Workspace
bitswan workspace init --domain=workspace.test.io <workspace_name>
For local development run:
mkcerts --install
In this example we will use workspace.localhost
domain for the local development
and then run the command with –mkcert:
bitswan workspace init --domain=workspace.localhost --mkcert <workspace_name>
Update your hosts file by adding this:
127.0.0.1 workspace.localhost
at /etc/hosts
. Do this only when you want to run the workspaces locally. With the mkcerts and your domain in hosts file, you should be good to go. Without the certs you won’t be able to open the editor later on using the https, which causes the editor to not work properly.
- Access the Editor
After running the initialization command, the CLI will provide you with a URL and a password. If everything is configured correctly, you should see your VS Code editor successfully deployed.
Example output:
------------BITSWAN EDITOR INFO------------
Bitswan Editor URL: https://workspace_name-editor.workspace.test.io
Bitswan Editor Password: a1b2c3d4e5f6g7h8i9j0
------------GITOPS INFO------------
GitOps ID: workspace_name
GitOps URL: https://workspace_name-gitops.workspace.test.io
GitOps Secret: 321ab12b13k12jk312kjjk12
- Open The Editor
Open the Editor URL in your browser and use the password to login. The site should look like this:
Give it the Bitswan Editor Pasword
from the output.
After logging in, you should see the editor with the Bitswan extension installed.
Start developing your automations Copy an example automation folder from the examples/ directory into your workspace/ folder within the editor.
Deploy your first automation Click on Deploy Automation in the top-center Jupyter panel of the editor.
Manage your automations Use the Bitswan VS Code extension (automatically installed via the CLI) to monitor automation status, view logs, restart, or stop processes as needed.
If you want to get started with the editor to develop and deploy your first automation, check out our blog post: Getting Started with Bitswan in the VS Code Editor.
Conclusion
You have successfully set up your Bitswan workspace on a VPS or cloud provider. You’re now ready to begin developing and deploying your own automations directly within the browser-based environment! Let me know if you want a shortened version or one with extra formatting like collapsible sections or callouts.