└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # AFFiNE Docker 2 | 3 | The official Docker deployment solution for AFFiNE. 4 | 5 | ## Install & Usage 6 | 7 | Install AFFiNE with Docker 8 | This guide assumes you already have an environment setup running docker. 9 | 10 | Currently there are two main versions: 11 | 1. AFFiNE Alpha - The latest version in active development 12 | affine-self-hosted:latest 13 | 2. AFFiNE Pre-Alpha - Previous release which is no longer developed, but offers different functionality 14 | affine-self-hosted:pre-alpha 15 | Simply swap out the Docker image for which version you require, the following instructions default to the latest image. 16 |  17 |  18 | Installing AFFiNE using Docker 19 | 20 | 1. Pull the latest AFFiNE image. This may take some time depending on your network connection. 21 | 22 | ``` 23 | docker pull ghcr.io/toeverything/affine-self-hosted:latest 24 | ``` 25 | 26 | Ensure this step is completed successfully before continuing (you can rerun this command if you are unsure). 27 | ​ 28 | 3. Next we will run the AFFiNE project in Docker. 29 | 30 | ``` 31 | docker run -it --name affine -d -v YOUR_PATH:/app/data -p 3000:3000 ghcr.io/toeverything/affine-self-hosted:latest 32 | ``` 33 | 34 | - (--name) Optional - this makes it convenient for using and interacting with your Docker container - such as docker restart affine. 35 | - (-v) Optional - allows you to mount your data outside of Docker to your local machine. Remember to set YOUR_PATH to the directory of your choice. 36 | - (-p) Required - this sets the port for where AFFiNE is running and listening, we use the default 3000 if you need to change this only change the first number e.g. [YOUR_PORT]:3000 37 | 38 | Finally, the image id is the version of AFFiNE you wish to deploy. Following this guide, it would be the same as the previous step - so ghcr.io/toeverything/affine-self-hosted:latest 39 | ​ 40 | 3. You can confirm that AFFiNE is running successfully by using the command 41 | docker ps 42 | This command shows a list of running containers - in the list you should be able to find AFFiNE. 43 |  44 |  45 | Now you can access AFFiNE from your browser via: 46 | 47 | If you are running Docker on your local machine and using the default settings you can access via port 3000 through localhost: http://localhost:3000/​ 48 | 49 | Otherwise you will need to know the {IP} of the machine using Docker and the {PORT} that AFFiNE is using. 50 | 51 | Bear in mind that some features require a secure environment to work, which means https and wss connections through a reverse proxy setup. If you have any questions or need support you may want to try the Technical Discussion space.​ 52 | --------------------------------------------------------------------------------