In the sentence

In the past keepers operated all lighthouses.

Is lighthouses the direct object?

In this sentence
Now, lighthouses are beacons run by computers.

Is beacons neither a direct object or an indirect object?

2 answers

Both of your answers are correct.

Beacons in the second sentence is a predicate nominative.
Lighthouses are towers with extremely strong lights