github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/docs/INSTALL.md (about) 1 [Table of contents](README.md#table-of-contents) 2 3 # How to install Cozy-stack? 4 5 ## Dependencies 6 7 - A reverse-proxy (nginx, caddy, haproxy, etc.) 8 - A SMTP server 9 - CouchDB 3 10 - Git 11 - Image Magick (and the Lato font, ghostscript et rsvg-convert) 12 13 To install CouchDB 3 through Docker, take a look at our 14 [Docker specific documentation](docker.md). 15 16 **Note:** to generate thumbnails for heic/heif images, the version 6.9+ of 17 Image Magick is required. 18 19 ## Install for self-hosting 20 21 We have started to write documentation on how to install cozy on your own 22 server. We have [guides for 23 self hosting](https://docs.cozy.io/en/tutorials/selfhosting/), either on 24 Debian with precompiled binary packages of from sources on Ubuntu. 25 Don't hesitate to [report issues](https://github.com/cozy/cozy.github.io/issues/new) with them. 26 It will help us improve documentation. 27 28 ## Install for development / local tests 29 30 ### Install the binary 31 32 You can either download the binary or compile it. 33 34 #### Download an official release 35 36 You can download a `cozy-stack` binary from our official releases: 37 https://github.com/cozy/cozy-stack/releases. It is a just a single executable 38 file (choose the one for your platform). Rename it to cozy-stack, give it the 39 executable bit (`chmod +x cozy-stack`) and put it in your `$PATH`. 40 `cozy-stack version` should show you the version if every thing is right. 41 42 #### Compile the binary using `go` 43 44 You can compile a `cozy-stack` from the source. 45 First, you need to [install go](https://golang.org/doc/install), version >= 1.19. With `go` 46 installed and configured, you can run the following commands: 47 48 ``` 49 git clone git@github.com:cozy/cozy-stack.git 50 cd cozy-stack 51 make 52 ``` 53 54 This will fetch the sources and build a binary in `$GOPATH/bin/cozy-stack`. 55 56 Don't forget to add your `$GOPATH/bin` to your `$PATH` at the end of your `*rc` file so 57 that you can execute the binary without entering its full path. 58 59 ``` 60 export PATH="$(go env GOPATH)/bin:$PATH" 61 ``` 62 63 ##### Troubleshooting 64 65 Check if you don't have an alias "go" configurated in your `*rc` file. 66 67 ### Add an instance for testing 68 69 You can configure your `cozy-stack` using a configuration file or different 70 comand line arguments. Assuming CouchDB is installed and running on default port 71 `5984`, you can start the server: 72 73 ```bash 74 cozy-stack serve 75 ``` 76 77 And then create an instance for development: 78 79 ```bash 80 make instance 81 ``` 82 83 The cozy-stack server listens on http://cozy.localhost:8080/ by default. See 84 `cozy-stack --help` for more informations. 85 86 The above command will create an instance on http://cozy.localhost:8080/ with the 87 passphrase `cozy`. By default this will create a `storage/` entry in your current directory, containing all your instances by their URL. An instance "cozy.localhost:8080" will have its stored files in `storage/cozy.localhost:8080/`. Installed apps will be found in the `.cozy_apps/` directory of each instance. 88 89 Make sure the full stack is up with: 90 91 ```bash 92 curl -H 'Accept: application/json' 'http://cozy.localhost:8080/status/' 93 ``` 94 95 You can then remove your test instance: 96 97 ```bash 98 cozy-stack instances rm cozy.localhost:8080 99 ```