Meidokon Wiki
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Useful(?) links

  • furinkan's stuff

  • Postfix snippets


  • SystemInfo

  • This sidebar

Navigation

  • FrontPage
  • RecentChanges
  • FindPage
  • HelpContents

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

MeidokonWiki:
  • servers
  • nadeko

nadeko

Has been decommissioned on 2019-11-15

Runs a Nadeko bot for Discord. Nadeko is written in C# and I don't want to deal with dotnet junk on Linux, so I'm using a Dockerised version of Nadeko.

The base OS is Vultr's Docker platform, so it's Centos 7 under the hood with Docker packages preinstalled. I run puppet against it to setup the shell niceties but the rest is pretty much stock.

  • Centos 7 x64
  • Vultr's docker platform image
  • puppet managed

How to build

We use this guide once it's time to install Nadeko: https://nadekobot.readthedocs.io/en/latest/guides/Docker%20Guide/

  • Fire up a fresh machine
  • Get it puppeted
  • Puppet should put /opt/nadeko/conf in place

  • Create nadeko from docker image, this won't start the bot yet though

    docker create --name=nadeko \
        --restart always \
        -v /opt/nadeko/conf/:/root/nadeko \
        -v /opt/nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data \
        uirel/nadeko:1.4
    (should this be --restart unless-stopped?)
  • Go read how to setup your credentials: https://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/

  • Register your bot as directed
  • Create /opt/nadeko/conf/credentials.json and fill in the necessary details. Client ID, Token, Client Secret, Username

  • Start the container:

    docker start nadeko; docker logs -f nadeko
  • Visit the oauth2 authorize URL to “pull” the bot onto the server the first time
    • https://discordapp.com/oauth2/authorize?client_id=1234567890&scope=bot

Updating the Nadeko code version

They'll publish updates every now and then as an updated Docker image. This should roughly do it (I haven't tested it for real yet).

  1. Pull the latest version (or a specific version if you prefer):

    docker pull uirel/nadeko:latest
  2. Stop and remove the existing container:

    docker stop nadeko; docker rm nadeko
  3. Create a new instance of the container. This keeps your old config DB and hooks it into the new instance:

    docker create --name=nadeko \
        --restart always \
        -v /opt/nadeko/conf/:/root/nadeko \
        -v /opt/nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data \
        uirel/nadeko:1.4
    (should this be --restart unless-stopped?)
    • Is this the right syntax? The version number may need updating at the end of the line.
  4. Start the new version of Nadeko and follow the logs:

    docker start nadeko; docker logs -f nadeko

Major upgrade notes

http://nadekobot.readthedocs.io/en/latest/guides/Docker%20Guide/

Based on this: https://github.com/willysunny/Nadecker/blob/master/Dockerfile

# docker create --name=nadeko -v /opt/nadeko/conf/:/root/nadeko -v /opt/nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data uirel/nadeko:1.4


mkdir /root/2018-01-30_nadeko_backup

docker cp nadeko:/root/nadeko/credentials.json /root/2018-01-30_nadeko_backup/credentials.json

# migrating to this
docker cp nadeko:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp2.0/data/NadekoBot.db NadekoBot.db

# coming from this
docker cp nadeko:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data/NadekoBot.db /root/2018-01-30_nadeko_backup/NadekoBot.db


# delete the old one
docker rm nadeko


# make the new one
# orig
docker create --name=nadeko -v /opt/nadeko/conf/:/root/nadeko -v /opt/nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data  uirel/nadeko:1.4
# new
docker create --name=nadeko -v /opt/nadeko/conf:/root/nadeko  -v /opt/nadeko/data/:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp2.0/data willysunny/nadecker:latest
# good fresh one
docker create --name=nadeko -v /opt/nadeko/conf:/root/nadeko  -v /opt/nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp2.0/data --restart always willysunny/nadecker:2.13.8
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01
MoinMoin Release 1.9.11 [Revision release], Copyright by Juergen Hermann et al.