Run Sturdy anywhere, in your own datacenter or on your own workstation.
The easiest way to run Sturdy is to run the one-liner bundle.
getsturdy/server contains the full Sturdy server and all of it's dependencies in a single container.
The container supports both
linux/arm64 out of the box.
docker run --interactive \ --pull always \ --publish 30080:80 \ --volume "$HOME/.sturdydata:/var/data" \ getsturdy/server
From the tray icon, switch to connect to the self-hosted instance of Sturdy running on your computer
GitHub integration heavily unilizes webhooks. To make that work, we have to ensure that self-hosted Sturdy instance can receive HTTP requests over the Internet.
Internally, at Sturdy, we are using ngrok to setup a tunnel to localhost. It's a free and easy to use service that allows you to expose your local Sturdy instance to the Internet in no time. Here is how to set it up:
ngrok http 30080
Now your local port 30080 is exposed to the Internet, and in console, you will see a URL to access it. It would look something like this:
Within the "General" tab of the newly created app:
mv ~/Downloads/sturdy-self-hosted.TODAY.private-key.pem ~/.sturdydata/github-private.keyThis will make the private key accessible from within the docker container.
That's a lot of configuration! But now we are almost ready to start using Sturdy with a GitHub integration.
To finish the configuration, we need to restart Sturdy with some of the configuration from the app we've just created:
docker run --interactive \ --pull always \ --publish 30080:80 \ --volume "$HOME/.sturdydata:/var/data" \ --env STURDY_GITHUB_APP_ID=<id> \ --env STURDY_GITHUB_APP_CLIENT_ID=<client_id> \ --env STURDY_GITHUB_APP_SECRET=<secret> \ --env STURDY_GITHUB_APP_PRIVATE_KEY_PATH=/var/data/github-private.key \ getsturdy/server
STURDY_GITHUB_APP_ID— The "App ID" from GitHub (example: "170000")
STURDY_GITHUB_APP_CLIENT_ID— The "Client ID" from GitHub (example: "Iv1.36afeeee456ff123")
STURDY_GITHUB_APP_SECRET— Generate a new client secret from GitHub (example: "aaa655ad971xxxxxxxxxxxxxxxxxxxxxxxx88e4b")
STURDY_GITHUB_APP_PRIVATE_KEY_PATH— The path to the GitHub App private key. Note that this is the path from inside the container. Copy the file to
$HOME/.sturdydata/github-private.keyon the host (outside of Docker) and access the file as
Congratulations! You are now ready to use Sturdy with GitHub integration.
For a getting started guide, refer to the Using Sturdy page.
If you have a problem setting up Sturdy, please follow the troubleshooting guide below, or reach out on the Sturdy Discord for Community Support.
Make sure that the server is up and running, once the server has started it will print a message like
[api] The server is ready, open the Sturdy App to get started! 🐣
If you don't see this message, something might be wrong with the setup.
It's important to not run Sturdy behind a TLS or HTTPS proxy. Sturdy uses both HTTP(s) (for the GraphQL API) and SSH (for file transfers) on the same port, which many proxies can't handle, and will very likely interfere with the SSH connections.
To setup TLS with Sturdy set the
SSL_KEY environment variables when running Sturdy (example).
When running Sturdy on non-localhost, you need to configure the CORS-header. Set the
STURDY_API_ALLOW_CORS_ORIGINS environment variable to the host that you're running Sturdy on (example:
To validate API connectivity run the command below. The server will respond with a 200 OK if everything is is working as it should.
curl -v "https://your-server:443/api/readyz"
To validate SSH connectivity run run the command below (replace 443 with the port number that Sturdy is running on). If everything is working, the server will print
ping! before closing the connection
ssh ping@your-server -p 443
The published Docker image
getsturdy/server contains Sturdy Enterprise, and is licensed under the Sturdy Enterprise License.