Use Visor

Remote servers

Visor manages supervisord on your Linux servers over SSH, each in a tab beside this computer’s, like a browser. Nothing is installed on the server. It uses your own keys, your SSH agent and ~/.ssh/config.

The Remote servers page

Open Remote servers in the sidebar, just above Settings. Saved servers lists every server with how it connects and its status: Connected, Disconnected, Can’t connect or Not open. Connected at once, at most sets how many servers can be open together, from 1 to 10 (3 by default). This computer doesn’t count.

The Remote servers page: a Saved servers table with the server staging, the user it connects as, its options and a Connected status, with Add a server… above itThe Remote servers page: a Saved servers table with the server staging, the user it connects as, its options and a Connected status, with Add a server… above it

Add a server

Click Add a server… and fill in the form:

  • Name, Tag (Local, Development, Testing, Staging or Production) and Colour. The tag and colour mark the server’s tab.
  • Host and Port. The host can be an IP, a host name, or a Host alias from ~/.ssh/config, whose user, port, key and ProxyJump are used.
  • User, then a Password, an SSH key, or both. Leave the key empty to use ~/.ssh/config and your SSH agent, 1Password’s included.
  • Use sudo, for a supervisord that only root can reach. Its password can be the same as the SSH password, a different one, or none (NOPASSWD).
  • Read only: watch only, with no start, stop, restart or other changes from Visor.
  • Under Advanced: config path, jump host, notifications: the path of supervisord.conf when Visor can’t find it, a Jump host, and which changes made outside Visor notify you. A jump host logs in with a key or your SSH agent, never with this server’s password.

Passwords and passphrases go in your Keychain (or your keyring on Linux). servers.json holds none.

Test connects with the form as it is and shows what this user can do there. Connect saves the server and opens its tab. When it can’t connect, the form stays open with the report saying why, such as a wrong password, a key that needs its passphrase, or a host that doesn’t answer. Connect without saving opens a tab that keeps nothing: secrets stay in memory, and the server is forgotten when its tab closes.

Editing a server whose tab is open reconnects it.

What Test checks

The report shows the SSH login and host key, sudo, supervisord.conf, the socket (forwarded over SSH, through sudo, or why not, with its owner and mode), how many configs this user can read, and supervisord’s version. Each gap comes with its fix, such as turning on Use sudo or letting the user in through a group, with the commands to copy. Visor never runs sudo or changes the server’s files to fix these.

The same report is Server report in a server’s sidebar, laid out like Doctor. Its Configs writable row checks whether this user can write the folder configs go in.

Host keys

The first time, Visor shows the server’s key fingerprint for you to check before you trust it. Trusted keys go in Visor’s own list. Visor reads ~/.ssh/known_hosts but never changes it. A key that changed is refused, with the command that removes the old one (see Troubleshooting).

sudo, Production and Read only

  • Use sudo is off by default. When it’s on, sudo is asked once per connection: Visor runs a small Python helper for the length of the connection (Python comes with supervisord). A refused password is never tried again on its own, so it can’t lock the account.
  • Production servers ask before Stop, Restart, Signal, Clear logs, Stop all, Restart all, and restarting or shutting down supervisord, naming the server. They also ask before a config change applies.
  • Read only servers show no actions and change no config.

Tabs

This computer’s tab, This Mac, comes first and is always open. Servers open in the order you open them, and each tab keeps its page. The + beside the tabs opens a saved server that isn’t open. Visor starts with only this computer’s tab.

Ctrl+Tab and Ctrl+Shift+Tab move between tabs. ⌘W (Ctrl+W on Linux) closes a server’s tab.

A server tab has everything this computer’s dashboard has: processes and groups, their actions, CPU and memory, logs, Issues, Activity, notifications, the supervisord log and its configs. Its breadcrumb names the server. A config file’s ⋯ menu and its page header have Download a copy in place of Reveal in Finder, the menu’s config item reads Open config, and Open log in editor isn’t there.

In the menu-bar popover, each open server has its own section, and the icon shows the worst state across all tabs. Notifications name the server and open its tab.

Configs on a server

Configs on a server change the way this computer’s do: Save with the diff preview, the checks and a backup, Add new (form, templates or by hand), Copy an existing config…, Import files, Load, Apply changes, Remove from supervisor and Restore. See Program configs.

  • Visor writes through its helper on the server, as the SSH user, or as root with Use sudo. The file must still be what you opened, so an edit made on the server meanwhile is never overwritten. A dropped connection leaves the old file or the new one, never half of one.
  • Backups stay on your computer, in the server’s own folder in Visor’s state. Nothing extra is left on the server.
  • The checks look on the server: whether the command exists and can run, the working folder, the user and the log folder.
  • When the SSH user can’t write the include folder, the config pages say so, such as deploy can’t write /etc/supervisor/conf.d on the server, and link to the server report.
  • A config restored with Use sudo comes back owned by root. supervisord reads it as before. To edit it later without sudo, give it back to your user with sudo chown.

When the connection drops

The server’s tab and Remote servers say Disconnected, and Visor reconnects on its own, after 2 seconds and then less often, up to once a minute. Retry on Remote servers tries at once. Meanwhile an issue says Can’t reach the server over SSH. Once it’s back, the notification list says Reconnected to the server, with how long it was down. Visor stops reconnecting when the server refuses the password or its host key has changed, so it can’t lock the account or trust the wrong server.

Edit this page on GitHub

The text is under CC BY 4.0: reuse it with credit to Touhidur Rahman and a link to this page. The code examples are free to copy.