0

I can start OpenMapTiles server manually from the terminal console (Ubuntu), but how can I make it start automatically when booting the machine, withouth requiring a logged in user?

Is there some way to start it in /etc/init.d or some other way?

Gabriel S
  • 83
  • 7
  • Note that [from Ubuntu 15.04](https://wiki.ubuntu.com/SystemdForUpstartUsers), the newer [systemd](https://freedesktop.org/wiki/Software/systemd/) is used. You might want to have a look at [this guide](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-unit_files) for writing systemd unit files (link is for RedHat, but will mostly work with Ubuntu as well). – andreee Jun 08 '18 at 13:39
  • Thanks, but that does not answer my question on how to start OpenMapTiles server. – Gabriel S Jun 09 '18 at 17:10
  • Yes, that's why I didn't post it as an answer. But I don't know OpenMapTiles, so unfortunately I can't help. Was just giving a pointer that might be helpful. Good luck though! – andreee Jun 09 '18 at 17:27
  • But I guess that writing a simple systemd service script shouldn't be too difficult and should solve your problem. Have a look at `ExecStart`, for example. This is where you should probably put your execution command. – andreee Jun 09 '18 at 17:30

1 Answers1

0

docker run --rm -it -d -v /root:/data -p 8080:80 klokantech/openmaptiles-server

put in /etc/rc.local

-d - options is for detach and run in background mode