2.1 KiB
2.1 KiB
Gitea Workflow Deployment to NAS
This guide explains how to set up the Gitea workflow to deploy Kekbot to your NAS via SSH.
Prerequisites
- Docker and Docker Compose must be installed on your NAS
- SSH access enabled on your NAS with password authentication
Setup Instructions
1. Add SSH Password Secret to Gitea
- Go to your Gitea repository
- Navigate to Settings → Secrets (or Actions → Secrets)
- Add a new secret named
NAS_SSH_PASSWORD - Set the value to your NAS user password (hllywluis)
2. Verify NAS Configuration
Ensure your NAS has:
- Docker installed
- Docker Compose installed
- SSH server running on port 22
- Password authentication enabled for SSH
3. Test SSH Access (Optional)
Before running the workflow, you can test SSH access:
ssh hllywluis@luis-nas.lan
Workflow Configuration
The workflow file is located at .gitea/workflows/deploy-nas.yml
How It Works
- Build: Builds the Docker image locally using Docker Buildx
- Save: Saves the Docker image as a tar archive
- Transfer: Uses
sshpassto SSH into your NAS and copy files - Deploy: Loads the Docker image and runs
docker-compose up -d
Manual Trigger
You can manually trigger the deployment by:
- Going to your Gitea repository
- Navigating to Actions
- Selecting the Deploy to NAS workflow
- Clicking Run workflow
Troubleshooting
SSH Connection Failed
If the workflow fails with SSH connection issues:
- Verify
NAS_SSH_PASSWORDsecret is set correctly - Check that the NAS is reachable at
luis-nas.lan - Ensure SSH password authentication is enabled on the NAS
Docker Errors
If Docker fails on the NAS:
- Verify Docker is running:
docker ps - Check Docker Compose:
docker-compose --version - Review logs:
docker-compose logs
Permission Issues
The workflow uses the hllywluis user. If you need a different user:
- Update the
hllywluis@luis-nas.lanin the workflow file - Adjust the
/mnt/kCloud/Home/hllywluis/kekbotdirectory permissions accordingly