120 lines
3.4 KiB
Markdown
120 lines
3.4 KiB
Markdown
---
|
|
date: 2025-04-09
|
|
tags: infrastructure, servers, homelab
|
|
primaryTag: infrastructure
|
|
---
|
|
|
|
# Server Management Console
|
|
|
|
This article I'll describe some steps to manage and / or trouble shoot the
|
|
servers.
|
|
|
|
## Management Console
|
|
|
|
The servers have a management console that is accessible from the internal
|
|
network. You will need to get the login name and password from Michael.
|
|
|
|
| Server | Link |
|
|
| ------------ | ---------------------------------------------------------------------- |
|
|
| mighty-mini | [console.mightymini.housh.dev](https://console.mightymini.housh.dev) |
|
|
| franken-mini | [console.frankenmini.housh.dev](https://console.frankenmini.housh.dev) |
|
|
| rogue-mini | [console.roguemini.housh.dev](https://console.roguemini.housh.dev) |
|
|
|
|
The management console allows you to update the server, check logs, and access a
|
|
terminal on the machine. If you are updating the server via the management
|
|
console, it is often required to reboot the server. All of the services are
|
|
setup to restart upon a reboot of the server, so that should not cause problems,
|
|
but you will be disconnected from the management console when the server shuts
|
|
down. It does take a few minutes generally for the servers to go through the
|
|
full boot process.
|
|
|
|
> Note: If something is not running the easiest thing to do would be to just
|
|
> reboot the servers and the services should restart.
|
|
|
|
[You can view the server and services status here.](https://uptime.housh.dev/status/housh-dev)
|
|
|
|
## Reboot the server
|
|
|
|
You can reboot the server from the management console in the `Overview` section
|
|
or by typing the following command in the terminal.
|
|
|
|
```bash
|
|
sudo reboot --now
|
|
```
|
|
|
|
## Useful Tips
|
|
|
|
There are several commands that may help trouble shoot the services on the
|
|
server. For these you will need to make sure to turn on administrative access by
|
|
clicking the button, if needed.
|
|
|
|

|
|
|
|
All of the following commands can be entered into the `Terminal` section of the
|
|
console.
|
|
|
|
### Check the services are running
|
|
|
|
```bash
|
|
sudo docker ps --all
|
|
```
|
|
|
|
If working on a small screen or the output is bunched up then you can use the
|
|
following command to only reveal a smaller portion of the output.
|
|
|
|
```bash
|
|
sudo docker ps --format 'table {{.Names}}\t{{.Status}}'
|
|
```
|
|
|
|

|
|
|
|
Here you would look for services where the **_STATUS_** says `Exited` or if any
|
|
of the services say `unhealthy`.
|
|
|
|
### Service locations
|
|
|
|
The services are primary located in `/etc/komodo/stacks` or `~/containers`
|
|
directories. You can list the contents of those directories using the following
|
|
command.
|
|
|
|
```bash
|
|
ls -lah ~/containers
|
|
```
|
|
|
|
```bash
|
|
ls -lah /etc/komodo/stacks
|
|
```
|
|
|
|
### Starting services from the terminal
|
|
|
|
If you would like to ensure a service is up and running from the terminal move
|
|
into the directory of the service.
|
|
|
|
```bash
|
|
cd ~/containers/purchase-orders
|
|
```
|
|
|
|
And issue the following command
|
|
|
|
```bash
|
|
sudo docker compose up -d
|
|
```
|
|
|
|
### Check the logs of a running container
|
|
|
|
You can check the logs of a container in several different ways. The easiest is
|
|
if you know the containers name.
|
|
|
|
```bash
|
|
sudo docker logs -f purchase_orders
|
|
```
|
|
|
|
Or if you know the directory you can move into the directory using the `cd`
|
|
command and use the following.
|
|
|
|
```bash
|
|
sudo docker compose logs -f
|
|
```
|
|
|
|
To stop viewing the logs hit `Ctrl-c`.
|