Skip to content

Installation

Cubicroot edited this page Dec 26, 2022 · 3 revisions

Quick Start with Docker Compose

Add a config.yml from the config.example.yml and start the application with this docker compose file:

version: '3.2'

services:
  remindme:
    image: cubicrootxyz/remindme:latest
    volumes:
      - "./config.yml:/run/config.yml"
      - "./data:/run/data"
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
    ports:
      - 80:8080

  remindme-db:
    image: mysql:8.0
    volumes:
      - "./db-data:/var/lib/mysql"
    environment:
      - 'MYSQL_ROOT_PASSWORD=mypass'
      - 'MYSQL_DATABASE=remindme'
    networks:
      - remindme
    command:
      - --default-authentication-plugin=mysql_native_password
    networks:
      - remindme

networks:
  remindme:

Docker (the long version)

  1. Copy the config.example.yml from the repository
  2. Rename it to config.yml
  3. Fill in the settings
    1. debug do not touch unless you know what you are doing
    2. matrixbotaccount those are the credentials and the homeserver (url of the matrix instance) of the bots account. You need to create one yourself.
    3. matrixusers those users will be able to interact with the bot. Enter a username in the format @username:instance.tld so for the user "test123" at the instance "matrix.org" this would be @test123:matrix.org
    4. database enter a database connection here. You need to enter a MySQL connection string. If your database-server is running at the domain "mydatabase.org" at port 3306 and your credentials to log in are "root" and "12345" and the database you created is named "remindme_database" then your connection string would look like this: root:12345@tcp(mydatabase.org:3306)/remindme_database.
  4. Add this docker-compose.yml file that configures the RemindMe container and adds a database container:
version: '3.2'

services:
  remindme:
    image: cubicrootxyz/remindme:latest
    volumes:
      - "./config.yml:/run/config.yml"
      - "./data:/run/data"
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
    ports:
      - 80:8080

  remindme-db:
    image: mysql:8.0
    volumes:
      - "./db-data:/var/lib/mysql"
    environment:
      - 'MYSQL_ROOT_PASSWORD=mypass'
      - 'MYSQL_DATABASE=remindme'
    networks:
      - remindme
    command:
      - --default-authentication-plugin=mysql_native_password
    networks:
      - remindme

networks:
  remindme:
  1. If you want to run a specific version of RemindMe change the latest tag of the image to your desired version. You can find available versions at Docker Hub.
  2. Make sure the files and folders defined in the docker-compose.yml exist on your host, if not create them.
  3. In the same folder as the docker-compose.yml file run docker-compose up -d and your RemindMe instance is up and running.

You should persist the data stored in /run/data/ and frequently back it up. There is crucial information for the end to end encryption stored in.

Plain

  1. Install the dependencies
    1. You need libolm-dev with at least version 3 (e.g. for debian buster run apt install libolm-dev/buster-backports -y)
    2. Install gcc which is required by cgo (e.g. for debian buster run apt install gcc -y)
  2. Download the code
  3. Run go build -o /app/bin /app/cmd/remindme/main.go to build the binary in /app/bin
  4. Copy the config.example.yml from the repository
  5. Rename it to config.yml
  6. Fill in the settings
    1. debug do not touch unless you know what you are doing
    2. matrixbotaccount those are the credentials and the homeserver (url of the matrix instance) of the bots account. You need to create one yourself.
    3. matrixusers those users will be able to interact with the bot. Enter a username in the format @username:instance.tld so for the user "test123" at the instance "matrix.org" this would be @test123:matrix.org
    4. database enter a database connection here. You need to enter a MySQL connection string. If your database-server is running at the domain "mydatabase.org" at port 3306 and your credentials to log in are "root" and "12345" and the database you created is named "remindme_database" then your connection string would look like this: root:12345@tcp(mydatabase.org:3306)/remindme_database.
  7. Now you need to copy the file to the folder where the binary is executed. Put the binary you build and the config file in the same folder.
  8. Run the binary
  9. Make sure to persists the data folder as it contains important data for the service
  10. The application will serve the API at port 8080
Clone this wiki locally