MI
MicheleYin/mangayomi-server
mangayomi-server
A self-hosted server for Mangayomi.
Hosted Servers
Requirements
- Rust and MongoDB
- or Docker Engine / Desktop
IDE
Setup - Local
- Install Rust
- Setup a MongoDB Server by either using a hosting platform or on your on machine / server.
If you need a free MongoDB server that runs 24/7: MongoDB Atlas
If you want to install your own server locally: MongoDB Community - Now you can clone the GitHub repository to your machine / server:
git clone https://github.com/mangayomi/mangayomi-sync.git - Go to the cloned repository and copy the .env.dist file to a new .env file in the same directory
- Open .env and add a secret key for the field "SECRET_KEY": just auto generate it there - 64 instead of 16 bytes long
- Open .env and adjust the values as needed
- Now run
cargo runto run the server. - Connect to the sync server using the host and port set in
.env.
By default, the server will be reachable athttp://localhost:8080
SSL Configuration
To run the server with SSL (HTTPS), follow these steps:
- Prepare your certificate files: You need a certificate chain file (PEM format) and a private key file (PEM format).
- Configure environment variables: Add the following to your
.envfile:SSL_CERT=/path/to/your/fullchain.pem SSL_KEY=/path/to/your/privkey.pem
- Restart the server: The server will automatically detect these variables and start in HTTPS mode.
Generating a self-signed certificate for testing
If you want to test locally, you can generate a self-signed certificate:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodesThen set SSL_CERT=cert.pem and SSL_KEY=key.pem in your .env.
Setup - Docker Compose
- Install Docker Engine / Desktop.
Most installations will come with Compose included, but it can also be installed manually. - Make a copy of the
.env.distfile by runningcat .env.dist >> .env.
Changing the default passwords is strongly recommended, even when running locally. - Add a secret key for the field "SECRET_KEY": just auto generate it there - 64 instead of 16 bytes long
- If you're running the server on an ARM64 CPU, replace Dockerfile with Dockerfile.arm64
- Run the project with
docker compose up -d - Connect to the sync server using the host and port set in
.env.
By default, the server will be reachable athttp://localhost:8080
How to use it on the client
Go to Settings -> Sync:
- Enable sync
- Register an account on your Sync Servers website
- Enter the IP + Port / Domain of your Sync Server, email address and a password with at least 8 characters.
- Press 'Sync progress'!