Quick start with Docker
Casvisor runs on its own out of the box: the database is SQLite, and when no Casdoor is configured it keeps its own user accounts. One container is enough to try it.
1. Start Casvisor
docker run -d --name casvisor -p 19000:19000 -p 2222:2222 \
-v casvisor-db:/db -v casvisor-recordings:/recordings \
casbin/casvisor- Port 19000 is the web UI and the API. Port 2222 is the SSH gateway, for connecting with your own
ssh,scpand VS Code; leave out-p 2222:2222if you do not need it. - The
casvisor-dbvolume keeps the SQLite database, andcasvisor-recordingsthe session recordings, when the container is replaced. The image runs as UID 1000, so if you mount host directories instead of named volumes, make them writable for that user.
2. Find the administrator password
On first start, with no users yet, Casvisor creates the administrator admin with a random password and prints it in its log:
docker logs casvisor========================================================================
Casvisor created the administrator "admin" with the password: 7kQm2xT9wRp4ZbNa , sign in and change it in My Account
========================================================================To choose the first password yourself, add -e adminPassword=<password> to the docker run command, with at least 8 characters. It is only used when the first account is created; later changes go through My Account.
3. Sign in
Open http://<your-ip>:19000 and sign in as admin with that password. Then open My Account in the menu at the top right and change the password.
4. Add a server and connect
- Go to Assets, click Add, and fill in the protocol, host, port and, if you like, the account to log in with. See Assets.
- Click Connect on the asset. A new tab opens with the terminal or desktop.
As an administrator you can reach every asset. To let other people in, add them under Users (see Users and administrators) and give them a permission. Every session is recorded; replay it from Sessions.
With Docker Compose
The repository's docker-compose.yml does the same: it publishes 19000 and 2222, keeps the database in a volume, and has an adminPassword entry for the first password.
With MySQL
SQLite is enough for a single Casvisor. To keep the data in MySQL or MariaDB instead, pass the database settings as environment variables:
docker run -d --name casvisor -p 19000:19000 -p 2222:2222 \
-e driverName=mysql \
-e dataSourceName='casvisor:secret@tcp(192.168.1.30:3306)/' \
-e dbName=casvisor \
-v casvisor-recordings:/recordings \
casbin/casvisorCasvisor creates the database and its tables on first start, so the account needs the right to create a database. See Configuration.
The image casbin/casvisor-all-in-one carries its own MariaDB and is set up to use it, so it runs on its own as well. It keeps the database in /var/lib/mysql; mount a volume there (-v casvisor-db:/var/lib/mysql) or the data goes with the container.
Sign in with Casdoor
Instead of its own accounts, Casvisor can sign people in through Casdoor, for single sign-on, MFA, LDAP, SAML and social logins, and use Casdoor's groups in permissions. Setting casdoorEndpoint switches it over. See Connect Casdoor.
Introduction
Casvisor is an open-source bastion host. It gives people browser access to servers over SSH, RDP, VNC and Telnet, checks each connection against Casbin permissions, and records every session.
Connect Casdoor
Sign in to Casvisor through Casdoor instead of its built-in accounts: create an organization and an application for it, set the redirect URL, and copy the client ID and secret into app.conf.