Casvisor gives your team one place to reach servers, desktops and databases from the browser.
It connects over SSH, RDP, VNC, Telnet, MySQL, PostgreSQL, SQL Server, Oracle, Redis, MongoDB, ClickHouse, Dameng and HTTP for internal websites, with an SSH gateway for ssh, scp and VS Code and a database proxy for DBeaver, Navicat, mysql and psql,
and records every session, checks every command and keeps the passwords to itself.
Website Β· Documentation Β· Live demo Β· Discord
No database and no config file needed. This runs Casvisor on SQLite with its own accounts:
docker run -d --name casvisor -p 19000:19000 -p 2222:2222 \
-v casvisor-db:/db -v casvisor-recordings:/recordings casbin/casvisor
docker logs casvisorOpen http://localhost:19000 and sign in:
| Field | Value |
|---|---|
| Username | admin |
| Password | the one printed in docker logs casvisor |
Pass
-e adminPassword=<password>to choose the first password instead. Either way, change it under My Account after you sign in.
Prefer not to install anything? The hosted demo at demo.casvisor.com comes with a sandboxed Linux shell (SSH) and a private desktop (VNC) to connect to. Nothing there touches a real server, sessions end after 15 minutes, and each visitor can keep two sessions open at a time.
Casvisor sits between the people who run your servers and the servers themselves. People open sessions from a browser tab, or with their own ssh, scp and VS Code through the SSH gateway. They only reach the servers and databases a permission gives them, and never see the stored passwords.
- One Go binary. Casvisor speaks SSH, RDP, VNC, Telnet, MySQL, PostgreSQL, SQL Server, Oracle, Redis, MongoDB, ClickHouse, Dameng (DM8), HTTP and the Kubernetes API itself, with nothing to install on the servers. It runs on SQLite with its own accounts out of the box.
- Apache-2.0, no enterprise edition. Recording, the SSH gateway, network gateways, system accounts, jobs and everything else in this README are in the open-source project.
- Policy you can read. Permissions are enforced with Casbin, and sign-in can be handed to Casdoor for SSO, MFA, LDAP and social logins.
- Audit by default. Sessions are recorded, commands and SQL statements are checked against your rules and logged, and the logs export to CSV, Excel or a syslog server.
Coming from another bastion host? See how Casvisor compares with JumpServer, Teleport and others.
Three supported paths, fastest first. All of them end up at http://localhost:19000.
docker run -d --name casvisor -p 19000:19000 -p 2222:2222 \
-v casvisor-db:/db -v casvisor-recordings:/recordings casbin/casvisorPort 19000 is the web console and port 2222 is the SSH gateway. The two volumes keep the database and the session recordings when the container is replaced.
Guide: Quick start
docker-compose.yml builds the image from this repository and runs it with the same ports and volumes:
docker compose up -dSet adminPassword in the compose file to choose the first password of admin; when it is empty, a random one is printed in the log.
Use this if you intend to modify Casvisor. Prerequisites: Go 1.23+ (see go.mod), Node.js 20 LTS and Yarn 1.x.
git clone https://github.com/casvisor/casvisor
cd casvisor/web && yarn install && yarn build && cd ..
go run main.goGuide: Build from source
Settings are read from conf/app.conf. Put the settings of your own server in conf/app.local.conf (same format, not tracked by git), or pass any of them as environment variables.
Database. The default is SQLite. To use MySQL instead (the database is created if it does not exist):
driverName = mysql
dataSourceName = root:123456@tcp(localhost:3306)/
dbName = casvisorSign in with Casdoor. Instead of its own accounts, Casvisor can sign users in with Casdoor, for SSO, MFA, LDAP and third-party logins, and use Casdoor's groups in permissions. Create an organization and an application for Casvisor in Casdoor, add http://<your Casvisor host>/callback to the redirect URLs of the application, and set:
casdoorEndpoint = https://<your Casdoor host>
clientId = <client ID of the application>
clientSecret = <client secret of the application>
casdoorOrganization = <organization>
casdoorApplication = <application>When casdoorEndpoint is empty, Casvisor uses its own accounts.
Recordings. Sessions are recorded to recordings/ under the working directory (/recordings in Docker). recordingPath moves them, recordingRetentionDays deletes the ones older than that many days, and disableRecording = true turns recording off. To keep them in an S3-compatible bucket instead, set:
recordingStorage = s3
recordingS3Endpoint = s3.us-east-1.amazonaws.com
recordingS3Region = us-east-1
recordingS3Bucket = <bucket>
recordingS3Prefix = casvisor
recordingS3AccessKey = <access key>
recordingS3SecretKey = <secret key>Recordings are still written to the disk first, so a session never waits for the bucket; when the session ends the recording is uploaded and the local copy deleted (recordingKeepLocal = true keeps it). If the bucket can't be reached, the upload is retried every 5 minutes. recordingS3PathStyle = true is for MinIO and others that need path-style URLs.
SSH certificates. To let users sign in to the SSH gateway with OpenSSH certificates instead of registering public keys, set sshGatewayTrustedUserCaKeys to the CA public keys (one per line or separated by ;) or to a file of them, like sshd's TrustedUserCAKeys. The certificate's principal is the Casvisor user, <user> or <organization>/<user>; validity, source-address and the login rules are checked.
Metrics. Set metricsToken and point Prometheus at /metrics with authorization: {credentials: <token>}. It is off while metricsToken is empty.
Guide: Configuration Β· Sign in with Casdoor Β· Behind a reverse proxy
At this point you have a running bastion host with nothing behind it yet. Next:
- Change the
adminpassword under My Account, and turn on two-step verification there. - Add an asset under Assets (a server, a desktop or a database) and click Connect. Administrators reach every asset.
- Let other people in: add them under Users and give them a Permission on assets or asset tags.
- Use the SSH gateway: users add their public key under SSH keys and connect with
ssh -p 2222 <asset>@<your Casvisor host>. - Add command rules to block, hold for review or flag commands such as
rm -rf /orDROP DATABASE.
π Connect
- SSH β an xterm.js terminal in the browser, with a file panel beside it for upload and download over SFTP
- RDP β gordp, a pure-Go RDP client: NLA, the GFX graphics pipeline (ClearCodec, RemoteFX Progressive) like the Windows client, sharp text on high-DPI screens, the remote cursor, clipboard with text, images and files, resizing with the window, and file transfer through a redirected drive. Works with Windows Server, Windows 10/11 and FreeRDP-based hosts such as Ubuntu
- VNC β noVNC in the browser; Casvisor does the VNC authentication itself, so the password stays on the server
- Telnet β for network gear and old systems, logging in with the asset's account
- MySQL, PostgreSQL, SQL Server and Oracle β a browser SQL console with the databases, tables and columns on the left, one tab per result, and CSV export; SQL Server scripts run batch by batch between
GOlines, and Oracle PL/SQL blocks end with a/line - ClickHouse and Dameng (DM8) β the same SQL console, over the native protocol of ClickHouse and the pure-Go driver of Dameng, with Dameng's schemas on the left like Oracle's
- Database clients on your own machine β DBeaver, Navicat, DataGrip,
mysql,psqland JDBC reach MySQL and PostgreSQL assets through Casvisor's database proxy, signed in with a database token from the web console as both the user and the password; every statement, prepared ones included, is checked against the command rules and recorded like in the browser, over TLS, and revoking the token or the permission disconnects - Redis and MongoDB β the same console for Redis commands, with the keys and their types on the left, and for MongoDB shell calls such as
db.users.find({age: {$gt: 18}}).sort({name: 1}), with the collections and their fields on the left - Websites β internal web apps such as Grafana, Jenkins or a router's admin page, each opened on a subdomain of its own through Casvisor's reverse proxy, WebSockets included, with optional HTTP basic authentication filled in by Casvisor; uploads and downloads follow the
UploadandDownloadactions, and pages opened and changing requests are recorded - Remote browser β or open a website in a headless Chrome, Chromium or Edge that Casvisor runs on its server, shown in the page like a remote desktop: Casvisor fills in the sign-in form, in one or two steps, with the account's password, which the user never sees; the browser reaches only that website, through the network gateway, so pages that hard-code their own address still work; the clipboard, uploads and downloads follow the
Copy,Paste,UploadandDownloadactions, every page opened is checked against the command rules, and the screen is recorded, watched live and replayed - Kubernetes β pick a namespace, a pod and a container, then open a shell in it, follow its log with a chosen number of lines and download it, or copy files in and out the way
kubectl cpdoes; the cluster's token stays on the server and its API server is pinned by its public key - kubectl through Casvisor β download a kubeconfig that holds a Casvisor token valid for eight hours, and use kubectl, Lens or any other client as usual: every request is checked against the permission, its namespaces and the command rules, such as a rule that blocks
delete namespaces, and recorded;kubectl exec -itshells are recorded like the web terminal, andexec,attach,port-forward,cpandlogs -fwork over WebSockets. Revoking the kubeconfig or the permission ends its watches and shells at once - SSH gateway β
ssh -p 2222 web-01@casvisor.example.com,scp,sftp,rsync, Xshell and VS Code Remote, signed in with the user's public key, or an OpenSSH certificate from a CA you trust (Vault, step-ca,ssh-keygen -s), and under the same permissions as the browser;-Lalso forwards Unix sockets such as/var/run/docker.sock - Port forwarding to any asset β
ssh -p 2222 -N -L 13389:win-01:3389 alice@casvisor.example.com, then mstsc, a VNC viewer or a database client connects tolocalhost:13389 - Local clients β open an asset in a client on your own machine from the asset list, with a one-time token that works once within two minutes: Xshell, SecureCRT, WinSCP and the like through the SSH gateway, and Remote Desktop Connection (mstsc) through a built-in Remote Desktop Gateway, which signs in to Windows with the stored password so that users never see it
- Casvisor Launcher β a small helper for Windows, Linux and macOS that opens the
casvisor://links of the web console in the client you have: Xshell, SecureCRT, PuTTY or Windows Terminal for SSH, WinSCP or FileZilla for SFTP, mstsc for RDP, and mysql, psql or DBeaver for databases; download it from the latest release - Network gateways β reach assets in another data center or behind NAT, through an SSH jump host or an agent that connects out over HTTPS; the gateways of a network domain share the connections by priority and weight and fail over to each other, with a health check every minute
- Stored credentials β passwords and private keys are encrypted in the database and filled in by Casvisor; SSH host keys and RDP certificates are pinned on first use
- Cloud accounts β the servers of Alibaba Cloud, AWS, Tencent Cloud, Azure, Google Cloud and Huawei Cloud accounts become assets, Linux as SSH and Windows as RDP, in a node per region of the asset tree; a preview shows what a sync changes, and syncs can run on a schedule
π‘οΈ Control
- Permissions β on users, groups, assets and asset tags, with the actions
Connect,Copy,Paste,Upload,DownloadandForward, client IP ranges, a start and end date, and weekly hours such as Monday to Friday 09:00β18:00; open sessions are disconnected when the hours end. On Kubernetes assets a permission can be limited to some namespaces, and to reading only (get, list and watch) - System accounts β several accounts per asset, such as
root,deployandreadonly; permissions decide which one a user may connect with, and passwords can be changed by hand or on a schedule on Linux, Unix, macOS and Windows over SSH, on Cisco, Huawei, H3C and Juniper devices through their CLI, and in MySQL, MariaDB, PostgreSQL, SQL Server, Oracle, Redis and MongoDB, each new password checked by signing in with it - Platforms β each kind of system, built in or copied and changed, with its protocols and default ports, the charset of its terminal, how to become privileged (sudo, su or enable), how its passwords are changed (the CLI commands of a network device included), and the length and characters of its random passwords
- Account templates β give many assets the same system account at once, with one password or a random one for each asset, pushed to the assets and rotated; applying again keeps them in line
- Account risks β weak, old and reused passwords, accounts with no password, and accounts on the assets that Casvisor does not manage, privileged ones first, found by a daily scan; fix them in bulk by changing the password, managing the account, or locking it on the asset
- Account backups β the passwords and private keys of the system accounts and the assets, in a zip file encrypted with AES-256 that 7-Zip, WinRAR and macOS open with its password; download it, or have it emailed on a cron schedule, and restore it into this or a new Casvisor with a preview first
- Access requests β users ask for an asset with a reason and an end time, an administrator approves, and withdrawing it disconnects open sessions
- Two-step verification β for local accounts, with any TOTP authenticator app
- Connect rules β allow or reject ways to connect by user, group, asset, tag and account: the browser, SSH clients, SFTP, scp and rsync, port forwarding, Remote Desktop Connection and kubectl; for example only the browser for contractors, or no port forwarding to production
- Session sharing β share your session with colleagues through a link and a six-digit code, for them to watch it or type in it too; you see who joins and leaves, what they type goes through the command rules under their own name, and revoking the share disconnects them
- Command rules β block or flag commands matching a regular expression, in the web terminal, the SQL console, website requests, kubectl requests such as
delete namespaces/devand through the SSH gateway alike - Command review β a command a Review rule matches waits until another administrator approves it, then runs in the same session; the user can withdraw it with Ctrl+C
- Revocation takes effect at once β open sessions are disconnected as soon as their permission or account is edited, deleted or expires
π Audit
- Session recording and playback β SSH, Telnet, Kubernetes shells, VNC, RDP and the remote browser, replayed in the browser with the same code that drew them live; SSH and Telnet recordings download as asciicast. Recordings are kept on disk or moved to an S3-compatible bucket (AWS S3, Alibaba Cloud OSS, Tencent COS, Cloudflare R2, MinIO) when the session ends
- Live monitoring β watch online sessions and stop any of them; an administrator can take part in a terminal session and type in it, the user is told who joined, and the commands are logged with the administrator as the operator
- Command records β SSH and Telnet commands are read off a virtual screen, so tab completion, history and line edits are captured as they ran; SQL statements are logged too
- Operation log β file transfers and every change made through the API
- Audit reports β sign-ins (failed, off-hours and rejected by login rules), sessions and their duration by user, asset and protocol, blocked, flagged and reviewed commands with the rules they hit, file transfers, access requests and reviews, password changes and account risks, and asset and permission changes, for this week, last month or any dates; print it to PDF, download it as an Excel workbook with a sheet for each part, or have it emailed on a cron schedule
- Export and syslog β session, command and operation logs and the assets export to CSV or Excel, assets import from either, and the logs can be forwarded to a syslog server as RFC 5424 JSON or CEF
- Notifications β blocked and flagged commands, access requests, sign-ins and commands waiting for review, finished jobs, new account risks and failed backups and reports, sent to DingTalk, Feishu, WeCom and Slack group bots, to your own systems as signed JSON, or by email through your SMTP server
βοΈ Operate
- Jobs β run a command, a Bash or PowerShell script, or a file copy on many SSH assets at once, picked by name, tag or asset tree node, with concurrency, timeouts and per-asset output and exit codes
- Ansible playbooks β run a playbook as a job without installing Ansible: Casvisor runs it over its own SSH connections, so the command rules, command review, recording and network gateways apply to every task. It supports the common modules (command, shell, script, raw, copy, template, file, lineinfile, apt, yum, dnf, package, service, systemd, user, group, get_url, debug, set_fact, assert, fail), vars, extra variables, become, when, loops, register, ignore_errors, changed_when, failed_when, handlers and check mode, checks the playbook before it runs, and shows ok, changed, failed and skipped for every task on every asset
- Job schedules β run a job on a cron schedule in any time zone, such as a backup at 03:00 every day; a run is skipped while the last one is still going, and webhooks tell when a job fails
- Patch management β scan SSH assets for pending system updates, install them and restart, on Windows (Windows Update) and Linux (apt, dnf, yum)
- REST API β every console action is also an API call, with Swagger docs
- Prometheus metrics β
/metricsreports connected sessions, sessions, commands, assets, access requests and network agents, behind the bearer token inmetricsToken - Web console β in 9 languages, built with React, Vite and shadcn/ui
Assets in another data center, or behind NAT in an office, are reached through a network gateway. Add one under Network gateways and pick it in the asset's Network gateway field. Every connection to the asset (web SSH, Telnet, VNC, RDP, databases, the SSH gateway and patch management) then goes through it.
-
SSH jump host: a server in that network that Casvisor can log in to over SSH. Nothing is installed on it; its sshd needs
AllowTcpForwarding yes. -
Agent: for networks Casvisor cannot connect into at all. Generate a token on the gateway's page and run the agent on any machine in that network:
casvisor agent --server https://casvisor.example.com --token cva_... --fingerprint SHA256:...
The agent is the same
casvisorbinary (with Docker:docker run -d --restart unless-stopped casbin/casvisor agent --server ...). It connects out to Casvisor's web address over WebSocket, so it works wherever HTTPS gets out, listens on no port, and only connects to the Allowed networks set on the gateway.
Gateways with the same Network domain reach the same network, and an asset using any of them goes through the domain: the healthy gateways of the smallest Priority first, shared among them by Weight, and the next gateway when one can't be reached. Casvisor checks every enabled gateway every minute (networkGatewayCheckInterval in seconds, 0 to turn it off): a jump host by logging in, an agent by whether it is online. The gateway list shows each one's status, latency and last error. A gateway without a domain is used on its own, as before.
Guide: Network gateways
Casvisor is a frontendβbackend separated application:
- Backend β Go with the Beego framework: the REST API, the protocol tunnels and the SSH gateway (repository root)
- Frontend β React with shadcn/ui on Tailwind CSS, built with Vite: the console, the workbench and the session player (
web/) - RDP β casvisor/gordp, a pure-Go RDP client
- Authorization β Casbin
- Database β SQLite or MySQL through XORM
The full documentation lives at casvisor.org. Common starting points:
| I want to⦠| Go to |
|---|---|
| Install Casvisor | Quick start Β· From source |
| Connect to servers and databases | Protocols Β· Databases Β· SSH gateway |
| Decide who can reach what | Permissions Β· Access requests |
| Review what people did | Recordings Β· Commands Β· Export |
| Run it in production | Configuration Β· Reverse proxy Β· Upgrading |
Please do not report security vulnerabilities in public GitHub issues. Email admin@casdoor.org instead.
Before exposing a Casvisor instance to the internet:
- Change the
adminpassword and turn on two-step verification, or sign in through Casdoor. - Serve Casvisor over HTTPS only, behind a reverse proxy, and set
trustedProxiesandallowedOriginsinconf/app.conf. - Keep port 2222 (the SSH gateway) closed to networks that do not need it.
- Back up the credential key with the database: stored passwords and private keys cannot be decrypted without it. It is
credentialKeyin the config, orcredential.keynext to the SQLite database when that is not set.
- Discord β join the community for questions and help
- GitHub Issues β bug reports and feature requests
Contributions are welcome. For anything larger than a small fix, please open an issue first so you can agree on the approach with the maintainers before writing code.
Translations. User-facing strings in the web console go through i18next. After adding or changing one under web/, run go test -tags manual ./i18n -run TestGenerateI18nStrings to add the new keys to every catalog in web/src/locales/, then translate them.
Casvisor is licensed under the Apache License 2.0.
If Casvisor is useful to you, a star helps other people find it.
Β© 2026 Casvisor Β· Apache License 2.0


