Teedy is a lightweight, open-source document management system designed for simplicity, efficiency, and complete self-hosting control. It empowers users to organize, search, and manage documents effortlessly while maintaining full data ownership. In this guide, weβll walk you through installing Teedy, configuring it with a reverse proxy, enabling logging, setting up backups, updating the app, and leveraging its unique features to maximize its potential.
Installing Teedy
π¦ Docker/Docker Compose Setup
Using Docker Compose is the easiest way to deploy Teedy with minimal effort. Hereβs the process:
- Create the
docker-compose.yml
file:
version: '3.7'
services:
teedy:
image: sismics/docs:latest
container_name: teedy
ports:
- "8080:8080" # Expose port 8080 for external access
volumes:
- teedy-data:/var/lib/teedy # Persistent data storage
environment:
- DOCS_TIMEZONE=UTC # Set the timezone (adjust as needed)
volumes:
teedy-data:
- Deploy Teedy:
mkdir teedy && cd teedy
nano docker-compose.yml # Paste the content above
docker-compose up -d
This will start Teedy on port 8080. You can access it via http://<your-server-ip>:8080
.
π Manual Installation
If you prefer a manual setup on a Linux server, follow these steps:
- Install Java (Teedy requires Java 8+):
sudo apt update
sudo apt install openjdk-11-jre -y
- Download Teedy:
wget https://github.com/sismics/docs/releases/latest/download/teedy.jar -O teedy.jar
- Run Teedy:
java -jar teedy.jar
By default, Teedy will run on port 8080. You can customize options like port and database in the configuration file.
Configuring Nginx as a Reverse Proxy
π Nginx Configuration
Set up Nginx to route traffic from a domain to Teedy:
- Create an Nginx server block:
sudo nano /etc/nginx/sites-available/teedy
- Add this configuration:
server {
listen 80;
server_name yourdomain.com;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
- Enable the configuration:
sudo ln -s /etc/nginx/sites-available/teedy /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
π SSL/TLS Setup
Secure your Teedy installation with HTTPS:
- Install Certbot for Letβs Encrypt:
sudo apt install certbot python3-certbot-nginx -y
- Obtain and configure an SSL certificate:
sudo certbot --nginx -d yourdomain.com
- Set up automatic renewal:
sudo systemctl enable certbot.timer
Logging and Debugging Teedy
ποΈ Enabling Debug Logs
To enable debug logging in Teedy, edit its configuration:
- Create or edit the configuration file:
nano config.properties
- Add debug logging:
log.level=DEBUG
- Restart Teedy:
docker restart teedy
## If running manually
java -jar teedy.jar
π Viewing Logs
Access logs to monitor Teedyβs behavior:
- With Docker:
docker logs teedy
- With manual setup:
tail -f logs/teedy.log
π οΈ Troubleshooting Common Issues
- Port conflicts: Check if another service is using port 8080.
sudo lsof -i :8080
- Database connection errors: Ensure the database service is running and accessible.
π€ Exporting Logs
To export logs for external analysis:
docker logs teedy > teedy_logs.txt
Backup and Restore
ποΈ File-Based Backups
Backup Teedyβs configuration and data files:
tar -czvf teedy-backup.tar.gz /var/lib/docker/volumes/teedy-data/
π Database Backups
If using a database (e.g., PostgreSQL), back it up:
docker exec -it postgres pg_dump -U username teedydb > teedy-db-backup.sql
To restore:
docker exec -i postgres psql -U username teedydb < teedy-db-backup.sql
π Automated Backup Scripts
Set up a cron job for periodic backups:
sudo crontab -e
Add:
0 2 * * * tar -czvf /backups/teedy-$(date +\%F).tar.gz /var/lib/docker/volumes/teedy-data/
Updating and Upgrading Teedy
β¬οΈ Updating Docker Images
- Pull the latest Teedy image:
docker-compose pull
- Recreate the container:
docker-compose down
docker-compose up -d
π οΈ Manual Updates
- Download the latest JAR:
wget https://github.com/sismics/docs/releases/latest/download/teedy.jar -O teedy.jar
- Restart the application:
java -jar teedy.jar
π Checking for Updates
Monitor the GitHub repository for releases:
https://github.com/sismics/docs/releases
Leveraging Teedyβs Unique Features
π§ Enabling APIs
Teedy provides an API for integrations and automation:
- Enable the API:
api.enabled=true
- Test the API:
curl -X GET http://localhost:8080/api
- Use with scripts:
import requests
response = requests.get("http://localhost:8080/api")
print(response.json())
π Advanced Configurations
- Custom storage paths: Change the default storage directory in
config.properties
.
storage.path=/custom/path
- Database integration: Configure Teedy to use PostgreSQL or MySQL for scalability.
Wrapping Up
In this guide, weβve covered installing, configuring, and managing Teedy, a powerful self-hosted document management system. With its lightweight design and robust features, Teedy is ideal for users who value simplicity and control. Start implementing these steps today to create a fully functional and secure document management environment tailored to your needs. Happy hosting!