documentation/docs/advanced/tailscale.md
:::info This is only helpful for secure cross-device access to self-hosted Khoj. You do not need this if you're using Khoj Cloud. :::
Tailscale simplifies creating a private VPN using Wireguard and OAuth. So you can host and access services on your devices from anywhere. The instructions below are one way to simply and securely access your self-hosted Khoj from your phone, laptop etc.
--host <your_server_tailscale_ip>http://<your_server_tailscale_ip>:42110 to access khoj from any device on your tailscale network!:::info Tailscale uses Wireguard to encrypt and route traffic between your machines. So HTTPS isn't required with Tailscale for secure access. HTTPS with Tailscale is only useful for browsers to not complain about security and block certain features like clipboard access unless HTTPS is enabled. :::
# Assuming the server is named, `server` and your tailnet is `black-forest.ts.net`
# Note path of the .crt and .key files generated
tailscale cert server.black-forest.ts.net
sudo KHOJ_DOMAIN=server.black-forest.ts.net \
khoj \
--sslcert /path/to/your/tailscale.crt \
--sslkey path/to/your/tailscale.key \
--host=server.black-forest.ts.net \
--port 443
https://server.black-forest.ts.net from any device on your private tailscale network!