my-idlers/README.md

340 lines
8.8 KiB
Markdown
Raw Permalink Normal View History

2021-01-20 14:35:24 +11:00
# My idlers
2024-12-09 20:26:04 +11:00
A self-hosted web app for displaying, organizing and storing information about your servers (VPS/Dedi), shared &
reseller hosting, seedboxes,
2024-03-08 23:46:29 +11:00
domains, DNS and misc services.
2024-03-08 23:46:29 +11:00
Despite what the name infers this self-hosted web app isn't just for storing idling server information. By using
2022-11-02 11:02:12 +00:00
a [YABS](https://github.com/masonr/yet-another-bench-script) output you can get disk & network speed values along with
2024-12-09 20:26:04 +11:00
GeekBench 5 & 6 scores to do easier comparing and sorting. Of course storing other services e.g. web hosting is possible
and supported too with My idlers.
2021-01-20 14:35:24 +11:00
2024-12-09 17:05:17 +11:00
[![Generic badge](https://img.shields.io/badge/version-3.0.0-blue.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/Laravel-11.0-red.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/PHP-8.3-purple.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/Bootstrap-5.3-pink.svg)](https://shields.io/)
2022-05-22 13:35:32 +10:00
<img src="https://raw.githubusercontent.com/cp6/my-idlers/main/public/My%20Idlers%20logo.jpg" width="128" height="128" />
2023-09-11 23:32:37 +10:00
[View demo site](https://demo.myidlers.com/)
2022-05-22 13:35:32 +10:00
2024-03-08 23:46:29 +11:00
**Note:** Create, Update and Delete are disabled on the demo site.
## Project sponsor
2022-12-02 14:28:45 +11:00
Currently seeking a project sponsor
2021-08-19 17:24:28 +10:00
2024-12-09 17:05:17 +11:00
## 3.0.0 changes (9 December 2024):
2024-05-02 23:01:13 +10:00
2024-12-09 17:05:17 +11:00
* Updated PHP version to 8.3
2024-05-02 23:01:13 +10:00
* Updated Laravel version to ^11
* Updated composer package versions
2024-05-14 22:41:37 +10:00
* Updated routes into middleware grouping for auth
* Updated login and register forms
2024-12-09 17:05:17 +11:00
* Updated servers, shared, reseller and domains pages to use Datatables
* Added icons to back and submit button components
* Added icon button to shared and reseller create pages
* Added several updated OS versions to OsSeeder
* Added Font awesome Brands webfont
* Added IP whois data columns to the ips table
2024-12-09 23:15:03 +11:00
* Added IP whois data fetching and updating DB
2024-12-09 20:26:04 +11:00
* Added Note to API
2024-12-09 17:05:17 +11:00
* Fixed OS icons not loading in servers index page
2024-05-14 22:41:37 +10:00
* Fixed Settings being called without being created (existing)
* Fixed issue with OS: `Call to a member function toJson() on array`
2024-12-09 23:15:03 +11:00
* Fixed due in (days) column showing a massive float
2024-12-09 17:05:17 +11:00
* Removed 1 user being seeded
2024-05-02 23:01:13 +10:00
* Removed doctrine/dbal
#### Please run the following if updating from an existing install:
```shell
2023-02-19 13:12:59 +11:00
composer update
2022-12-02 14:28:45 +11:00
php artisan migrate
php artisan route:cache
php artisan cache:clear
```
2021-01-20 14:55:09 +11:00
## Requires
2021-01-20 14:35:24 +11:00
2024-12-09 17:05:17 +11:00
* PHP 8.3
2021-01-20 14:35:24 +11:00
2021-01-20 14:55:09 +11:00
## Features
2021-01-20 14:35:24 +11:00
* Add servers
* Add shared hosting
* Add domains
* [Auto get IP's from hostname](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ips-from-hostname.gif)
* [Check up/down status](https://cdn.write.corbpie.com/wp-content/uploads/2021/01/my-idlers-self-hosted-server-domain-information-ping-up-feature.gif)
2022-11-02 11:02:12 +00:00
* Get YABS data from output
2021-02-07 01:28:39 +11:00
* Compare 2 servers
2022-11-02 11:02:12 +00:00
* Save & view YABS output
* Update YABS disk & network results
2021-01-20 14:35:24 +11:00
* Next due date system
* Multi currency compatibility
* Multi payment-term compatibility
* Pre-defined operating systems
* Assign labels
2021-01-20 14:35:24 +11:00
* Assign server type (KVM, OVZ, LXC & dedi)
* Easy to edit values
2022-12-02 14:28:45 +11:00
* Assign notes
2021-01-20 14:35:24 +11:00
2021-01-20 14:55:09 +11:00
## Install
2021-01-20 14:35:24 +11:00
2022-03-06 13:03:59 +11:00
* Run `git clone https://github.com/cp6/my-idlers.git` into your directory of choice
* Run `composer install`
* Run `cp .env.example .env`
* Edit (If needed) MySQL details in .env
* Run `php artisan key:generate`
* Run `php artisan make:database my_idlers` to create database
* Run `php artisan migrate:fresh --seed` to create tables and seed data
* Run `php artisan serve`
## Updating
2022-05-16 16:46:08 +10:00
If you already have at least version 2.0 installed:
2022-05-16 16:46:08 +10:00
* Run `git clone https://github.com/cp6/my-idlers.git`
* Run `composer install`
2023-02-19 13:12:59 +11:00
* Run `composer update`
2022-05-16 16:46:08 +10:00
* Run `php artisan migrate`
* Run `php artisan route:cache`
* Run `php artisan cache:clear`
2022-05-16 16:46:08 +10:00
## Run using Docker
2022-05-16 16:46:08 +10:00
```
docker run \
-p 8000:8000\
-e APP_URL=https://... \
-e DB_HOST=... \
-e DB_DATABASE=... \
-e DB_USERNAME=... \
-e DB_PASSWORD=... \
ghcr.io/cp6/my-idlers:latest
2022-03-14 06:51:41 +00:00
docker exec ... php artisan migrate:fresh --seed --force # Set up database one time
```
## Managed Hosting
Run with a single click on [PikaPods.com](https://www.pikapods.com/)
[![PikaPods](https://www.pikapods.com/static/run-button.svg)](https://www.pikapods.com/pods?run=my-idlers)
2022-12-02 14:28:45 +11:00
## Adding a YABS benchmark
yabs.sh now has JSON formatted response and can POST the output directly from calling the script.
With My idlers you can use your API key and the server id to directly POST the benchmark result
`https://yourdomain.com/api/yabs/SERVERID/USERAPIKEYISHERE`
Example yabs.sh call to POST the result:
`curl -sL yabs.sh | bash -s -- -s "https://yourdomain.com/api/yabs/SERVERID/USERAPIKEYISHERE"`
2024-12-09 20:26:04 +11:00
## Credits
2024-12-09 20:26:04 +11:00
IP who is data provided by [ipwhois.io](https://ipwhois.io/documentation)
## API endpoints
2021-01-20 14:35:24 +11:00
For GET requests the header must have `Accept: application/json` and your API token (found at `/account`)
2021-01-20 14:35:24 +11:00
`Authorization : Bearer API_TOKEN_HERE`
2021-01-20 14:55:09 +11:00
All API requests must be appended with `api/` e.g `mydomain.com/api/servers/gYk8J0a7`
2021-01-20 14:55:09 +11:00
**GET request:**
2021-01-20 14:55:09 +11:00
`dns/`
`dns/{id}`
`domains/`
`domains/{id}`
`servers`
`servers/{id}`
`labels/`
`labels/{id}`
`locations/`
`locations/{id}`
`misc/`
`misc/{id}`
2021-01-20 14:55:09 +11:00
`networkSpeeds/`
2021-01-20 14:35:24 +11:00
`networkSpeeds/{id}`
2021-01-20 14:35:24 +11:00
`os/`
2021-01-20 14:35:24 +11:00
`os/{id}`
2021-01-20 14:35:24 +11:00
`pricing/`
`pricing/{id}`
2021-01-20 14:35:24 +11:00
`providers/`
`providers/{id}`
2021-01-20 14:35:24 +11:00
`reseller/`
`reseller/{id}`
2021-01-20 14:35:24 +11:00
2022-05-16 16:46:08 +10:00
`seedbox/`
`seedbox/{id}`
`settings/`
`shared/`
`shared/{id}`
2024-12-09 20:26:04 +11:00
`note/{id}`
**POST requests**
Create a server
`/servers`
Body content template
```json
{
"active": 1,
"show_public": 0,
"hostname": "test.domain.com",
"ns1": "ns1",
"ns2": "ns2",
"server_type": 1,
"os_id": 2,
"provider_id": 10,
"location_id": 15,
"ssh_port": 22,
"bandwidth": 2000,
"ram": 2024,
"ram_type": "MB",
"ram_as_mb": 2024,
"disk": 30,
"disk_type": "GB",
"disk_as_gb": 30,
"cpu": 2,
"has_yabs": 0,
"was_promo": 1,
"ip1": "127.0.0.1",
"ip2": null,
"owned_since": "2022-01-01",
"currency": "USD",
"price": 4.00,
"payment_term": 1,
"as_usd": 4.00,
"usd_per_month": 4.00,
"next_due_date": "2022-02-01"
}
```
**PUT requests**
Update a server
`/servers/ID`
Body content template
```json
{
"active": 1,
"show_public": 0,
"hostname": "test.domain.com",
"ns1": "ns1",
"ns2": "ns2",
"server_type": 1,
"os_id": 2,
"provider_id": 10,
"location_id": 15,
"ssh_port": 22,
"bandwidth": 2000,
"ram": 2024,
"ram_type": "MB",
"ram_as_mb": 2024,
"disk": 30,
"disk_type": "GB",
"disk_as_gb": 30,
"cpu": 2,
"has_yabs": 0,
"was_promo": 1,
"owned_since": "2022-01-01"
}
```
Update pricing
`/pricing/ID`
Body content template
```json
{
"price": 10.50,
"currency": "USD",
"term": 1
}
```
**DELETE requests**
Delete a server
`/servers/ID`
## Notes
**Public viewable listings**
If enabled the public viewable table for your server listings is at `/servers/public`
You can configure what you want viewable at ```/settings```
**Due date / due soon**
This is simply just a reminder. If the homepage is requested (viewed) when a service is over due date it will get reset
to plus the term from the old due date.
E.g if the term is a month then the due date gets updated to be 1 month from the old due date.
**Supporting YABS commands:**
```curl -sL yabs.sh | bash```
or
```curl -sL yabs.sh | bash -s -- -r```
Logo icons created by Freepik - Flaticon
## Screenshots for v2
[![My idlers screenshot1](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-home-2.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-home-2.jpg)
[![My idlers screenshot2](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-server-view.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-server-view.jpg)
2021-01-20 14:35:24 +11:00
[![My idlers screenshot3](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-servers-home.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-servers-home.jpg)
2022-11-02 12:09:17 +00:00
[![My idlers screenshot4](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-YABs.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-YABs.jpg)
2021-01-20 14:35:24 +11:00
[![My idlers screenshot5](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-add-server_2.png)](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-add-server_2.png)
[![My idlers screenshot6](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-servers-compare.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-servers-compare.jpg)
[![My idlers screenshot7](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-Ips.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-Ips.jpg)
[![My idlers screenshot8](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-labels.jpg)](https://cdn.write.corbpie.com/wp-content/uploads/2022/03/My-idlers-v2-labels.jpg)