Deploy a Tailscale Service for SSH on Koyeb
Learn more about Koyeb
·
Explore the documentation
·
Discover our tutorials
Koyeb is a developer-friendly serverless platform to deploy apps globally. No-ops, servers, or infrastructure management.
This repository is designed to show how to deploy a Tailscale service to Koyeb to allow easy SSH access. The application runs as a worker Instance, starting Tailscale and configuring it according to a given Tailscale authentication key. Once deployed, you can SSH into the Koyeb Instance from another machine connected to the Tailscale network.
Follow the steps below to deploy the Tailscale SSH service to your Koyeb account.
To use this repository, you need:
- A Koyeb account to build the
Dockerfileand deploy it to the platform. If you don't already have an account, you can sign-up for free. - A Tailscale authentication key to authenticate to your Tailscale network. You can generate an appropriate key by signing up for or logging into a Tailscale account and visiting the keys settings page. Create a key with the Reusable and Ephemeral options selected for use with Koyeb.
The fastest way to deploy the Tailscale SSH service is to click the Deploy to Koyeb button below.
Clicking on this button brings you to the Koyeb App creation page with the settings pre-configured to launch this application. Make sure to modify the TAILSCALE_AUTHKEY environment variable with your own value during the configuration process.
Once the service is deployed, you can SSH into the root account of your Koyeb Instance from another machine to your Tailscale network. The Koyeb Instance's Tailscale hostname should have the following format: <KOYEB_APP_NAME>-<KOYEB_SERVICE_NAME>.
To modify this application example, you will need to fork this repository. Checkout the fork and deploy instructions.
If you want to customize and enhance this application, you need to fork this repository.
If you used the Deploy to Koyeb button, you can simply link your service to your forked repository to be able to push changes. Alternatively, you can manually create the application as described below.
On the Koyeb Control Panel, on the Overview tab, initiate the app creation and deployment process by clicking Create Service and then choosing Worker:
- Select GitHub as the deployment source.
- Select your repository from the menu.
- Choose your preferred Instance type and region.
- In the Builder section, choose Dockerfile.
- In the Environment variables section, add a variable called
TAILSCALE_AUTHKEYand paste your Tailscale authentication key as the value. - Click Deploy.
The repository will be pulled, built, and deployed on Koyeb.
Once the service is deployed, you can SSH into the root account of your Koyeb Instance from another machine to your Tailscale network. The Koyeb Instance's Tailscale hostname should have the following format: <KOYEB_APP_NAME>-<KOYEB_SERVICE_NAME>.
If you have any questions, ideas or suggestions regarding this application sample, feel free to open an issue or fork this repository and open a pull request.