Can openwrt update IPv6 prefix automatically?

Now I have to manually update it. Does somebody know how to set it up in OpenWrt?

Yes, it is possible. The API docs say that the prefix is updated if there is a “/64” at the end of the submitted IPv6 address when using the /api/update API, and OpenWRT “dynv6” template does not do this. So you have to switch to the custom template.

Here is what I have in /etc/config/ddns, and it works:

config service 'dynv6_ipv6'
	option use_ipv6 '1'
	option enabled '1'
	option lookup_host '<MYZONE>.dynv6.net'
	option domain '<MYZONE>.dynv6.net'
	option password '<MYKEY>'
	option use_https '1'
	option interface 'lan'
	option ip_source 'network'
	option ip_network 'lan'
	option force_interval '1'
	option update_url 'https://dynv6.com/api/update?hostname=[DOMAIN]&token=[PASSWORD]&ipv6=[IP]/64'

Please substitute <MYZONE> and <MYKEY> with your own values, but do not modify the update_url line, it is supposed to contain placeholders exactly in this form.