mirror of
https://github.com/m1ngsama/TNT.git
synced 2026-02-08 00:54:03 +00:00
- Move all documentation to docs/ directory for better organization - Rewrite README.md following Linux kernel style (English only) - Rename HACKING -> CONTRIBUTING.md - Rename QUICKREF -> QUICKREF.md - Rename README -> README.old - Add comprehensive Development-Guide.md for contributors Documentation structure: - README.md: Project overview and quick start - docs/Development-Guide.md: Complete developer manual - docs/CONTRIBUTING.md: Contribution guidelines - docs/DEPLOYMENT.md: Production deployment guide - docs/SECURITY_QUICKREF.md: Security config reference - docs/QUICKREF.md: Command cheat sheet This aligns with Linux kernel documentation practices: simple, organized, and accessible.
2.1 KiB
2.1 KiB
DEPLOYMENT
Quick Install
One-line install (latest release):
curl -sSL https://raw.githubusercontent.com/m1ngsama/TNT/main/install.sh | sh
Specific version:
VERSION=v1.0.0 curl -sSL https://raw.githubusercontent.com/m1ngsama/TNT/main/install.sh | sh
Manual Install
Download binary for your platform from releases:
# Linux AMD64
wget https://github.com/m1ngsama/TNT/releases/latest/download/tnt-linux-amd64
chmod +x tnt-linux-amd64
sudo mv tnt-linux-amd64 /usr/local/bin/tnt
# macOS ARM64 (Apple Silicon)
wget https://github.com/m1ngsama/TNT/releases/latest/download/tnt-darwin-arm64
chmod +x tnt-darwin-arm64
sudo mv tnt-darwin-arm64 /usr/local/bin/tnt
systemd Service
- Create user and directory:
sudo useradd -r -s /bin/false tnt
sudo mkdir -p /var/lib/tnt
sudo chown tnt:tnt /var/lib/tnt
- Install service file:
sudo cp tnt.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable tnt
sudo systemctl start tnt
- Check status:
sudo systemctl status tnt
sudo journalctl -u tnt -f
Configuration
Environment variables:
# Change port
sudo systemctl edit tnt
# Add:
[Service]
Environment="PORT=3333"
sudo systemctl restart tnt
Firewall
# Ubuntu/Debian
sudo ufw allow 2222/tcp
# CentOS/RHEL
sudo firewall-cmd --permanent --add-port=2222/tcp
sudo firewall-cmd --reload
Update
# Stop service
sudo systemctl stop tnt
# Re-run install script
curl -sSL https://raw.githubusercontent.com/m1ngsama/TNT/main/install.sh | sh
# Start service
sudo systemctl start tnt
Uninstall
sudo systemctl stop tnt
sudo systemctl disable tnt
sudo rm /etc/systemd/system/tnt.service
sudo systemctl daemon-reload
sudo rm /usr/local/bin/tnt
sudo userdel tnt
sudo rm -rf /var/lib/tnt
Docker (Alternative)
FROM alpine:latest
RUN apk add --no-cache libssh
COPY tnt /usr/local/bin/tnt
EXPOSE 2222
CMD ["/usr/local/bin/tnt"]
Build and run:
docker build -t tnt .
docker run -d -p 2222:2222 --name tnt tnt