InkBotDocs

Install a server

One script installs Docker, the server, a systemd service and, optionally, HTTPS with Caddy.

install.sh sets up everything on Ubuntu, Debian or Fedora:

  • Docker, so each bot can have its own computer;
  • the .NET 8 runtime, only if the build needs it (release zips are self-contained and don't);
  • an inkbot user and the inkbot systemd service, with the server in /opt/inkbot;
  • with --domain, Caddy in front for HTTPS with automatic certificates.

At the end it prints the address and the access token to enter in the app.

  1. Create a DNS record such as bots.example.com that points at the server, so Caddy can get a certificate.

  2. Run the script

    Copy the Linux server zip to the machine, unzip it, and run the script inside it as root:

    unzip InkBot-Server-<version>-linux-x64.zip -d inkbot-server
    sudo bash inkbot-server/install.sh --domain bots.example.com --name "My server"
  3. Add it in the app

    In Settings → Servers, choose Add a server and enter the address (https://bots.example.com) and the token the script printed.

Options

Option
--from <zip, URL or folder> The server build to install. Default: the folder the script is in.
--domain <name> Serve https://<name> through Caddy. Its DNS must already point at the server.
--name <text> The server's name in the app. Default: the machine's hostname.
--port <n> The local port the server listens on. Default 8740.
--no-docker Skip Docker. Bots on this server then have no computers.
--dry-run Show what would be done and change nothing.

Without a domain

Without --domain the server only listens on the machine itself (127.0.0.1). Reach it from your PC through an SSH tunnel:

ssh -L 8740:127.0.0.1:8740 you@your-server

Then add http://127.0.0.1:8740 in the app. Plain http:// is only accepted for localhost addresses.

Updating

Run the script again with a newer zip. It replaces the program files and keeps the data: bots, chats, settings, keys and the access token.

sudo bash install.sh --from InkBot-Server-<new version>-linux-x64.zip

Checking on it

systemctl status inkbot
journalctl -u inkbot -n 50