#
VPNs and Tunneling
VPNs and tunnels are a secure way to access your home network from anywhere in the world. This guide will show you how to use a VPN or a tunnel to access your SillyTavern instance from anywhere.
#
Methods
Use a home-made VPN.
Several routers come with the ability to host a VPN server (primarily OpenVPN or WireGuard) in the router administration page. Refer to your router's manual to setup a VPN and add your devices to the VPN. Once connected, just go to the private IP you have set for SillyTavern and you can connect just fine. Easier for users and for Windows use.
-
Cloudflare Zero Trust is a free organizational feature in Cloudflare that allows you to add 50 users. This will proxy your traffic through Cloudflare and by adding your ST PC as a tunnel using
cloudflared
, you can connect to your ST instance as if you were home.Do note that after making a tunnel, you will have to add a route to your router's private IP addresses and calculate IP CIDR values to have full local access on the go using Cloudflare Zero Trust.
Use a standalone Cloudflare or ngrok tunnel.
Similar to how AI backends can connect, you can also connect your ST instance via a Cloudflare Tunnel and open the Cloudflare Tunnel page. However, you will have to copy and paste each new link generated by Cloudflare/NGROK each time you want to use ST on-the-go.
Use Tailscale.
Tailscale is a VPN provider enabling a secure remote connection to your PC.
#
Tailscale setup
Tailscale is a VPN provider enabling a secure remote connection to your PC. An open-source implementation of the Tailscale server exists and you can also host the server using Headscale, but that is outside of the scope of this tutorial.
#
1. Creating an account
- Go to Tailscale's website and create a new account.
NOTE: For everyday use by a single person Tailscale will be permanently free. If you fear hidden costs, just don't add any payment options.
#
2. Setting up clients
- Go to Tailscale's download page and download the client/app on the device you have SillyTavern running on and on the device you want to use from a remote location.
- Log in on both devices with your previously created account.
- Go to Tailscale's admin page and approve both devices.
- Take note of both of the connected devices' names.
#
3. Adding your devices to the whitelist
- Add your connecting device's machine name (the one you want to use SillyTavern with) to SillyTavern's whitelist by following Managing whitelisted IPs.
#
4. Connecting
Now whenever you want to use SillyTavern from anywhere all you have to do is:
- Have Tailscale turned on on both the PC hosting SillyTavern and your device that wants to use it remotely.
- Open a browser on the device that wants to connect and go to
http://<machine name of PC running st>:8000/
#
5. Sharing SillyTavern instance with a friend (optional)
- Tell your friend to create their own Tailscale account and download the client on their device.
- Go to Tailscale's admin page.
- Hover over the three-dot button on your PC hosting SillyTavern and press "Share..." or press the three-dot button and press "Sharing settings...".
- Uncheck "Allow use as an exit node" (unless you want your friend to be able to route all their internet traffic through your PC).
- Either send the link as an email or change the tab to "Copy share link", press the big blue button with the same text, and send it to your friend in any other way.
- After clicking your share link, your friend will see your PC pop up in their Tailscale network.
- Send your friend the same link you use to access SillyTavern as explained in the last step.
NOTE: This will give your friend full access to any services running locally on your PC like SillyTavern, automatic1111, etc. Only do this if you truly trust your friend.