Compare commits
32 Commits
6d3afb53b2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
c4af51c75a
|
|||
| 9ac5ecb497 | |||
| e4ad83f733 | |||
|
54a8cedb41
|
|||
| 8c685c4019 | |||
| 874afb42c2 | |||
| 12f6c997c8 | |||
| dea15a1305 | |||
| 19cf58a130 | |||
|
|
0adb55526c
|
||
| 9a58a047a0 | |||
|
|
634ef052bc
|
||
| 4368ce7908 | |||
| 12fedaabd7 | |||
| 0feb593e8f | |||
|
e97d3f08b2
|
|||
| c9f32cf982 | |||
|
|
b9cd84278e
|
||
| cfbf8b8258 | |||
|
3c3d3bc782
|
|||
| 5d368ab8ea | |||
| df9414da9e | |||
| 348f808b1b | |||
| d4e110f363 | |||
| ea6d8ff01c | |||
| bdf694d7a7 | |||
| 738e40ba48 | |||
| 3d3c28807c | |||
| 2f09a841bc | |||
| f3ea2e14d1 | |||
| 2d26b45791 | |||
| 67578b23d0 |
23
Caddyfile
Normal file
23
Caddyfile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
admin unix//run/caddy/admin.sock
|
||||||
|
}
|
||||||
|
|
||||||
|
gitea.miko089.space {
|
||||||
|
reverse_proxy :1024
|
||||||
|
}
|
||||||
|
|
||||||
|
foundry.miko089.space {
|
||||||
|
reverse_proxy :1489
|
||||||
|
}
|
||||||
|
|
||||||
|
catstest.miko089.space {
|
||||||
|
reverse_proxy :9999
|
||||||
|
}
|
||||||
|
|
||||||
|
just-mn.dev {
|
||||||
|
reverse_proxy :2347
|
||||||
|
}
|
||||||
|
|
||||||
|
calenbar.just-mn.dev {
|
||||||
|
reverse_proxy :2347
|
||||||
|
}
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
# space-infra
|
# space-infra
|
||||||
|
|
||||||
Infrastructure repo for this server
|
## Docs
|
||||||
|
docs folder includes some documentation about how to use server. Please read docs and ask questions if you don't understand how to use smth directly or in issues
|
||||||
|
|
||||||
|
## Scripts
|
||||||
|
|
||||||
|
### [adduser-script](/scripts/adduser-space)
|
||||||
|
enables lingering after creating a user\
|
||||||
|
lingering means user's systemd services are continue work after logout and start with system start
|
||||||
|
|||||||
44
docs/packages.md
Normal file
44
docs/packages.md
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# Packages
|
||||||
|
|
||||||
|
## Why? What have you done to suffer so much?
|
||||||
|
Idk any other ways to let all users access individual package managers, so you'll have to use Nix. Sorry
|
||||||
|
|
||||||
|
## How?
|
||||||
|
I installed nix-env which is available for every user, but it has disgusting commands, so I suggest bash and fish users paste this
|
||||||
|
functions into their respective `~/.bashrc` and `~/.config/fish/config.fish`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
function nix-install {
|
||||||
|
nix-env -iA "$@" 2>&1 | grep -v 'evaluation warning'
|
||||||
|
}
|
||||||
|
function nix-remove {
|
||||||
|
nix-env -e "$@" 2>&1 | grep -v 'evaluation warning'
|
||||||
|
}
|
||||||
|
function nix-upgrade {
|
||||||
|
nix-env --upgrade 2>&1 | grep -v 'evaluation warning'
|
||||||
|
}
|
||||||
|
function nix-rollback {
|
||||||
|
nix-env --rollback 2>&1 | grep -v 'evaluation warning'
|
||||||
|
}
|
||||||
|
function nix-list {
|
||||||
|
nix-env -q 2>&1 | grep -v 'evaluation warning'
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```fish
|
||||||
|
function nix-install
|
||||||
|
nix-env -iA $argv 2>&1 | grep -v 'evaluation warning'
|
||||||
|
end
|
||||||
|
function nix-remove
|
||||||
|
nix-env -e $argv 2>&1 | grep -v 'evaluation warning'
|
||||||
|
end
|
||||||
|
function nix-upgrade
|
||||||
|
nix-env --upgrade 2>&1 | grep -v 'evaluation warning'
|
||||||
|
end
|
||||||
|
function nix-rollback
|
||||||
|
nix-env --rollback 2>&1 | grep -v 'evaluation warning'
|
||||||
|
end
|
||||||
|
function nix-list
|
||||||
|
nix-env -q 2>&1 | grep -v 'evaluation warning'
|
||||||
|
end
|
||||||
|
```
|
||||||
11
docs/podman.md
Normal file
11
docs/podman.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Podman
|
||||||
|
|
||||||
|
## Why?
|
||||||
|
On that server we use podman instead of docker because it's:
|
||||||
|
- rootless by default
|
||||||
|
- individual for each user (you won't be able to access container of other person)
|
||||||
|
- have preinstalled k8s (which is called pod and idk why it's needed for us but it's hella cool)
|
||||||
|
|
||||||
|
## How to use?
|
||||||
|
Exactly the same as docker, but, obviously, instead of `docker` write `podman`. More documentation find [there](https://podman.io/docs)
|
||||||
|
|
||||||
26
docs/ports.md
Normal file
26
docs/ports.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Used ports
|
||||||
|
|
||||||
|
This file explains which ports are used and for what reason (please categorize them somehow and sort if possible)
|
||||||
|
|
||||||
|
## Shared usage
|
||||||
|
22 - open - ssh\
|
||||||
|
80 - open - caddy\
|
||||||
|
443 - open - caddy\
|
||||||
|
1024 - closed - gitea exposed on that port inside the server (not allowed to use from outside)\
|
||||||
|
1025 - open - gitea exposed it's ssh on that port (therefore allowed from outside)
|
||||||
|
|
||||||
|
#### User ports
|
||||||
|
1256 - open - Rogon1256's personal port\
|
||||||
|
2347 - closed - just-mn's personal port\
|
||||||
|
8443 - open - another justmn's personal port\
|
||||||
|
2047 - open - another justmn's personal port\
|
||||||
|
2048 - open - another justmn's personal port\
|
||||||
|
1489 - open - miko089's foundry instance\
|
||||||
|
9999 - closed - cat thing
|
||||||
|
|
||||||
|
## Rules
|
||||||
|
If you want to add some extra port, then please:
|
||||||
|
1. Check opened prs of other people
|
||||||
|
2. Use 1024+ (because user for caddy isn't root and I don't want to change smth so please)
|
||||||
|
|
||||||
|
There will be more, but that's all for now
|
||||||
6
scripts/adduser-space
Normal file
6
scripts/adduser-space
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
username=$1
|
||||||
|
useradd -m -s /bin/bash "$username"
|
||||||
|
loginctl enable-linger "$username"
|
||||||
|
echo "$username"
|
||||||
Reference in New Issue
Block a user