No description
Find a file
Micke Nordin 1f3ddc4011 Fix OCM spec compliance and improve UI consistency
- Fix userID field name in invite accept request/response per OCM spec
- Add deprecated options field for backward compatibility with older
  OCM implementations (Nextcloud/ownCloud)
- Show user-friendly error messages when invite acceptance fails
- Fix SSH key authentication by extracting base64 from OpenSSH format
- Persist SSH host key across restarts
- Convert action buttons to icon-only style across all pages for
  consistent UI (shares, friends, profile, admin)
2025-12-22 22:58:51 +01:00
amity-rs Fix OCM spec compliance and improve UI consistency 2025-12-22 22:58:51 +01:00
app Ryn my own 2025-12-15 22:17:52 +01:00
assets Restructure and add database 2025-11-14 10:35:38 +01:00
static first commit 2025-06-24 13:27:40 +02:00
templates Ryn my own 2025-12-15 22:17:52 +01:00
tests Make test happy 2025-12-11 20:12:26 +01:00
.gitignore Add tests 2025-12-10 17:00:08 +01:00
amity-sync.sh Add sync-client 2025-12-13 17:43:04 +01:00
docker-compose.yaml Update protocol handling and flesh out readme and install instructions 2025-12-09 21:13:20 +01:00
Dockerfile Update protocol handling and flesh out readme and install instructions 2025-12-09 21:13:20 +01:00
pytest.ini Add tests 2025-12-10 17:00:08 +01:00
README.md Update protocol handling and flesh out readme and install instructions 2025-12-09 21:13:20 +01:00
requirements.txt Add tests 2025-12-10 17:00:08 +01:00
run-tests.sh Add tests 2025-12-10 17:00:08 +01:00
server.conf Set max files size for upload 2025-12-09 18:55:30 +01:00
setup.sh Update protocol handling and flesh out readme and install instructions 2025-12-09 21:13:20 +01:00

Amity

A lightweight Open Cloud Mesh (OCM) file sharing server with WebDAV support.

Quick Start Deployment

Prerequisites

  • Docker and Docker Compose installed
  • A domain name pointed to your server
  • Ports 80 and 443 available for nginx

Steps

  1. Clone the repository:

    git clone https://code.smolnet.org/micke/amity.git
    cd amity
    
  2. Run the setup script:

    chmod +x setup.sh
    ./setup.sh
    

    The script will prompt you for:

    • Your domain name (e.g., amity.example.com)
    • Your email address (for Let's Encrypt notifications)
  3. Build and start the containers:

    docker-compose build
    docker-compose up -d
    
  4. Get the temporary admin password:

    docker-compose logs amity | grep "TEMPORARY ADMIN PASSWORD"
    
  5. Access your instance:

    • Navigate to https://yourdomain.com
    • Login with username: admin
    • Use the temporary password from step 4
    • Change your password immediately after first login

Configuration

Upload Size Limit

The default upload limit is 512 MB. To change it:

  1. Edit server.conf:

    server.max_request_body_size: 1073741824  # 1 GB in bytes
    
  2. Edit nginx/vhost/yourdomain.com:

    client_max_body_size 1G;
    
  3. Restart the services:

    docker-compose restart
    

Data Persistence

All persistent data is stored in:

  • ./data/app.db - User database and metadata
  • ./data/files/ - Uploaded files
  • ./nginx/ - Nginx configuration and SSL certificates

Backup these directories regularly!

User Management

Creating Users

  1. Login as admin
  2. Navigate to the Admin page
  3. Fill in the "New user" form with User ID, Name, and Email
  4. Click "Create user"
  5. Generate a one-time password by clicking the 🔑 button next to the user
  6. Share the password securely with the new user
  7. User must change the password after first login

Managing Friends

Users can connect with friends on other OCM servers:

  • Accept Invite: Paste an OCM invite string from a friend
  • Add Friend Manually: Enter friend's name, email, and OCM address
  • Invite a Friend: Generate an invite string to share

Troubleshooting

Can't login after setup

Check the logs for the temporary admin password:

docker-compose logs amity | grep PASSWORD

File uploads fail

  1. Check that both CherryPy and nginx limits are set correctly
  2. Verify permissions on ./data/files/ directory:
    sudo chown -R 1000:1000 ./data/
    

SSL certificate issues

Let's Encrypt certificates are managed automatically by acme-companion. Check logs:

docker-compose logs acme

OCM sharing not working

Ensure your domain is accessible from the internet and ports 80/443 are open.

Development

To mount the code for live editing, uncomment in docker-compose.yaml:

volumes:
  - .:/app

Then restart: docker-compose restart amity

Credits

License

This project is licensed under the GNU Affero General Public License v3.0 only (AGPL-3.0-only).

See https://www.gnu.org/licenses/agpl-3.0.en.html for details.