More actions
No edit summary |
No edit summary |
||
(16 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This is a simple list of useful commands for use in the VPS. Some of the commands are self-explanatory and no description is needed. | This is a simple list of useful commands for use in the VPS. Some of the commands are self-explanatory and no description is needed. | ||
[[Category:Meta]] | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 5: | Line 7: | ||
!Command | !Command | ||
!Description | !Description | ||
|- | |- | ||
|nixos-rebuild switch | |{{ic|nixos-rebuild switch --target-host root@posixlycorrect.com --use-substitutes --flake .\#vps}} | ||
|Deploy server | |||
Use {{ic|--build-host root@posixlycorrect.com}} to compile inside the vps | |||
|- | |||
|{{ic|sudo -u postgres psql}} | |||
| | | | ||
|- | |||
|{{ic|sudo ss -tpn}} | |||
|Check current connections | |||
|- | |||
|{{ic|nix flake lock --commit-lock-file --update-input homepage}} | |||
|Deploy homepage | |||
|- | |||
|{{ic|fail2ban-client unban nginx-bad-request <banned ip>}} | |||
| | | | ||
|- | |- | ||
| | |{{ic|<nowiki>systemd.services.<service name>.serviceConfig.LoadCredential = [ <file name>:<full file path> ];</nowiki>}} | ||
| | |Load credential with systemd. Example: | ||
{{ic|<nowiki>systemd.services.tiddlywiki.serviceConfig.LoadCredential = [ credentials.csv:/var/trust/tiddlywiki/credentials.csv ];</nowiki>}} | |||
|- | |||
|{{ic|nixos-rebuild repl --flake .\#vps}} | |||
|Open a repl with server config loaded | |||
|- | |||
|{{ic|lib.fakeSha256}} | |||
| | | | ||
|- | |- | ||
| | |{{ic|https://matrix.posixlycorrect.com/_matrix/client/versions}} | ||
| | |url to monitor matrix | ||
| | |||
|} | |} | ||
==== Notable pages ==== | |||
[[MediaWiki:Citizen-footer-tagline]] | |||
[[MediaWiki:Citizen-footer-desc]] |
Latest revision as of 13:58, 4 September 2024
This is a simple list of useful commands for use in the VPS. Some of the commands are self-explanatory and no description is needed.
Command | Description |
---|---|
nixos-rebuild switch --target-host root@posixlycorrect.com --use-substitutes --flake .\#vps
|
Deploy server
Use |
sudo -u postgres psql
|
|
sudo ss -tpn
|
Check current connections |
nix flake lock --commit-lock-file --update-input homepage
|
Deploy homepage |
fail2ban-client unban nginx-bad-request <banned ip>
|
|
systemd.services.<service name>.serviceConfig.LoadCredential = [ <file name>:<full file path> ];
|
Load credential with systemd. Example:
|
nixos-rebuild repl --flake .\#vps
|
Open a repl with server config loaded |
lib.fakeSha256
|
|
https://matrix.posixlycorrect.com/_matrix/client/versions
|
url to monitor matrix |