A lightweight Docker image for a complete seedbox solution based on Alpine Linux
1.2K
A lightweight Docker image for a complete seedbox solution based on Alpine Linux, featuring:
Pull from a registry:
# GitHub Container Registry
docker pull ghcr.io/xninety9/greenhouse:latest
# Docker Hub
docker pull xninety9/greenhouse:latest
Or build locally:
docker-compose build
Create your WireGuard configuration file at ./config/wireguard/wg0.conf:
[Interface]
PrivateKey = YOUR_PRIVATE_KEY
Address = 10.x.x.x/32
DNS = 1.1.1.1
[Peer]
PublicKey = SERVER_PUBLIC_KEY
Endpoint = vpn.example.com:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25
Note: Replace with your actual VPN provider's configuration.
docker-compose up -d
Or manually:
docker run -d \
--name greenhouse \
--cap-add=NET_ADMIN \
--cap-add=SYS_MODULE \
--sysctl net.ipv4.conf.all.src_valid_mark=1 \
-p 5000:5000 \
-p 6881:6881 \
-p 6881:6881/udp \
-v $(pwd)/config:/config \
-v $(pwd)/downloads:/downloads \
-v $(pwd)/watch:/watch \
-v /lib/modules:/lib/modules:ro \
greenhouse:latest
Open your browser and navigate to: http://localhost:5000ā
greenhouse/
āāā Dockerfile
āāā docker-compose.yml
āāā config/
ā āāā rtorrent.rc # rtorrent configuration
ā āāā supervisord.conf # Service management
āāā scripts/
ā āāā entrypoint.sh # Container startup script
ā āāā healthcheck.sh # Health monitoring
āāā README.md
After first run, your data will be organized as:
./config/
āāā rtorrent/
ā āāā rtorrent.rc # rtorrent configuration
ā āāā log/ # rtorrent logs
āāā flood/ # Flood data directory
āāā wireguard/
āāā wg0.conf # Your WireGuard config (you create this)
./downloads/ # Downloaded torrents
./watch/ # Drop .torrent files here for auto-loading
./session/ # rtorrent session data
./config/wireguard/wg0.confThe container includes a killswitch that will block all non-VPN traffic, preventing IP leaks.
Edit ./config/rtorrent/rtorrent.rc to customize rtorrent settings:
Default ports:
Flood runs with authentication disabled by default for local use. To enable authentication, modify the supervisord.conf file:
command=/usr/bin/flood --host=0.0.0.0 --port=5000 --rundir=/config/flood --auth=default --rtsocket=/var/run/rtorrent/rpc.sock
Then restart the container.
Method 1: Via Flood UI
Method 2: Via Watch Directory
./watch/ directoryCheck container logs:
docker-compose logs -f
Check VPN connection:
docker exec greenhouse wg show
Check your IP address (should show VPN IP):
docker exec greenhouse curl -s ifconfig.me
wg0.conf is properly formatteddocker-compose logs greenhousedocker psdocker port greenhousedocker inspect greenhouse | grep Healthdocker exec greenhouse cat /var/log/supervisor/flood.logdocker exec greenhouse cat /var/log/supervisor/rtorrent.logdocker exec greenhouse rtorrent -n -o import=/config/rtorrent/rtorrent.rcIf you need to disable the killswitch temporarily for debugging:
docker exec greenhouse iptables -F
docker exec greenhouse iptables -P INPUT ACCEPT
docker exec greenhouse iptables -P FORWARD ACCEPT
docker exec greenhouse iptables -P OUTPUT ACCEPT
Warning: This disables leak protection!
Edit docker-compose.yml:
dns:
- 1.1.1.1
- 9.9.9.9
If your VPN provider supports port forwarding, add the forwarded port to your configuration:
Update rtorrent.rc:
network.port_range.set = YOUR_FORWARDED_PORT-YOUR_FORWARDED_PORT
Expose the port in docker-compose.yml:
ports:
- "YOUR_FORWARDED_PORT:YOUR_FORWARDED_PORT"
- "YOUR_FORWARDED_PORT:YOUR_FORWARDED_PORT/udp"
Add to docker-compose.yml:
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
memory: 512M
NET_ADMIN capability for VPN| Port | Protocol | Purpose |
|---|---|---|
| 5000 | TCP | Flood Web UI |
| 6881 | TCP/UDP | rtorrent incoming connections |
| 9091 | TCP | rtorrent XML-RPC (internal only) |
pieces.memory.max in rtorrent.rc based on available RAMFor issues:
docker-compose logs -fdocker exec greenhouse wg showThis Docker configuration is provided as-is for personal use. Please respect copyright laws and your VPN provider's terms of service.
Content type
Image
Digest
sha256:267892e9fā¦
Size
105.9 MB
Last updated
7 months ago
docker pull xninety9/greenhouse