Servyrun is a self-hosted web application built with React JS + Tailwind CSS for the frontend and the backend of PHP Laravel. Servyrun allows you to run basic SSH & SFTP commands, do network pings between your servers, download, upload & edit files, view database tables and column structures and run MySQLdump.
Servyrun should not be used as your main connection to your servers but rather an easy method to monitor, be informed and do small tasks all through the web panel rather than an SSH client.
Servyrun was developed to be a multi-user platform, stores passwords encrypted and has an extensive API.
Demo website (read only functions enabled)
The full features of Servyrun as of September 2023:
Get your API token from your profile page: /profile
Your API token must be included in each request header as 'Authorization: Bearer YOUR_API_TOKEN'
'Accept: application/json'
and 'Content-Type: application/json'
are required for requests.
Pagination in use for calls that could return a large amount of results e.g 'index' calls
You can specify a page by using page=X
You can change the amount returned in results with per_page=50
{
"current_page": 2,
"data": [
//Good stuff in here
],
"first_page_url": "https:\/\/url.com\/api\/servers?page=1",
"from": null,
"last_page": 1,
"last_page_url": "http:\/\/url.com\/api\/servers?page=1",
"links": [
{
"url": "http:\/\/url.com\/api\/servers?page=1",
"label": "« Previous",
"active": false
},
{
"url": "http:\/\/url.com\/api\/servers?page=1",
"label": "1",
"active": false
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "https:\/\/url.com\/api\/servers",
"per_page": 20,
"prev_page_url": "https:\/\/url.com\/api\/servers?page=1",
"to": null,
"total": 1
}
GET
/servers/
GET
/servers/{Server}
GET
/servers/{Server}/pings
GET
/servers/{Server}/commands
GET
/servers/{Server}/ip
GET
/servers/help
PATCH
/servers/{Server}
An example body to update a server:
{
"title": "Lets change the title",
"ping_port": 123,
"hostname": "hostname.com"
}
POST
/servers/
'hostname' is the only required parameter
An example body to create a server:
{
"title": "SYD-1C-2GB-30GB",
"hostname": "syd.server.com",
"type_id": 1,
"cpu_cores": 1,
"cpu_freq": 3.1,
"ram_gb": 2,
"disk_gb": 30,
"ping_port": 80
}
DELETE
/servers/{Server}
comment
GET
/connections/
GET
/connections/{connection}
GET
/connections/help
PATCH
/connections/{connection}
POST
/connections/
An example body to create a password connection for a server:
{
"server_id": "ABCD1234",
"username": "root",
"password": "thePasswordGoesHere"
}
An example body to create a key password connection for a server:
{
"server_id": "ABCD1234",
"key_id": "qwerty12",
"username": "root",
"password": "thePasswordGoesHere"
}
DELETE
/connections/{connection}
POST
/connections/{connection}/run
An example body to run a command:
{
"command": "df -h"
}
An example body to run a command and get email notification:
{
"command": "df -h",
"email": true
}
comment
GET
/keys/
GET
/keys/{key}
POST
/keys
An example for uploading a key file:
curl
--location 'https://domain.com/api/keys' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer JN7tXwInJVwix3a8FlGLDdILHlSqRcC2oSIdDmPsdFWqD6oLcGgFz74FISSaWENA' \
--form 'file=@"/C:/thekey.private.ppk"'
PATCH
/keys/{key}
You can only pass the parameter password! Leave as empty quotes for no password.
{
"password": "thekeyspasswordgoeshere"
}
DELETE
/keys/{key}
comment
GET
/sftp/
GET
/sftp/{sftpConnection}
GET
/sftp/help
PATCH
/sftp/{sftpConnection}
{
"username": "jim",
"password": "thisgetsencryptedanyway",
"port": 44
}
POST
/sftp/
SFTP must have a server to be attached to!
{
"server_id": "HwCV0NMW",
"username": "user",
"password": "thisgetsencryptedanyway",
"port": 22
}
SFTP with a key connection
{
"server_id": "HwCV0NMW",
"key_id": "abcd1234",
"username": "user",
"port": 22
}
DELETE
/sftp/{sftpConnection}
comment
GET
/db/connection/
GET
/db/connection/{databaseConnection}
GET
/db/connection/help
PATCH
/db/connection/{databaseConnection}
{
"title": "changed title"
}
POST
/db/connections/
{
"host": "127.0.0.1",
"title": "a title",
"username": "user",
"password": "getsencrypted",
"port": 3306
}
DELETE
/db/connections/{databaseConnection}
GET
/db/connection/{databaseConnection}/refresh
GET
/db/connection/{databaseConnection}/databases
GET
/db/
GET
/db/{database}
GET
/db/{database}/tables
DELETE
/db/{database}
GET
/db/table/{databaseTable}
GET
/db/table/{databaseTable}/columns
DELETE
/db/table/{databaseTable}
POST
/db/table/{databaseTable}/query
The validation will only allow the columns to be those found in the table.
An example body to run a query, required fields only:
{
"column1": "id",
"condition1": ">",
"value1": "500"
}
An example body to run a query, required and optional fields:
{
"column1": "id",
"condition1": ">",
"value1": "500",
"column2": "id",
"condition2": "<",
"value2": "1000",
"order": "score",
"order_direction": "desc",
"limit": 20
}
GET
/db/column/{databaseTableColumn}
DELETE
/db/column/{databaseTableColumn}
comment
GET
/ips/
GET
/ips/{ipAddress}
GET
/ips/help
PATCH
/ips/{ipAddress}
POST
/ips/
An example body to create an IP for a server:
{
"server_id": "VtkBfSnG",
"ip": "127.0.0.1",
"is_main": 1,
"is_ssh": 1
}
POST
/ips/{ipAddress}/geo
DELETE
/ips/{ipAddress}
comment
GET
/pings/
GET
/pings/{ping}
DELETE
/pings/{ping}
GET
/ping-groups/
GET
/ping-groups/{pingGroup}
PATCH
/ping-groups/{pingGroup}
POST
/ping-groups/
DELETE
/ping-groups/{pingGroup}
POST
/ping-groups/{pingGroup}/add/{server}
DELETE
/ping-groups/{pingGroup}/remove/{server}
GET
/commands/
GET
/commands/{command}
PATCH
/commands/{command}
POST
/commands/
An example body to create a command:
{
"title": "Get storage info",
"command": "df -h"
}
DELETE
/commands/{command}
GET
/command-groups/
GET
/command-groups/{commandGroup}
PATCH
/command-groups/{commandGroup}
POST
/command-groups/
DELETE
/command-groups/{commandGroup}
POST
/command-groups/{commandGroup}/add/{connection}
DELETE
/command-groups/{commandGroup}/remove/{connection}
GET
/logs/
GET
/logs/{actionLog}
GET
/mysqldumps/
GET
/mysqldumps/{mySQLDump}
GET
/mysqldumps/{mySQLDump}/run
GET
/mysqldumps/help
PATCH
/mysqldumps/{mySQLDump}
POST
/mysqldumps/
DELETE
/mysqldumps/{mySQLDump}
GET
/downloaded/
GET
/downloaded/{downloadedFile}
GET
/downloaded/{downloadedFile}/{sftpConnection}
{
"save_as": "/animals/mouse.jpg"
}
DELETE
/downloaded/{downloadedFile}
Note: Servyrun comes with default locations that cannot be updated/deleted by users. Only Locations created by the user can be updated/deleted by them.
GET
/locations/
GET
/locations/{Location}
PATCH
/locations/{Location}
An example body to update a server:
{
"city": "Beach side",
"country": "Island"
}
POST
/locations/
'country' is the only required parameter
An example body to create a server:
{
"city": "Beach side",
"country": "Island"
}
DELETE
/locations/{Location}
Servyrun is open-sourced software licensed under the MIT license.