A containerized IPFS server with smart contract-managed upload functionality for the Fr0g community. This service provides decentralized file storage with blockchain-based quota management and optional payment integration.
- IPFS Integration: Decentralized file storage using Kubo
- Smart Contract Management: Upload quotas and payments managed via Antelope blockchain
- File Type Support: Images (JPEG, PNG, GIF) and videos (MP4)
- Daily Quotas: Configurable free uploads per user and per day
- SSL/TLS Support: HTTPS reverse proxy with certificate management
- Email Notifications: Optional email alerts for new users
- Docker Deployment: Complete containerized setup with Docker Compose
- Docker and Docker Compose
- SSL certificates (for HTTPS)
- Fr0g blockchain account on which this
⚠️ Smart Contract is deployed⚠️ - SMTP server (optional, for email notifications)
git clone https://github.com/fr0gsite/CommunityIPFSServer.git
cd CommunityIPFSServerCopy the example environment file and configure your settings:
cp example.env .envEdit .env with your configuration:
# Blockchain Configuration
PRIVKEY=your_private_key_here
WALLETUSER=your_username_here
CHAINFQDN=https://blockchain-node:8443
NODEJSPORT=2053
# Email Configuration (Optional)
EMAIL_USER=your_email@example.com
EMAIL_PASSWORD=your_email_password
EMAIL_FROM=noreply@yourserver.com
EMAIL_TO=admin@yourserver.com
SEND_MAIL=1
SMTP_HOST=smtp.yourprovider.comPlace your SSL certificates in the certs directory:
mkdir -p certs
# Copy your certificates
cp /path/to/your/privatekey.pem certs/
cp /path/to/your/cert.pem certs/docker-compose build
docker-compose up -dGET /checkuser?username=<username>Response:
{
"slots": 5,
"freeslots": true
}POST /uploadForm Data:
username: Blockchain usernameprivkey: Private key for authenticationthumb: Thumbnail image file (max 1MB, JPG/PNG/GIF)file: Main file (max 15MB, JPG/PNG/MP4)
Response:
{
"success": true,
"uploadipfshash": "QmHash...",
"uploadipfshashfiletyp": "mp4",
"thumbipfshash": "QmHash...",
"thumbipfshashfiletyp": "jpg"
}docker exec -it nodejs cleos -u https://<blockchain_node>:8443 push action <username> init [''] -p <username>@activeThe smart contract manages the following configurable parameters:
- freeslotsperuser: Free uploads per user per day
- freeslotsperday: Total free uploads per day
- priceforslot: Cost per additional upload (in tokens)
- Ensure Docker and Docker Compose are installed
- Configure environment variables
- Set up SSL certificates
- Run
docker-compose up -d
For decentralized cloud deployment on Akash Network:
- Prepare your deployment manifest
- Configure the environment variables for Akash
- Deploy using Akash CLI
Note: Detailed Akash deployment instructions will be added in future updates.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Reverse Proxy │────│ Node.js API │────│ IPFS Node │
│ (Port 2053) │ │ (Port 4001) │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ SSL/TLS Certs │ │ Antelope Chain │ │ File Storage │
│ │ │ Smart Contract │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
Always check for the latest versions before deployment:
Update versions in http/Dockerfile as needed.
Made with ❤️ for the Fr0g Community